slow last 128MB of RAM in a 2GB system?

Bill McGonigle bill at bfccomputing.com
Fri Apr 13 14:48:52 EDT 2007


On Apr 12, 2007, at 19:30, Dave Johnson wrote:

> I unfortunately know way too much about these types of problems having
> debugged and fixed a commercial BIOS W.R.T. to MTRR and E820 bugs.

See, we _do_ have an expert on everything! :)

> The MTRR map is (by default) filled out by the BIOS.  It also fills
> out the E820 memory map.
>
> This first question is what did the bios fill out for the E820 map?
> This is printed at the begging of the kernel startup with the text
> 'BIOS-provided physical RAM map'.

This is booted with mem=1920M (since the BIOS doesn't know about  
that, I'm guessing it's still useful):

   BIOS-provided physical RAM map:
   sanitize start
   sanitize end
   copy_e820_map() start: 0000000000000000 size: 000000000009fc00  
end: 000000000009fc00 type: 1
   copy_e820_map() type is E820_RAM
   copy_e820_map() start: 000000000009fc00 size: 0000000000000400  
end: 00000000000a0000 type: 2
   copy_e820_map() start: 00000000000e0000 size: 0000000000020000  
end: 0000000000100000 type: 2
   copy_e820_map() start: 0000000000100000 size: 000000007ded0000  
end: 000000007dfd0000 type: 1
   copy_e820_map() type is E820_RAM
   copy_e820_map() start: 000000007dfd0000 size: 000000000000f000  
end: 000000007dfdf000 type: 3
   copy_e820_map() start: 000000007dfdf000 size: 0000000000021000  
end: 000000007e000000 type: 4
   copy_e820_map() start: 00000000fee00000 size: 0000000000001000  
end: 00000000fee01000 type: 2
   copy_e820_map() start: 00000000ff780000 size: 0000000000880000  
end: 0000000100000000 type: 2
   BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
   BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
   BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
   BIOS-e820: 0000000000100000 - 000000007dfd0000 (usable)
   BIOS-e820: 000000007dfd0000 - 000000007dfdf000 (ACPI data)
   BIOS-e820: 000000007dfdf000 - 000000007e000000 (ACPI NVS)
   BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
   BIOS-e820: 00000000ff780000 - 0000000100000000 (reserved)
   limit_regions start: 0000000000000000 - 000000000009fc00 (usable)
   limit_regions start: 000000000009fc00 - 00000000000a0000 (reserved)
   limit_regions start: 00000000000e0000 - 0000000000100000 (reserved)
   limit_regions start: 0000000000100000 - 000000007dfd0000 (usable)
   limit_regions start: 000000007dfd0000 - 000000007dfdf000 (ACPI data)
   limit_regions start: 000000007dfdf000 - 000000007e000000 (ACPI NVS)
   limit_regions start: 00000000fee00000 - 00000000fee01000 (reserved)
   limit_regions start: 00000000ff780000 - 0000000100000000 (reserved)
   limit_regions endfor: 0000000000000000 - 000000000009fc00 (usable)
   limit_regions endfor: 000000000009fc00 - 00000000000a0000 (reserved)
   limit_regions endfor: 00000000000e0000 - 0000000000100000 (reserved)
   limit_regions endfor: 0000000000100000 - 0000000078000000 (usable)
   user-defined physical RAM map:
   user: 0000000000000000 - 000000000009fc00 (usable)
   user: 000000000009fc00 - 00000000000a0000 (reserved)
   user: 00000000000e0000 - 0000000000100000 (reserved)
   user: 0000000000100000 - 0000000078000000 (usable)
   1024MB HIGHMEM available.
   896MB LOWMEM available.

Into -h units:

639K  - BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
1K    - BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
128K  - BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
2014M - BIOS-e820: 0000000000100000 - 000000007dfd0000 (usable)
60K   - BIOS-e820: 000000007dfd0000 - 000000007dfdf000 (ACPI data)
132K  - BIOS-e820: 000000007dfdf000 - 000000007e000000 (ACPI NVS)
4K    - BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
8M    - BIOS-e820: 00000000ff780000 - 0000000100000000 (reserved)

1919M - limit_regions endfor: 0000000000100000 - 0000000078000000  
(usable)

> Also, what is the output of /proc/iomem and 'lspci -vv' (run as root
> please).

/proc/iomem:
   00000000-0009fbff : System RAM
     00000000-00000000 : Crash kernel
   0009fc00-0009ffff : reserved
   000a0000-000bffff : Video RAM area
   000c0000-000c7fff : Video ROM
   000c8000-000cdfff : Adapter ROM
   000f0000-000fffff : System ROM
   00100000-77ffffff : System RAM
     00400000-00623030 : Kernel code
     00623031-00744493 : Kernel data
   cfc00000-dfbfffff : PCI Bus #01
     d0000000-d7ffffff : 0000:01:00.0
       d0000000-d1ffffff : vesafb
   dfd00000-dfdfffff : PCI Bus #01
     dfde0000-dfdfffff : 0000:01:00.0
   dff60000-dff7ffff : 0000:00:09.0
   dff80000-dffbffff : 0000:00:0b.0
   dffc0000-dffdffff : 0000:00:04.0
   dfff9c00-dfff9cff : 0000:00:09.0
     dfff9c00-dfff9cff : r8169
   dfffa000-dfffafff : 0000:00:04.0
     dfffa000-dfffafff : sis900
   dfffb000-dfffbfff : 0000:00:03.0
     dfffb000-dfffbfff : ohci_hcd
   dfffc000-dfffcfff : 0000:00:03.1
     dfffc000-dfffcfff : ohci_hcd
   dfffd000-dfffdfff : 0000:00:03.2
     dfffd000-dfffdfff : ohci_hcd
   dfffe000-dfffefff : 0000:00:03.3
     dfffe000-dfffefff : ehci_hcd
   dffff000-dfffffff : 0000:00:0b.0
   e0000000-e1ffffff : 0000:00:00.0

lspci -vv:

   00:00.0 Host bridge: Silicon Integrated Systems [SiS] 661FX/M661FX/ 
M661MX Host (rev 11)
   	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR- FastB2B-
   	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort+ >SERR- <PERR-
   	Latency: 32
   	Region 0: Memory at e0000000 (32-bit, non-prefetchable) [size=32M]
   	Capabilities: [c0] AGP version 3.5
   		Status: RQ=32 Iso- ArqSz=2 Cal=3 SBA+ ITACoh- GART64- HTrans-  
64bit- FW- AGP3+ Rate=x4,x8
   		Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- FW-  
Rate=<none>

   00:01.0 PCI bridge: Silicon Integrated Systems [SiS] SiS AGP Port  
(virtual PCI-to-PCI bridge) (prog-if 00 [Normal decode])
   	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
   	Status: Cap- 66MHz+ UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 64
   	Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
   	I/O behind bridge: 0000b000-0000bfff
   	Memory behind bridge: dfd00000-dfdfffff
   	Prefetchable memory behind bridge: cfc00000-dfbfffff
   	Secondary status: 66MHz+ FastB2B- ParErr- DEVSEL=fast >TAbort-  
<TAbort- <MAbort+ <SERR- <PERR-
   	BridgeCtl: Parity- SERR+ NoISA- VGA+ MAbort- >Reset- FastB2B-

   00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS964  
[MuTIOL Media IO] (rev 36)
   	Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop-  
ParErr- Stepping- SERR- FastB2B-
   	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 0

   00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE]  
(rev 01) (prog-if 80 [Master])
   	Subsystem: Silicon Integrated Systems [SiS] SiS5513 EIDE  
Controller (A,B step)
   	Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR- FastB2B-
   	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 128
   	Region 0: I/O ports at 01f0 [size=8]
   	Region 1: I/O ports at 03f4 [size=1]
   	Region 2: I/O ports at 0170 [size=8]
   	Region 3: I/O ports at 0374 [size=1]
   	Region 4: I/O ports at ffa0 [size=16]
   	Capabilities: [58] Power Management version 2
   		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME 
(D0-,D1-,D2-,D3hot-,D3cold+)
   		Status: D0 PME-Enable- DSel=0 DScale=0 PME-

   00:02.7 Multimedia audio controller: Silicon Integrated Systems  
[SiS] AC'97 Sound Controller (rev a0)
   	Subsystem: Elitegroup Computer Systems Unknown device aa51
   	Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
   	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 64 (13000ns min, 2750ns max)
   	Interrupt: pin C routed to IRQ 22
   	Region 0: I/O ports at d000 [size=256]
   	Region 1: I/O ports at ec00 [size=128]
   	Capabilities: [48] Power Management version 2
   		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot 
+,D3cold+)
   		Status: D0 PME-Enable- DSel=0 DScale=0 PME-

   00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.0  
Controller (rev 0f) (prog-if 10 [OHCI])
   	Subsystem: Silicon Integrated Systems [SiS] USB 1.0 Controller
   	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
   	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 64 (20000ns max)
   	Interrupt: pin A routed to IRQ 16
   	Region 0: Memory at dfffb000 (32-bit, non-prefetchable) [size=4K]

   00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.0  
Controller (rev 0f) (prog-if 10 [OHCI])
   	Subsystem: Silicon Integrated Systems [SiS] USB 1.0 Controller
   	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
   	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 64 (20000ns max)
   	Interrupt: pin B routed to IRQ 17
   	Region 0: Memory at dfffc000 (32-bit, non-prefetchable) [size=4K]

   00:03.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0  
Controller (rev 0f) (prog-if 10 [OHCI])
   	Subsystem: Silicon Integrated Systems [SiS] USB 1.0 Controller
   	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
   	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 64 (20000ns max)
   	Interrupt: pin C routed to IRQ 18
   	Region 0: Memory at dfffd000 (32-bit, non-prefetchable) [size=4K]

   00:03.3 USB Controller: Silicon Integrated Systems [SiS] USB 2.0  
Controller (prog-if 20 [EHCI])
   	Subsystem: Silicon Integrated Systems [SiS] USB 2.0 Controller
   	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
   	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 64 (20000ns max)
   	Interrupt: pin D routed to IRQ 19
   	Region 0: Memory at dfffe000 (32-bit, non-prefetchable) [size=4K]
   	Capabilities: [50] Power Management version 2
   		Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0 
+,D1-,D2-,D3hot+,D3cold+)
   		Status: D0 PME-Enable- DSel=0 DScale=0 PME-

   00:04.0 Ethernet controller: Silicon Integrated Systems [SiS]  
SiS900 PCI Fast Ethernet (rev 90)
   	Subsystem: Silicon Integrated Systems [SiS] SiS900 10/100  
Ethernet Adapter
   	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
   	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 64 (13000ns min, 2750ns max)
   	Interrupt: pin A routed to IRQ 20
   	Region 0: I/O ports at c800 [size=256]
   	Region 1: Memory at dfffa000 (32-bit, non-prefetchable) [size=4K]
   	Expansion ROM at dffc0000 [disabled] [size=128K]
   	Capabilities: [40] Power Management version 2
   		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot 
+,D3cold+)
   		Status: D0 PME-Enable- DSel=0 DScale=0 PME-

   00:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd.  
RTL-8169 Gigabit Ethernet (rev 10)
   	Subsystem: Netgear Unknown device 311a
   	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
   	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 64 (8000ns min, 16000ns max), Cache Line Size: 128 bytes
   	Interrupt: pin A routed to IRQ 21
   	Region 0: I/O ports at c400 [size=256]
   	Region 1: Memory at dfff9c00 (32-bit, non-prefetchable) [size=256]
   	Expansion ROM at dff60000 [disabled] [size=128K]
   	Capabilities: [dc] Power Management version 2
   		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2 
+,D3hot+,D3cold+)
   		Status: D0 PME-Enable- DSel=0 DScale=0 PME-

   00:0b.0 SATA controller: Initio Corporation INI-1623 PCI SATA-II  
Controller (rev 02) (prog-if 00 [Vendor specific])
   	Subsystem: Initio Corporation INI-1623 PCI SATA-II Controller
   	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
   	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Latency: 64, Cache Line Size: 64 bytes
   	Interrupt: pin A routed to IRQ 10
   	Region 0: I/O ports at e800 [size=256]
   	Region 1: I/O ports at e400 [size=256]
   	Region 2: I/O ports at e000 [size=256]
   	Region 3: I/O ports at d800 [size=256]
   	Region 4: I/O ports at d400 [size=256]
   	Region 5: Memory at dffff000 (32-bit, non-prefetchable) [size=4K]
   	Expansion ROM at dff80000 [disabled] [size=256K]
   	Capabilities: [dc] Power Management version 2
   		Flags: PMEClk+ DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1+,D2+,D3hot 
+,D3cold-)
   		Status: D0 PME-Enable- DSel=0 DScale=0 PME-

   01:00.0 VGA compatible controller: Silicon Integrated Systems  
[SiS] 661/741/760 PCI/AGP or 662/761Gx PCIE VGA Display Adapter (prog- 
if 00 [VGA])
   	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR- FastB2B-
   	Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-  
<TAbort- <MAbort- >SERR- <PERR-
   	Interrupt: pin A routed to IRQ 11
   	BIST result: 00
   	Region 0: Memory at d0000000 (32-bit, prefetchable) [size=128M]
   	Region 1: Memory at dfde0000 (32-bit, non-prefetchable) [size=128K]
   	Region 2: I/O ports at bc00 [size=128]
   	Capabilities: [40] Power Management version 2
   		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME 
(D0-,D1-,D2-,D3hot-,D3cold-)
   		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
   	Capabilities: [50] AGP version 3.0
   		Status: RQ=256 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans-  
64bit- FW- AGP3+ Rate=x4,x8
   		Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- FW-  
Rate=<none>

> The BIOS may be providing a memory break at 1984MB with the remaining
> 64MB at 4GB and forgetting to add the MTRR entry for that, or it may
> be reserving that 64MB for use by ACPI/SMM/etc... and forgetting to
> mark those regions reserved in the E820 map.  Either way it's usually
> a BIOS bug, but linux should be able to work around either case
> (though that might mean some kernel changes).

While I feel it should be the manufacturer's responsibility to get  
this right, I think linux would be stronger for knowing how to deal  
with as much buggy BIOS as is out there.  I'll run bug reports up the  
flagpole as necessary if you can set me on the right track.

aside: Is it just more or is this on the uptick? - I'm seeing 'buggy  
BIOS' as the cause of so many problems recently.  I've been through  
nasty problems with nVidia, ATI, and SiS BIOS bugs, all in the past  
year, where I haven't worried much about it previously.  Intel  
chipsets are, so far, batting 1000 recently.

Thanks,
-Bill

-----
Bill McGonigle, Owner           Work: 603.448.4440
BFC Computing, LLC              Home: 603.448.1668
bill at bfccomputing.com           Cell: 603.252.2606
http://www.bfccomputing.com/    Page: 603.442.1833
New Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf



More information about the gnhlug-discuss mailing list