From f85eb0d48edf922182e0cd73006e710f7f6a9cd9 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Tue, 22 Jan 2002 02:26:47 +0000 Subject: [PATCH] k7sem support --- src/mainboard/elitegroup/k7sem/Config | 5 ++- src/mainboard/elitegroup/k7sem/irq_tables.c | 43 +++++++++++---------- src/mainboard/elitegroup/k7sem/mainboard.c | 13 +++++++ src/northsouthbridge/sis/730/ipl.S | 4 -- 4 files changed, 40 insertions(+), 25 deletions(-) diff --git a/src/mainboard/elitegroup/k7sem/Config b/src/mainboard/elitegroup/k7sem/Config index e32c043110..d853e3ca10 100644 --- a/src/mainboard/elitegroup/k7sem/Config +++ b/src/mainboard/elitegroup/k7sem/Config @@ -15,7 +15,10 @@ mainboardinit cpu/p6/earlymtrr.inc option ENABLE_FIXED_AND_VARIABLE_MTRRS=1 option FINAL_MAINBOARD_FIXUP=1 option HAVE_PIRQ_TABLE=1 -option CONFIG_SIS_DISABLE_ETHERNET +option DISABLE_INTERNAL_DEVICES + +# this makes ipl.S too big +#option CONFIG_SIS_DISABLE_ETHERNET object mainboard.o object irq_tables.o keyboard pc80 diff --git a/src/mainboard/elitegroup/k7sem/irq_tables.c b/src/mainboard/elitegroup/k7sem/irq_tables.c index 3c779c48b7..64589566b0 100644 --- a/src/mainboard/elitegroup/k7sem/irq_tables.c +++ b/src/mainboard/elitegroup/k7sem/irq_tables.c @@ -1,27 +1,30 @@ +/* This file was generated by getpir.c, do not modify! + (but if you do, please run checkpir on it to verify) + Contains the IRQ Routing Table dumped directly from your memory , wich BIOS sets up + + Documentation at : http://www.microsoft.com/hwdev/busbios/PCIIRQ.HTM +*/ + #include -#define CHECKSUM 0x14 const struct irq_routing_table intel_irq_routing_table = { - PIRQ_SIGNATURE, /* u32 signature */ - PIRQ_VERSION, /* u16 version */ - 32+16*4, /* there can be total 5 devices on the bus */ - 0x00, /* Bus 0 */ - 0x08, /* Device 1, Function 0 */ - 0x0000, /* reserve IRQ 11, 9, 5, for PCI */ - 0x1039, /* Silicon Integrated System */ - 0x0008, /* SiS 85C503/5513 ISA Bridge */ - 0x00, /* u8 miniport_data - "crap" */ + PIRQ_SIGNATURE, /* u32 signature */ + PIRQ_VERSION, /* u16 version */ + 32+16*6, /* there can be total 6 devices on the bus */ + 0, /* Where the interrupt router lies (bus) */ + 0x8, /* Where the interrupt router lies (dev) */ + 0x828, /* IRQs devoted exclusively to PCI usage */ + 0x1039, /* Vendor */ + 0x8, /* Device */ + 0, /* Crap (miniport) */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */ - CHECKSUM, /* u8 checksum - mod 256 checksum must give zero */ + 0x1b, /* u8 checksum , this hase to set to some value that would give 0 after the sum of all bytes for this structure (including checksum) */ { - /* bus, devfn, {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap}, slot, rfu */ - {0x00, 0x08, {{0x41, 0xdcb8}, {0x42, 0xdcb8}, {0x43, 0xdcb8}, {0x44, 0xdcb8}}, - 0x00, 0x00}, - {0x00, 0x10, {{0x41, 0xdcb8}, {0x42, 0xdcb8}, {0x43, 0xdcb8}, {0x44, 0xdcb8}}, - 0x00, 0x00}, - {0x00, 0x48, {{0x41, 0xdcb8}, {0x42, 0xdcb8}, {0x43, 0xdcb8}, {0x44, 0xdcb8}}, - 0x01, 0x00}, - {0x00, 0x58, {{0x43, 0xdcb8}, {0x44, 0xdcb8}, {0x41, 0xdcb8}, {0x42, 0xdcb8}}, - 0x02, 0x00}, + {0,0x48, {{0x42, 0xdef8}, {0x43, 0xdef8}, {0x44, 0xdef8}, {0x41, 0xdef8}}, 0x1, 0}, + {0,0x58, {{0x43, 0xdef8}, {0x44, 0xdef8}, {0x41, 0xdef8}, {0x42, 0xdef8}}, 0x2, 0}, + {0,0x68, {{0x44, 0xdef8}, {0x41, 0xdef8}, {0x42, 0xdef8}, {0x43, 0xdef8}}, 0x3, 0}, + {0,0x1, {{0x61, 0xdef8}, {0, 0xdef8}, {0, 0xdef8}, {0, 0xdef8}}, 0, 0}, + {0,0x10, {{0x41, 0xdef8}, {0x42, 0xdef8}, {0x43, 0xdef8}, {0x44, 0xdef8}}, 0, 0}, + {0,0xa, {{0x41, 0xdef8}, {0x42, 0xdef8}, {0x43, 0xdef8}, {0x44, 0xdef8}}, 0, 0}, } }; diff --git a/src/mainboard/elitegroup/k7sem/mainboard.c b/src/mainboard/elitegroup/k7sem/mainboard.c index 599ded48c2..e49cd1afa3 100644 --- a/src/mainboard/elitegroup/k7sem/mainboard.c +++ b/src/mainboard/elitegroup/k7sem/mainboard.c @@ -13,8 +13,21 @@ final_mainboard_fixup(void) void final_southbridge_fixup(void); void final_superio_fixup(void); extern unsigned long slotsizeM[]; + printk_info("elitegroup k7sem (and similar)..."); +#if 0 + // THIS WORKS in the sense of turning it off. + // but it happens too late in the game. + printk_info("disabling sis 900 ethernet, old val 0x%x\n", + pcibios_read_config_byte(0, 0x8, 0x7c)); + + pcibios_write_config_byte(0, 0x8, 0x7c, 0x0f); + + printk_info("disabling sis 900 ethernet, new val 0x%x\n", + pcibios_read_config_byte(0, 0x8, 0x7c)); +#endif + // we need to fix up the K7 MSRs. // to do this, we get the DIMM sizes in slot1 and 2, and // call fixk7msr_2dimms diff --git a/src/northsouthbridge/sis/730/ipl.S b/src/northsouthbridge/sis/730/ipl.S index 0d719b2e22..205e5ad97a 100644 --- a/src/northsouthbridge/sis/730/ipl.S +++ b/src/northsouthbridge/sis/730/ipl.S @@ -55,10 +55,6 @@ sis730spd_start: movw $0x5501, %ax # Mode# enable, this bit CALL_SP(write_pci_register) # should be set before sizing. -#ifdef CONFIG_SIS_DISABLE_ETHERNET - mowv $0x7c0f, %ax - CALL_SP(write_lpc_register) -#endif #ifdef SIZE_ALL xorw %bx, %bx # clear %fs, %fs is used as "bitmap" of