From b079059d4886d4496a474a922bf01a2355aa3a70 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Mon, 21 Apr 2003 17:56:12 +0000 Subject: [PATCH] minor changes for assignirq etc. assignirq defaults to 'off' (0) --- src/arch/i386/lib/Config | 2 ++ src/arch/i386/lib/c_start.S | 7 +++++++ src/arch/i386/lib/hardwaremain.c | 6 ++++++ src/mainboard/technoland/sbc710/Config | 10 +++++----- util/flash_and_burn/flash_rom.c | 22 ++++++++++++++++++++-- util/getpir/Makefile | 2 ++ 6 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/arch/i386/lib/Config b/src/arch/i386/lib/Config index ae927bec89..d639bc6e99 100644 --- a/src/arch/i386/lib/Config +++ b/src/arch/i386/lib/Config @@ -5,7 +5,9 @@ object pirq_routing.o HAVE_PIRQ_TABLE object vgabios.o CONFIG_VGABIOS object idt.o CONFIG_REALMODE_IDT object pci-irq.c CONFIG_PCIBIOS_IRQ +object assignirq.c CONFIG_ASSIGNIRQ option CONFIG_LOGICAL_CPUS=1 option CONFIG_PCIBIOS_IRQ=0 +option CONFIG_ASSIGNIRQ=0 object c_start.S diff --git a/src/arch/i386/lib/c_start.S b/src/arch/i386/lib/c_start.S index 356c5c3a23..57acf7dc59 100644 --- a/src/arch/i386/lib/c_start.S +++ b/src/arch/i386/lib/c_start.S @@ -98,9 +98,16 @@ gdt: .word 0x0000, 0x0000 /* dummy */ .byte 0x00, 0x00, 0x00, 0x00 +#if (CONFIG_PLAN9GDT==1) +//selgdt 0x8 +/* flat data segment */ + .word 0xffff, 0x0000 + .byte 0x00, 0x93, 0xcf, 0x00 +#else // selgdt 8 .word 0x0000, 0x0000 /* dummy */ .byte 0x00, 0x00, 0x00, 0x00 +#endif // selgdt 0x10 /* flat code segment */ diff --git a/src/arch/i386/lib/hardwaremain.c b/src/arch/i386/lib/hardwaremain.c index 8ad76727b4..e22c2f430e 100644 --- a/src/arch/i386/lib/hardwaremain.c +++ b/src/arch/i386/lib/hardwaremain.c @@ -237,6 +237,9 @@ void write_tables(struct mem_range *mem) void hardwaremain(int boot_complete) { +#if CONFIG_ASSIGNIRQ == 1 + void assignirq(void); +#endif /* Processor ID of the BOOT cpu (i.e. the one running this code) */ unsigned long boot_cpu; int boot_index; @@ -358,6 +361,9 @@ void hardwaremain(int boot_complete) /* to do: intel_serial_on(); */ final_mainboard_fixup(); +#if CONFIG_ASSIGNIRQ == 1 + assignirq(); +#endif post_code(0xec); diff --git a/src/mainboard/technoland/sbc710/Config b/src/mainboard/technoland/sbc710/Config index 1273fcb2e1..fff648c2ae 100644 --- a/src/mainboard/technoland/sbc710/Config +++ b/src/mainboard/technoland/sbc710/Config @@ -18,10 +18,10 @@ mainboardinit cpu/p6/earlymtrr.inc nsuperio winbond/w83977ef keyboard=1 com1={1} com2={1} floppy=1 nsuperio winbond/w83877tf -option ENABLE_FIXED_AND_VARIABLE_MTRRS -option MTRR_ONLY_TOP_64K_FLASH +option ENABLE_FIXED_AND_VARIABLE_MTRRS=1 +option MTRR_ONLY_TOP_64K_FLASH=1 option PIIX4_DEVFN=0x38 -option NO_KEYBOARD +option NO_KEYBOARD=1 option HAVE_PIRQ_TABLE=1 option ZKERNEL_START=0xfffc0000 option ZKERNEL_MASK=0x7f @@ -34,12 +34,12 @@ option ROM_SIZE=262144 # fine. # option DOC_KERNEL_START 0 option DOC_MIL_BASE=0xd0000 -option L440BX +option L440BX=1 object mainboard.o object irq_tables.o -option UPDATE_MICROCODE +option UPDATE_MICROCODE=1 cpu p6 cpu p5 diff --git a/util/flash_and_burn/flash_rom.c b/util/flash_and_burn/flash_rom.c index 488d93270b..d80db6c1c5 100644 --- a/util/flash_and_burn/flash_rom.c +++ b/util/flash_and_burn/flash_rom.c @@ -171,6 +171,23 @@ enable_flash_vt8231(struct pci_dev *dev, char *name) { return 0; } +int +enable_flash_cs5530(struct pci_dev *dev, char *name) { + unsigned char new; + int ok; + + pci_write_byte(dev, 0x52, 0xee); + + new = pci_read_byte(dev, 0x52); + + if (new != 0xee) { + printf("tried to set register 0x%x to 0x%x on %s failed (WARNING ONLY)\n", + 0x52, new, name); + return -1; + } + return 0; +} + struct flashchip * probe_flash(struct flashchip * flash) { int fd_mem; @@ -285,6 +302,7 @@ FLASH_ENABLE enables[] = { {0x1, 0x1, "sis630 -- what's the ID?", enable_flash_sis630}, {0x8086, 0x2480, "E7500", enable_flash_e7500}, {0x1106, 0x8231, "VT8231", enable_flash_vt8231}, + {0x1078, 0x0100, "CS5530", enable_flash_cs5530}, }; int @@ -393,7 +411,7 @@ main (int argc, char * argv[]) if (read_it) { if ((image = fopen (filename, "w")) == NULL) { - perror("Error opening image file"); + perror(filename); exit(1); } printf("Reading Flash..."); @@ -403,7 +421,7 @@ main (int argc, char * argv[]) printf("done\n"); } else { if ((image = fopen (filename, "r")) == NULL) { - perror("Error opening image file"); + perror(filename); exit(1); } fread (buf, sizeof(char), size, image); diff --git a/util/getpir/Makefile b/util/getpir/Makefile index 59afc6f962..c21a194381 100644 --- a/util/getpir/Makefile +++ b/util/getpir/Makefile @@ -1,3 +1,5 @@ +# change to the path of your linuxbios tree +#LINUXBIOSROOT=/home/rminnich/src//freebios/ LINUXBIOSROOT=../.. INCLUDEPATH=$(LINUXBIOSROOT)/src/arch/i386/include/arch