Subject: port-i386/30112: loss of rtk devices when under Xen and low memory
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <thierry@herbelot.com>
List: netbsd-bugs
Date: 05/02/2005 09:33:00
>Number:         30112
>Category:       port-i386
>Synopsis:       loss of rtk devices when under Xen and low memory
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 02 09:33:00 +0000 2005
>Originator:     Thierry Herbelot
>Release:        20050408-3.0_BETA
>Organization:
>Environment:
NetBSD XXX 3.0_BETA NetBSD 3.0_BETA (XEN0) #2: Fri Apr  8 17:54:42 CEST 2005 bouyer@pop.lip6.fr:/local/pop1/bouyer/tmp/i386/obj/local/pop1/bouyer/netbsd-3/src/sys/arch/i386/compile/XEN0 i386
>Description:
I have installed the 20050408-3.0_BETA snapshot of NetBSD to run NetBSD under Xen.
The "real" memory of the target machine is small (96MB). I have reduced the memory allowance for Dom0 to 16MB in grub/menu.lst :
title Xen 3.0 / NetBSD (hda0, serial)
  root(hd0,0)
  kernel (hd0,a)/xen.gz dom0_mem=16384 com1=9600,8n1 noacpi
  module (hd0,a)/netbsd-XEN0 root=/dev/hda1 ro console=ttyS0

The rtk0 and rtk1 fail to be attached with the following error :
rtk1 at pci0 dev 15 function 0: Realtek 8139 10/100BaseTX
(XEN) PCI: Found IRQ 12 for device 00:0f.0
rtk1: interrupting at physical irq 12, irq 8
_bus_dmamem_alloc_range: address 0x1a20000 out of range
rtk1: can't allocate recv buffer, error = 12

(same for rtk0)

An ne0 I/F on PCI is correctly detected and attached :
ne0 at pci0 dev 14 function 0: Realtek 8029 Ethernet
ne0: Ethernet address 52:54:00:e5:36:06
ne0: 10base2, 10baseT, 10baseT-FDX, auto, default [0x03 0x30] auto
(XEN) PCI: Found IRQ 11 for device 00:0e.0
(XEN) PCI: Sharing IRQ 11 with 01:00.0
ne0: interrupting at physical irq 11, irq 7

When the memory allowance for Dom0 is 32MB, the rtk0 and rtk1 I/Fs are correctly attached :
rtk1 at pci0 dev 15 function 0: Realtek 8139 10/100BaseTX
rtk1: interrupting at physical irq 12, irq 8
rtk1: Ethernet address 00:40:95:32:88:9a
ukphy1 at rtk1 phy 7: Generic IEEE 802.3u media interface
ukphy1: OUI 0x000000, model 0x0000, rev. 0
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
>How-To-Repeat:
- install the 3.0 snapshot
- configure the Xen hypervisor (reduce the amount of RAM for Dom0)
- start the PC with NetBSD/Xen0

>Fix: