# Malta
###### tags: `mimiker`
## Schemat blokowy

## Linux
Trzeba ściągnąć jądro i obraz dysku z [Debian on Malta](https://people.debian.org/~aurel32/qemu/mips/), a potem odpalić:
```
qemu-system-mips -M malta \
-kernel vmlinux-3.2.0-4-4kc-malta \
-hda debian_wheezy_mips_standard.qcow2 \
-append "root=/dev/sda1 console=tty0" \
-net user,hostfwd=tcp::10022-:22 -net nic \
-device usb-mouse -device usb-kbd \
-soundhw es1370
```
Z maszyną wirtualną można się łączyć po ssh `ssh -p10022 root@localhost`.
### `lspci -v`
```
00:00.0 Host bridge: Marvell Technology Group Ltd. GT-64120/64120A/64121A System Controller (rev 10)
Subsystem: Red Hat, Inc Device 1100
Flags: medium devsel
Memory at <unassigned> (32-bit, prefetchable) [disabled]
Memory at 01000000 (32-bit, prefetchable) [disabled] [size=16M]
Memory at <ignored> (32-bit, non-prefetchable) [disabled]
Memory at <ignored> (32-bit, non-prefetchable) [disabled]
Memory at <ignored> (32-bit, non-prefetchable) [disabled]
I/O ports at <ignored> [disabled]
00:0a.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA
Subsystem: Red Hat, Inc Device 1100
Flags: medium devsel
00:0a.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (prog-if 80 [Master])
Subsystem: Red Hat, Inc Device 1100
Flags: bus master, medium devsel, latency 0
[virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 000003f0 (type 3, non-prefetchable) [size=1]
[virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 00000370 (type 3, non-prefetchable) [size=1]
I/O ports at 1440 [size=16]
Kernel driver in use: ata_piix
00:0a.2 USB controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01) (prog-if 00 [UHCI])
Subsystem: Red Hat, Inc Device 1100
Flags: bus master, fast devsel, latency 0, IRQ 11
I/O ports at 1400 [size=32]
Kernel driver in use: uhci_hcd
00:0a.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
Subsystem: Red Hat, Inc Qemu virtual machine
Flags: medium devsel
Kernel driver in use: piix4_smbus
00:0b.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)
Flags: bus master, medium devsel, latency 0, IRQ 10
I/O ports at 1420 [size=32]
Memory at 12051000 (32-bit, non-prefetchable) [size=32]
[virtual] Expansion ROM at 12000000 [disabled] [size=256K]
Kernel driver in use: pcnet32
00:12.0 VGA compatible controller: Cirrus Logic GD 5446 (prog-if 00 [VGA controller])
Subsystem: Red Hat, Inc Device 1100
Flags: fast devsel
Memory at 10000000 (32-bit, prefetchable) [size=32M]
Memory at 12050000 (32-bit, non-prefetchable) [size=4K]
[virtual] Expansion ROM at 12040000 [disabled] [size=64K]
Kernel driver in use: cirrusfb
00:13.0 Multimedia audio controller: Ensoniq ES1370 [AudioPCI]
Subsystem: Device 4942:4c4c
Flags: bus master, slow devsel, latency 0, IRQ 10
I/O ports at 1000 [size=256]
Kernel driver in use: snd_ens1370
```
### `lsusb -v`
```
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0001 1.1 root hub
bcdDevice 3.02
iManufacturer 3 Linux 3.2.0-4-4kc-malta uhci_hcd
iProduct 2 UHCI Host Controller
iSerial 1 0000:00:0a.2
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 255
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 2
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 1 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0103 power enable connect
Port 2: 0000.0103 power enable connect
Device Status: 0x0001
Self Powered
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0627 Adomax Technology Co., Ltd
idProduct 0x0001
bcdDevice 0.00
iManufacturer 1 QEMU
iProduct 2 QEMU USB Mouse
iSerial 9 89126-pci:0a.2-1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 6 HID Mouse
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 0.01
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 52
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 10
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Bus 001 Device 003: ID 0409:55aa NEC Corp. Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 8
idVendor 0x0409 NEC Corp.
idProduct 0x55aa Hub
bcdDevice 1.01
iManufacturer 1 QEMU
iProduct 2 QEMU USB Hub
iSerial 3 314159-pci:0a.2-2
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 255
Hub Descriptor:
bLength 10
bDescriptorType 41
nNbrPorts 8
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 1 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00 0x00
PortPwrCtrlMask 0xff 0x00
Hub Port Status:
Port 1: 0000.0103 power enable connect
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Port 5: 0000.0100 power
Port 6: 0000.0100 power
Port 7: 0000.0100 power
Port 8: 0000.0100 power
Device Status: 0x0001
Self Powered
Bus 001 Device 004: ID 0627:0001 Adomax Technology Co., Ltd
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0627 Adomax Technology Co., Ltd
idProduct 0x0001
bcdDevice 0.00
iManufacturer 1 QEMU
iProduct 4 QEMU USB Keyboard
iSerial 11 68284-pci:0a.2-2.1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 8 HID Keyboard
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 63
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
```
### `/proc/iomem`
```
00000000-00000fff : reserved
00001000-000effff : System RAM
000f0000-0076afff : reserved
00100000-00581bb7 : Kernel code
00581bb8-006c2ba7 : Kernel data
0076b000-07ffefff : System RAM
10000000-17ffffff : GT-64120 PCI MEM
10000000-11ffffff : 0000:00:12.0
10000000-11ffffff : cirrusfb
12000000-1203ffff : 0000:00:0b.0
12040000-1204ffff : 0000:00:12.0
12050000-12050fff : 0000:00:12.0
12050000-12050fff : cirrusfb
12051000-1205101f : 0000:00:0b.0
1e000000-1e3fffff : physmap-flash.0
1e000000-1e3fffff : physmap-flash.0
```
### `/proc/ioports`
```
00000000-0000001f : dma1
00000020-00000021 : pic1
00000040-0000005f : timer
00000060-0000006f : keyboard
00000070-00000077 : rtc_cmos
00000070-00000077 : rtc0
00000080-0000008f : dma page reg
000000a0-000000a1 : pic2
000000c0-000000df : dma2
00000170-00000177 : ata_piix
000001f0-000001f7 : ata_piix
000002f8-000002ff : serial
00000376-00000376 : ata_piix
000003c0-000003df : cirrusfb
000003f6-000003f6 : ata_piix
000003f8-000003ff : serial
00001000-001fffff : GT-64120 PCI I/O
00001000-000010ff : 0000:00:13.0
00001000-000010ff : Ensoniq AudioPCI
00001100-00001107 : piix4_smbus
00001400-0000141f : 0000:00:0a.2
00001400-0000141f : uhci_hcd
00001420-0000143f : 0000:00:0b.0
00001420-0000143f : pcnet32_probe_pci
00001440-0000144f : 0000:00:0a.1
00001440-0000144f : ata_piix
```
### `/proc/interrupts`
```
CPU0
0: 2 XT-PIC timer
1: 11 XT-PIC i8042
2: 0 XT-PIC cascade
4: 60 XT-PIC serial
8: 0 XT-PIC rtc0
10: 1083 XT-PIC snd_ens1370, eth0
11: 210 XT-PIC uhci_hcd:usb1
12: 146 XT-PIC i8042
14: 2046 XT-PIC ata_piix
15: 82 XT-PIC ata_piix
18: 0 MIPS XT-PIC cascade
21: 0 MIPS CoreHi
23: 23606 MIPS timer
ERR: 0
```