With that patch, you can use 4G RAM or more.
YH
-----Original Message----- From: linuxbios-bounces+yinghai.lu=amd.com@linuxbios.org [mailto:linuxbios-bounces+yinghai.lu=amd.com@linuxbios.org] On Behalf Of mcqmcqmcq@fastmail.fm Sent: Tuesday, December 12, 2006 3:03 PM To: Lu, Yinghai; linuxbios@linuxbios.org Subject: Re: [LinuxBIOS] DK8-HTX Early Hang with HTX Card Intsalled
Please check the patch.
Add option CONFIG_VAR_MTRR_HOLE to enable hole in mtrr by subtracting.
Did that, does nothing. I added the option=1 but wasn't sure it was making it into mtrr.c, so I also hard-set it there to 1 and 0 and none of those three tries affected the MTRR errors at driver load nor the contents of /proc/mtrr.
-mcq
With that patch, you can use 4G RAM or more.
I have 4GB installed. I added printks to your patch thusly:
/* Write the range mtrrs */ if (state->range_sizek != 0) { #if CONFIG_VAR_MTRR_HOLE printk_debug("write range mtrr w/_HOLE set\n"); if (state->hole_sizek == 0) { /* We need to put that on to hole */ unsigned long endk = basek + sizek; state->hole_startk = state->range_startk + state->range_sizek; state->hole_sizek = basek - state->hole_startk; state->range_sizek = endk - state->range_startk; return; } #endif state->reg = range_to_mtrr(state->reg, state->range_startk, state->range_sizek, basek, MTRR_TYPE_WRBACK, state->address_bits); #if CONFIG_VAR_MTRR_HOLE printk_debug("write range mtrr 2 w/_HOLE set\n"); state->reg = range_to_mtrr(state->reg, state->hole_startk, state->hole_sizek, basek, MTRR_TYPE_UNCACHEABLE, state->address_bits); #endif state->range_startk = 0; state->range_sizek = 0; #if CONFIG_VAR_MTRR_HOLE printk_debug("write range mtrr 3 w/_HOLE set\n"); state->hole_startk = 0; state->hole_sizek = 0; #endif } /* Allocate an msr */
And booted, seeing:
DONE fixed MTRRs DONE fixed MTRRs write range mtrr w/_HOLE set write range mtrr w/_HOLE set Setting variable MTRR 0, base: 0MB, range: 4096MB, type WB Setting variable MTRR 0, base: 0MB, range: 4096MB, type WB Setting variable MTRR 1, base: 4096MB, range: 512MB, type WB Setting variable MTRR 1, base: 4096MB, range: 512MB, type WB Setting variable MTRR 2, base: 3584MB, range: 512MB, type UC Setting variable MTRR 2, base: 3584MB, range: 512MB, type UC DONE variable MTRRs
which means that the if(sizek!=0) branch...return; is always the path taken. When linux comes up:
sh-3.1# modprobe ib_ipath PCI: No IRQ known for interrupt pin C of device 0000:40:01.0. Probably buggy MP.mtrr: type mismatch for fd500000,100000 old: write-back new: write-combining ib_ipath 0000:40:01.0: mtrr_add() WC for PIO bufs failed (-22) ib_ipath 0000:40:01.0: infinipath0: Write combining not enabled (err 22): perfor
And /proc/mtrr:
reg00: base=0x00000000 ( 0MB), size=4096MB: write-back, count=1 reg01: base=0x100000000 (4096MB), size= 512MB: write-back, count=1 reg02: base=0xe0000000 (3584MB), size= 512MB: uncachable, count=1
-mcq