Eric,
As for cpufixup.c, actually I grab the fragment from raminit.c's
set_top_ram.
I don't want to make my own, because I can not access the most update code
because of 24 hours delay.
Fill_last:
Can someone raise the bug to LinuxKernel developer team?
There are Config.lb and config.lb in the southbridge/amd/amd8111.
We should get rid of config.lb.
Regards
Yinghai Lu
-----邮件原件-----
发件人: ebiederman@lnxi.com [mailto:ebiederman@lnxi.com]
发送时间: 2003年8月4日 16:35
收件人: ron minnich
抄送: linuxbios@clustermatic.org
主题: Re: Yh Lu's patches
ron minnich rminnich@lanl.gov writes:
Can Eric and Stefan and others interested please take a quick look at
this, it is the non-tyan mods from Yh Lu.
I am going to commit the tyan mods in a few minutes.
thanks
ron
diff -uNr ./freebios2/src/cpu/k8/cpufixup.c
../freebios2/src/cpu/k8/cpufixup.c
--- ./freebios2/src/cpu/k8/cpufixup.c 2003-08-04 17:57:43.000000000 -0400
+++ ../freebios2/src/cpu/k8/cpufixup.c 2003-08-04
19:41:18.000000000 -0400
@@ -29,15 +29,28 @@
mmio_basek = tomk;
}
- /* Setup TOP_MEM */
- msr.hi = mmio_basek >> 22;
- msr.lo = mmio_basek << 10;
- wrmsr(TOP_MEM, msr);
+#if 1
+#endif
/* Now set top of memory */
msr.lo = (tomk & 0x003fffff) << 10;
msr.hi = (tomk & 0xffc00000) >> 22;
wrmsr(TOP_MEM2, msr);
/* Leave a 64M hole between TOP_MEM and TOP_MEM2
* so I can see my rom chip and other I/O devices.
*/
if (tomk >= 0x003f0000) {
tomk = 0x3f0000;
} // tom_k = 0x3c0000;
msr.lo = (tomk & 0x003fffff) << 10;
msr.hi = (tomk & 0xffc00000) >> 22;
wrmsr(TOP_MEM, msr);
This bit is redundant.
I described the change to Yinghai Lu and he made is own version of it.
And in fact it is actively wrong. mmio_basek does a much better job
of leaving an I/O hole there, then simply subtracting 64MB from 4GB.
diff -uNr ./freebios2/src/include/console/console.h
../freebios2/src/include/console/console.h
--- ./freebios2/src/include/console/console.h 2003-07-19
00:28:21.000000000
-0400
+++ ../freebios2/src/include/console/console.h 2003-08-02
01:40:57.000000000
-0400
@@ -92,34 +92,34 @@
#define print_debug_char(CH) printk_debug ("%c", (CH))
#define print_spew_char(CH) printk_spew ("%c", (CH))
-#define print_emerg_hex8(HEX) printk_emerg ("%08x", (HEX))
-#define print_alert_hex8(HEX) printk_alert ("%08x", (HEX))
-#define print_crit_hex8(HEX) printk_crit ("%08x", (HEX))
-#define print_err_hex8(HEX) printk_err ("%08x", (HEX))
-#define print_warning_hex8(HEX) printk_warning("%08x", (HEX))
-#define print_notice_hex8(HEX) printk_notice ("%08x", (HEX))
-#define print_info_hex8(HEX) printk_info ("%08x", (HEX))
-#define print_debug_hex8(HEX) printk_debug ("%08x", (HEX))
-#define print_spew_hex8(HEX) printk_spew ("%08x", (HEX))
+#define print_emerg_hex8(HEX) printk_emerg ("%02x", (HEX))
+#define print_alert_hex8(HEX) printk_alert ("%02x", (HEX))
+#define print_crit_hex8(HEX) printk_crit ("%02x", (HEX))
+#define print_err_hex8(HEX) printk_err ("%02x", (HEX))
+#define print_warning_hex8(HEX) printk_warning("%02x", (HEX))
+#define print_notice_hex8(HEX) printk_notice ("%02x", (HEX))
+#define print_info_hex8(HEX) printk_info ("%02x", (HEX))
+#define print_debug_hex8(HEX) printk_debug ("%02x", (HEX))
+#define print_spew_hex8(HEX) printk_spew ("%02x", (HEX))
-#define print_emerg_hex16(HEX) printk_emerg ("%016x", (HEX))
-#define print_alert_hex16(HEX) printk_alert ("%016x", (HEX))
-#define print_crit_hex16(HEX) printk_crit ("%016x", (HEX))
-#define print_err_hex16(HEX) printk_err ("%016x", (HEX))
-#define print_warning_hex16(HEX) printk_warning("%016x", (HEX))
-#define print_notice_hex16(HEX) printk_notice ("%016x", (HEX))
-#define print_info_hex16(HEX) printk_info ("%016x", (HEX))
-#define print_debug_hex16(HEX) printk_debug ("%016x", (HEX))
-#define print_spew_hex16(HEX) printk_spew ("%016x", (HEX))
+#define print_emerg_hex16(HEX) printk_emerg ("%04x", (HEX))
+#define print_alert_hex16(HEX) printk_alert ("%04x", (HEX))
+#define print_crit_hex16(HEX) printk_crit ("%04x", (HEX))
+#define print_err_hex16(HEX) printk_err ("%04x", (HEX))
+#define print_warning_hex16(HEX) printk_warning("%04x", (HEX))
+#define print_notice_hex16(HEX) printk_notice ("%04x", (HEX))
+#define print_info_hex16(HEX) printk_info ("%04x", (HEX))
+#define print_debug_hex16(HEX) printk_debug ("%04x", (HEX))
+#define print_spew_hex16(HEX) printk_spew ("%04x", (HEX))
-#define print_emerg_hex32(HEX) printk_emerg ("%032x", (HEX))
-#define print_alert_hex32(HEX) printk_alert ("%032x", (HEX))
-#define print_crit_hex32(HEX) printk_crit ("%032x", (HEX))
-#define print_err_hex32(HEX) printk_err ("%032x", (HEX))
-#define print_warning_hex32(HEX) printk_warning("%032x", (HEX))
-#define print_notice_hex32(HEX) printk_notice ("%032x", (HEX))
-#define print_info_hex32(HEX) printk_info ("%032x", (HEX))
-#define print_debug_hex32(HEX) printk_debug ("%032x", (HEX))
-#define print_spew_hex32(HEX) printk_spew ("%032x", (HEX))
+#define print_emerg_hex32(HEX) printk_emerg ("%08x", (HEX))
+#define print_alert_hex32(HEX) printk_alert ("%08x", (HEX))
+#define print_crit_hex32(HEX) printk_crit ("%08x", (HEX))
+#define print_err_hex32(HEX) printk_err ("%08x", (HEX))
+#define print_warning_hex32(HEX) printk_warning("%08x", (HEX))
+#define print_notice_hex32(HEX) printk_notice ("%08x", (HEX))
+#define print_info_hex32(HEX) printk_info ("%08x", (HEX))
+#define print_debug_hex32(HEX) printk_debug ("%08x", (HEX))
+#define print_spew_hex32(HEX) printk_spew ("%08x", (HEX))
This bit is reasonable. I thought I had already committed it but...
I typoed and did bit widths instead of nibble widths.
diff -uNr ./freebios2/src/northbridge/amd/amdk8/raminit.c
../freebios2/src/northbridge/amd/amdk8/raminit.c
--- ./freebios2/src/northbridge/amd/amdk8/raminit.c 2003-08-04
17:59:30.000000000 -0400
+++ ../freebios2/src/northbridge/amd/amdk8/raminit.c 2003-08-04
18:47:31.000000000 -0400
@@ -1124,6 +1124,23 @@
}
}
+//BY LYH //Fill next base reg with right value
+static void fill_last(unsigned long node_id,unsigned long base)
+{
unsigned i;
unsigned base_reg;
base &=0xffff0000;
device_t device;
- for(device = PCI_DEV(0, 0x18, 1); device <= PCI_DEV(0, 0x1f, 1); device
++= PCI_DEV(0, 1, 0)) {
for(i=node_id+1;i<=7;i++) {
base_reg=0x40+(i<<3);
pci_write_config32(device,base_reg,base);
}
}
+}
+//BY LYH END
static void route_dram_accesses(const struct mem_controller *ctrl,
unsigned long base_k, unsigned long limit_k)
{
@@ -1276,6 +1293,9 @@
print_debug("\r\n");
#endif
route_dram_accesses(ctrl, base_k, tom_k);
+//BY LYH
+//BY LYH END
set_top_mem(tom_k);
}
This is a bug fix for a buggy kernel. It is extra code but it should
not be a real problem.
diff -uNr ./freebios2/src/southbridge/amd/amd8111/config.lb
../freebios2/src/southbridge/amd/amd8111/config.lb
--- ./freebios2/src/southbridge/amd/amd8111/config.lb 2003-06-17
12:51:05.000000000 -0400
+++ ../freebios2/src/southbridge/amd/amd8111/config.lb 1969-12-31
19:00:00.000000000 -0500
@@ -1,4 +0,0 @@
-driver amd8111_usb.o
-driver amd8111_lpc.o
-driver amd8111_ide.o
-driver amd8111_acpi.o
Hmm. Removing all of those driver statements looks wrong...
Eric
_______________________________________________
Linuxbios mailing list
Linuxbios@clustermatic.org
http://www.clustermatic.org/mailman/listinfo/linuxbios