On 21 March 2011 20:41, Aurelien Jarno <aurel...@aurel32.net> wrote: > On Mon, Mar 07, 2011 at 11:10:32AM +0000, Peter Maydell wrote: >> + /* 0x4e000000 LAN9118 Ethernet */ >> + if (nd_table[0].vlan) { >> + lan9118_init(&nd_table[0], 0x4e000000, pic[15]); >> + } > > It basically means we silently ignore all other network cards the user > asked. Shouldn't we but a warning/error in that case?
Well, if you ask for one network card that's the wrong kind you get an error: qemu-system-arm: qemu: Unsupported NIC model: ne2k_pci but you're right that if you ask for several cards we ignore the other ones. I just copied this code pattern from hw/integratorcp.c ; if you want to suggest a better code fragment I'm happy to revise the patch. (hw/versatilepb.c is even worse, if I'm reading the code right it creates rtl8139 cards regardless of what model you ask for...) Conceptually, though, it seems to me that the right place to put "the user specified a network card/a USB device/whatever but nothing in the board model used it" checks is in the generic code. Otherwise even boards with no network support at all need to have boilerplate "reject any network card specification" code, for instance, all boards without USB need code to reject attempts to define USB devices, and so on... > For having the possibility to add more than one card, I guess it's > possible to simulated the PCI controller? Well if the board has any PCI > controller. Sadly PCI is not supported by the A9MPx4 daughterboard. > Otherwise the patch looks fine to me, it's very nice being able to boot > an ARM board with more than 256MB of RAM. PS: PBX-A9 also supports 1GB RAM :-) (but for different reasons doesn't have PCI support and also the model is decidedly inaccurate). -- PMM