ahci + network

Sartakov A. Vasily sartakov at ...104...
Tue Mar 11 13:44:54 CET 2014


Hello. 


>> So, maybe I forget somethinetappg in configuration? Something related to IRQ..
> 
> I think you are spot on! Your run script routes the IRQ session of the
> AHCI driver to the ACPI server, which is correct. But for the NIC
> driver, you are just using the default route, which means that its IRQ
> session gets routed to the parent (core's IRQ service), which is wrong.
> You might try adding a route to the NIC driver that routes its IRQ
> session to the ACPI server as well.
> 
> Why then, did the run script work w/o AHCI? Maybe because Qemu uses
> different IRQs depending on the configurations with and without AHCI.
> 
> Btw, are you planning to execute your run script on any platform w/o
> ACPI support (such as OKL4 or Linux)? If not, you could greatly simplify
> it by removing all the convoluted conditionals related to '[have_spec
> acpi]'. This would make it a bit easier to see configuration mistakes.

I have removed ACPI and use_tar. This is a new version. Still something related to IRQ does not work. 
And I have tested without AHCI - use_ram works. 

set use_ram	0
set use_ahci	1

set disk_image "bin/srv.hda"

set build_components {
	core init
	drivers/timer
	drivers/nic
	drivers/pci
	app/netapp
}

set network_driver "nic_drv" 

lappend_if [have_spec pci]      build_components drivers/pci/device_pd

lappend_if $use_ram		build_components server/ram_blk
lappend_if $use_ram		build_components server/rump_fs

lappend_if $use_ahci		build_components drivers/ahci

build $build_components

create_boot_directory

append config {
<config>
	<parent-provides>
		<service name="ROM"/>
		<service name="LOG"/>
		<service name="CAP"/>
		<service name="RAM"/>
		<service name="RM"/>
		<service name="CPU"/>
		<service name="PD"/>
		<service name="IRQ"/>
		<service name="IO_PORT"/>
		<service name="IO_MEM"/>
		<service name="SIGNAL"/>
	</parent-provides>
	<default-route>
		<any-service> <parent/> <any-child/> </any-service>
	</default-route>
	<start name="timer">
		<resource name="RAM" quantum="1M"/>
		<provides><service name="Timer"/></provides>
	</start>
	<start name="pci_drv">
		<resource name="RAM" quantum="6M"/>
		<provides> 
			<service name="PCI"/> 
		</provides>
	</start>}

append_if [expr $use_ram] config {
	<start name="ram_blk">
		<resource name="RAM" quantum="64M"/>
		<provides><service name="Block"/></provides>
		<config file="ext2.raw" block_size="512"/>
	</start>
	<start name="rump_fs">
		<resource name="RAM" quantum="8M" />
		<provides><service name="File_system"/></provides>
		<config fs="ext2fs"><policy label="" root="/" writeable="yes"/></config>
	</start>}

append_if $use_ahci config {
	<start name="ahci">
		<binary name="ahci" />
		<resource name="RAM" quantum="10M" />
		<provides><service name="Block" /></provides>
		<route>
			<any-service> <parent /> <any-child /></any-service>
		</route>
	</start>}

append config {
	<start name="nic_drv">
		<resource name="RAM" quantum="8M"/>
		<provides><service name="Nic"/></provides>
	</start>}

append config {
	<start name="netapp">
		<resource name="RAM" quantum="1G" />
		<config>
			<arg value="netapp" />
			<libc tx_buf_size="320M" rx_buf_size="320M"/>
		</config>
		</start>
		}

append config {
</config>
}

install_config $config

#
# Boot modules
#

# generic modules
set boot_modules {
	core init timer ld.lib.so
	libc.lib.so libm.lib.so  pthread.lib.so libc_log.lib.so
	lxip.lib.so libc_resolv.lib.so 
	netapp
	nic_drv
}

# platform-specific modules
lappend_if [have_spec pci]           boot_modules pci_drv
lappend_if [have_spec nova]          boot_modules pci_device_pd

lappend_if $use_ram          	boot_modules 	ext2.raw
lappend_if $use_ram          	boot_modules	rump.lib.so
lappend_if $use_ram          	boot_modules	rump_fs.lib.so 
lappend_if $use_ram          	boot_modules	ram_blk
lappend_if $use_ram          	boot_modules	rump_fs
lappend_if $use_ram          	boot_modules	libc_fs.lib.so

lappend_if $use_ahci		boot_modules ahci
lappend_if $use_ahci		boot_modules libc_fuse_ext2.lib.so
lappend_if $use_ahci		boot_modules libc_block.lib.so

build_boot_image $boot_modules

append_if [have_spec x86]     qemu_args " -net nic,model=e1000 "
append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 "

append qemu_args " -m 512m -net user -redir tcp:8080::8080"
append qemu_args " -nographic -serial mon:stdio "

append_if $use_ahci        qemu_args " -drive id=disk,file=$disk_image,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d"

run_genode_until forever

spawn qemu-system-x86_64 -no-kvm -cpu core2duo -net nic,model=e1000 -m 512m -net user -redir tcp:6379::6379 -redir tcp:8080::80 -nographic -serial mon:stdio -drive id=disk,file=bin/srv.hda,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d -cdrom var/run/netapp.iso

NOVA Microhypervisor v6-1eba7d3 (x86_32): Mar 11 2014 16:35:04 [gcc 4.7.2]

[ 0] CORE:0:0:0 6:f:b:0 [0] Intel(R) Core(TM)2 Duo CPU     T7700  @ 2.40GHz
Hypervisor does not feature VMX
Hypervisor does not feature SVM
Hypervisor reports 1x1 CPU  - boot CPU is 0
Hypervisor info page contains 25 memory descriptors:
detected physical memory: 0x0000000000000000 - size: 0x9fc00
use      physical memory: 0x0000000000000000 - size: 0x9f000
detected physical memory: 0x0000000000100000 - size: 0x1fefe000
use      physical memory: 0x0000000000100000 - size: 0x1fefe000
map multi-boot module: physical 0x1f938000 -> [0x001c6000-0x0028c2d8) - core
map multi-boot module: physical 0x1f9ff000 -> [0x00002000-0x00002496) - config
map multi-boot module: physical 0x1fa00000 -> [0x00003000-0x0006e3b0) - init
map multi-boot module: physical 0x1fa6c000 -> [0x0006f000-0x000cdbfc) - timer
map multi-boot module: physical 0x1facb000 -> [0xb0000000-0xb0097124) - ld.lib.so
map multi-boot module: physical 0x1fb63000 -> [0xbff04000-0xbffb4208) - libc.lib.so
map multi-boot module: physical 0x1fc14000 -> [0x000ce000-0x000f26d8) - libm.lib.so
map multi-boot module: physical 0x1fc39000 -> [0x000f3000-0x000f91c4) - pthread.lib.so
map multi-boot module: physical 0x1fc40000 -> [0x000fa000-0x000fc7dc) - libc_log.lib.so
map multi-boot module: physical 0x1fc43000 -> [0xb0098000-0xb0185750) - lxip.lib.so
map multi-boot module: physical 0x1fd31000 -> [0xbffb5000-0xbffe3c00) - libc_resolv.lib.so
map multi-boot module: physical 0x1fd60000 -> [0xb0186000-0xb02096e8) - netapp
map multi-boot module: physical 0x1fde4000 -> [0xb020a000-0xb0292d04) - nic_drv
map multi-boot module: physical 0x1fe6d000 -> [0xb0293000-0xb0302be0) - pci_drv
map multi-boot module: physical 0x1fedd000 -> [0xb0303000-0xb0358e18) - pci_device_pd
map multi-boot module: physical 0x1ff33000 -> [0xb0359000-0xb03c19c0) - ahci
map multi-boot module: physical 0x1ff9c000 -> [0xb03c2000-0xb040b234) - libc_fuse_ext2.lib.so
map multi-boot module: physical 0x1ffe6000 -> [0xbffe4000-0xbfffbf60) - libc_block.lib.so
:virt_alloc: Allocator 185bb4 dump:
 Block: [00002000,00003000) size=00001000 avail=00000000 max_avail=00000000
 Block: [00003000,0006f000) size=0006c000 avail=00000000 max_avail=00000000
 Block: [0006f000,000ce000) size=0005f000 avail=00000000 max_avail=00000000
 Block: [000ce000,000f3000) size=00025000 avail=00000000 max_avail=00003000
 Block: [000f3000,000fa000) size=00007000 avail=00000000 max_avail=00000000
 Block: [000fa000,000fd000) size=00003000 avail=00000000 max_avail=00003000
 Block: [000fd000,00100000) size=00003000 avail=00003000 max_avail=00003000
 Block: [001c6000,0028d000) size=000c7000 avail=00000000 max_avail=9fd73000
 Block: [0028d000,a0000000) size=9fd73000 avail=9fd73000 max_avail=9fd73000
 Block: [b0000000,b0098000) size=00098000 avail=00000000 max_avail=9fd73000
 Block: [b0098000,b0186000) size=000ee000 avail=00000000 max_avail=9fd73000
 Block: [b0186000,b020a000) size=00084000 avail=00000000 max_avail=00000000
 Block: [b020a000,b0293000) size=00089000 avail=00000000 max_avail=9fd73000
 Block: [b0293000,b0303000) size=00070000 avail=00000000 max_avail=00000000
 Block: [b0303000,b0359000) size=00056000 avail=00000000 max_avail=00000000
 Block: [b0359000,b03c2000) size=00069000 avail=00000000 max_avail=00000000
 Block: [b03c2000,b040c000) size=0004a000 avail=00000000 max_avail=0faf3000
 Block: [b040c000,bfeff000) size=0faf3000 avail=0faf3000 max_avail=0faf3000
 Block: [bff04000,bffb5000) size=000b1000 avail=00000000 max_avail=0faf3000
 Block: [bffb5000,bffe4000) size=0002f000 avail=00000000 max_avail=00000000
 Block: [bffe4000,bfffc000) size=00018000 avail=00000000 max_avail=00001000
 Block: [bfffc000,bfffd000) size=00001000 avail=00001000 max_avail=00001000
 => mem_size=2951938048 (2815 MB) / mem_avail=2944835584 (2808 MB)
:phys_alloc: Allocator 185758 dump:
 Block: [00001000,0009f000) size=0009e000 avail=0009e000 max_avail=0009e000
 Block: [00100000,00400000) size=00300000 avail=00300000 max_avail=1d138000
 Block: [02800000,1f938000) size=1d138000 avail=1d138000 max_avail=1d138000
 => mem_size=491610112 (468 MB) / mem_avail=491610112 (468 MB)
:io_mem_alloc: Allocator 18a45c dump:
 Block: [00000000,00001000) size=00001000 avail=00001000 max_avail=00001000
 Block: [0009f000,00100000) size=00061000 avail=00061000 max_avail=00061000
 Block: [00400000,02800000) size=02400000 avail=02400000 max_avail=e06c7000
 Block: [1f938000,fffff000) size=e06c7000 avail=e06c7000 max_avail=e06c7000
 => mem_size=3803353088 (3627 MB) / mem_avail=3803353088 (3627 MB)
int main(): --- create local services ---
int main(): --- start init ---
int main(): transferred 468 MB to init
int main(): --- init created, waiting for exit condition ---
[init -> pci_drv] PCI driver started
[init -> nic_drv] --- iPXE NIC driver started ---
[init -> ahci] --- AHCI driver started ---
[init -> pci_drv -> pci_device_pd] PCI device pd starting ...
[init -> pci_drv -> pci_device_pd] PCI device pd started
[init -> netapp] void init_libc_block(): using the libc_block plugin
[init -> pci_drv] Could not open file "config"
[init -> pci_drv] Could not obtain config file
[init -> netapp] libc_fuse_ext2: try to mount /dev/blkdev...
[init -> ahci] Found AHCI HBA (Vendor ID: 8086 Device ID: 2922 Class: 00010601)
[init -> ahci] Port 0: ATAPI no
[init -> ahci] Port 0: Detected interface is active
[init -> ahci] AHCI Version: 1.0000
[init -> ahci] CAPs:
[init -> ahci] 	Port count: 6
[init -> ahci] 	Command slots: 32
[init -> ahci] 	AHCI only: no
[init -> ahci] 	Native command queuing: yes
[init -> ahci] 	64 Bit: no
[init -> ahci] CMD.ST bit set during device reset --> unknown behavior
[init -> netapp] fuse* fuse_new(fuse_chan*, fuse_args*, const fuse_operations*, size_t, void*): 
[init -> netapp] Using DHCP for interface configuration.
[init -> netapp] void init_libc_lxip(): init_libc_lxip() address config=dhcp
[init -> netapp] INFO: NET: Registered protocol family 16
[init -> netapp] INFO: NET: Registered protocol family 2
[init -> netapp] INFO: Hash tables configured (established 524288 bind 524288)
[init -> netapp] INFO: reno registered
[init -> netapp] INFO: cubic registered
Quota exceeded! amount=8192, size=4096, consumed=8192
[init -> netapp] upgrading quota donation for SIGNAL session
[init -> nic_drv] --- init iPXE NIC
[init -> nic_drv] scan_pci(): Found: 00:03.0 8086:100e (rev 03) IRQ 0b
[init -> nic_drv] probe_pci_device(): using driver 82540em
[init -> nic_drv] adjust_pci_device(): PCI BIOS has not enabled device 00:03.0! Updating PCI command 0103->0107
[init -> nic_drv] adjust_pci_device(): PCI device 00:03.0 latency timer is unreasonably low at 0. Setting to 32.
[init -> nic_drv] ioremap(): bus_addr = febc0000 len = 20000
[init -> nic_drv] snprintf not implemented
[init -> nic_drv]     number of devices: 1
[init -> nic_drv] --- init rx_callbacks
[init -> nic_drv] --- get MAC address 52:54:00:12:34:56
Quota exceeded! amount=12288, size=4096, consumed=12288
[init -> netapp] upgrading quota donation for SIGNAL session
[init -> netapp] Received mac: 52:54:00:12:34:56
[init -> netapp] driver_net_open called


-- 
Sartakov A. Vasily
sartakov at ...104...



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.genode.org/pipermail/users/attachments/20140311/d3cf8a83/attachment.sig>


More information about the users mailing list