# missing memory



## hedgehog (Dec 11, 2009)

greetings. i recently installed freebsd 8.0 (amd64) on zfs and there is problem: i can't use all installed 4GB memory. i have 2x2GB modules of Kingston DDR2-800

uname -srm

```
FreeBSD 8.0-RELEASE amd64
```

dmesg | grep memory

```
real memory  = 4294967296 (4096 MB)
avail memory = 3335036928 (3180 MB)
```

sysctl -a | egrep 'hw\.[a-z]*mem'

```
hw.physmem: 3456565248
hw.usermem: 2356690944
hw.realmem: 3472556032
```

the whole dmesg output:

```
dmesg
Copyright (c) 1992-2009 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009
    root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ (2198.79-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x40fb2  Stepping = 2
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x2001<SSE3,CX16>
  AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x1f<LAHF,CMP,SVM,ExtAPIC,CR8>
real memory  = 4294967296 (4096 MB)
avail memory = 3335036928 (3180 MB)
ACPI APIC Table: <A M I  OEMAPIC >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0 <Version 0.3> irqs 0-23 on motherboard
ioapic1 <Version 0.3> irqs 24-47 on motherboard
kbd1 at kbdmux0
acpi0: <A M I OEMRSDT> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, cef00000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> irq 27 at device 2.0 on pci0
pci7: <ACPI PCI bus> on pcib2
vgapci0: <VGA-compatible display> mem 0xfd000000-0xfdffffff,0xd0000000-0xdfffffff,0xfc000000-0xfcffffff irq 24 at device 0.0 on pci7
pcib3: <ACPI PCI-PCI bridge> irq 31 at device 3.0 on pci0
pci3: <ACPI PCI bus> on pcib3
pcib4: <ACPI PCI-PCI bridge> irq 35 at device 3.1 on pci0
pci4: <ACPI PCI bus> on pcib4
pcib5: <ACPI PCI-PCI bridge> irq 39 at device 3.2 on pci0
pci5: <ACPI PCI bus> on pcib5
re0: <RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet> port 0xd800-0xd8ff mem 
0xfbeff000-0xfbefffff irq 36 at device 0.0 on pci5
re0: Using 1 MSI messages
re0: Chip rev. 0x38000000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
re0: Ethernet address: 00:13:8f:b9:8b:f2
re0: [FILTER]
pcib6: <ACPI PCI-PCI bridge> irq 43 at device 3.3 on pci0
pci6: <ACPI PCI bus> on pcib6
atapci0: <JMicron JMB363 SATA300 controller> port 0xec00-0xec07,0xe880-0xe883,0xe800-0xe807,0xe480-0xe483,0xe400-0xe40f mem 
0xfbffe000-0xfbffffff irq 40 at device 0.0 on pci6
atapci0: [ITHREAD]
atapci0: AHCI called from vendor specific driver
atapci0: AHCI v1.00 controller with 2 3Gbps ports, PM supported
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci0
ata3: [ITHREAD]
ata4: <ATA channel 2> on atapci0
ata4: [ITHREAD]
vr0: <VIA VT6105 Rhine III 10/100BaseTX> port 0xb000-0xb0ff mem 0xfbcfb800-0xfbcfb8ff irq 17 at device 10.0 on pci0
vr0: Quirks: 0x0
vr0: Revision: 0x8b
miibus1: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: Ethernet address: 00:15:e9:42:16:4f
vr0: [ITHREAD]
atapci1: <VIA 8237A SATA150 controller> port 0xcc00-0xcc07,0xc880-0xc883,0xc800-0xc807,0xc480-0xc483,0xc400-0xc40f,0xc000-0xc0ff irq 21 at 
device 15.0 on pci0
atapci1: [ITHREAD]
ata5: <ATA channel 0> on atapci1
ata5: [ITHREAD]
ata6: <ATA channel 1> on atapci1
ata6: [ITHREAD]
atapci2: <VIA 8237A UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfc00-0xfc0f at device 15.1 on pci0
ata0: <ATA channel 0> on atapci2
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci2
ata1: [ITHREAD]
uhci0: <VIA 83C572 USB controller> port 0xbc00-0xbc1f irq 20 at device 16.0 on pci0
uhci0: [ITHREAD]
uhci0: LegSup = 0x0000
usbus0: <VIA 83C572 USB controller> on uhci0
uhci1: <VIA 83C572 USB controller> port 0xb880-0xb89f irq 22 at device 16.1 on pci0
uhci1: [ITHREAD]
uhci1: LegSup = 0x0000
usbus1: <VIA 83C572 USB controller> on uhci1
uhci2: <VIA 83C572 USB controller> port 0xb800-0xb81f irq 21 at device 16.2 on pci0
uhci2: [ITHREAD]
uhci2: LegSup = 0x0000
usbus2: <VIA 83C572 USB controller> on uhci2
uhci3: <VIA 83C572 USB controller> port 0xb480-0xb49f irq 23 at device 16.3 on pci0
uhci3: [ITHREAD]
uhci3: LegSup = 0x0000
usbus3: <VIA 83C572 USB controller> on uhci3
ehci0: <VIA VT6202 USB 2.0 controller> mem 0xfbcfbc00-0xfbcfbcff irq 21 at device 16.4 on pci0
ehci0: [ITHREAD]
usbus4: EHCI version 1.0
usbus4: <VIA VT6202 USB 2.0 controller> on ehci0
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
pcib7: <ACPI PCI-PCI bridge> at device 19.0 on pci0
pci2: <ACPI PCI bus> on pcib7
pci2: <multimedia, HDA> at device 1.0 (no driver attached)
acpi_button0: <Power Button> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
ACPI Warning: \\_SB_.PCI0.SBRG.FDC_._FDE: Return type mismatch - found Package, expected Buffer 20090521 nspredef-1051
fdc0: <floppy drive controller (FDE)> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FILTER]
ppc0: <Parallel port> port 0x378-0x37f,0x778-0x77b irq 7 drq 3 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/9 bytes threshold
ppc0: [ITHREAD]
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
plip0: [ITHREAD]
lpt0: <Printer> on ppbus0
lpt0: [ITHREAD]
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: [FILTER]
cpu0: <ACPI CPU> on acpi0
powernow0: <PowerNow! K8> on cpu0
cpu1: <ACPI CPU> on acpi0
powernow1: <PowerNow! K8> on cpu1
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present;
            to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
ZFS filesystem version 13
ZFS storage pool version 13
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 12Mbps Full Speed USB v1.0
usbus4: 480Mbps High Speed USB v2.0
ad0: 76319MB <WDC WD800BB-00BSA0 12.08C12> at ata0-master UDMA100
ugen0.1: <VIA> at usbus0
uhub0: <VIA UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <VIA> at usbus1
uhub1: <VIA UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <VIA> at usbus2
uhub2: <VIA UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <VIA> at usbus3
uhub3: <VIA UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
ugen4.1: <VIA> at usbus4
uhub4: <VIA EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
acd0: DVDR <HL-DT-ST DVDRAM GSA-H10N/JL10> at ata1-master UDMA33
SMP: AP CPU #1 Launched!
Root mount waiting for: usbus4 usbus3 usbus2 usbus1 usbus0
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
Root mount waiting for: usbus4
Root mount waiting for: usbus4
Root mount waiting for: usbus4
uhub4: 8 ports with 8 removable, self powered
Trying to mount root from zfs:zroot
```

system were installed according to this guide (without sysinstall):
http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot

does anyone know how may i solve it? thank you.


----------



## SirDice (Dec 11, 2009)

Go into the BIOS and turn off BIOS and video caching.


----------



## hedgehog (Dec 11, 2009)

SirDice said:
			
		

> Go into the BIOS and turn off BIOS and video caching.



thank you for response.
there is no such settings in bios (amibios, MB: ALiveSATA2-GLAN)

This if what i have googled (source - asrock FaQ):



> If you want to get 4GB memory for your system, below two conditions must be required:
> 1. The memory controller which supports memory hole(memory remap) functionality is used. The latest chipsets like Intel new chipset, or other chipsets and AMD K8 CPU architecture can support the memory hole(memory remap)



enabling memory hole option in bios/advanced setup/cpu solved my problem.

dmesg | grep memory

```
real memory  = 4294967296 (4096 MB)
avail memory = 4097728512 (3907 MB)
```

sysctl -a | egrep 'hw\.[a-z]*mem'

```
hw.physmem: 4278644736
hw.usermem: 4166696960
hw.realmem: 5368709120
```

bios POST screen now also displays proper amount of RAM installed

conclusion: google more before asking questions


----------

