From a7b42b23e1889f00dc65b82b1bfdda66fe70c2c1 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Fri, 13 Jan 2006 17:36:27 +0000 Subject: [PATCH] - removed static MP tables from rombios.c and MP bios images from Makefile --- Makefile.in | 39 +------- rombios.c | 327 ------------------------------------------------------------ 2 files changed, 4 insertions(+), 362 deletions(-) diff --git a/Makefile.in b/Makefile.in index dbf85c3..f1784ff 100644 --- a/Makefile.in +++ b/Makefile.in @@ -57,12 +57,11 @@ BIOS_BUILD_DATE = "-DBIOS_BUILD_DATE=\"$(BUILDDATE)\"" $(CXX) -c $(BX_INCDIRS) $(CXXFLAGS) $(LOCAL_CXXFLAGS) @CXXFP@$< @OFP@$@ -bios: biossums BIOS-bochs-latest BIOS-bochs-2-processors BIOS-bochs-4-processors BIOS-bochs-8-processors +bios: biossums BIOS-bochs-latest clean: - @RMCOMMAND@ *.o *.a *.s rombios.bin _rombios*_.c - @RMCOMMAND@ as86-sym.txt ld86-sym.txt - @RMCOMMAND@ rombios*.txt rombios*.sym usage biossums + @RMCOMMAND@ *.o *.a *.s _rombios*_.c rombios*.txt rombios*.sym + @RMCOMMAND@ usage biossums dist-clean: clean @RMCOMMAND@ Makefile @@ -71,7 +70,7 @@ bios-clean: @RMCOMMAND@ BIOS-bochs-* BIOS-bochs-latest: rombios.c apmbios.S biossums - $(GCC) -DBX_SMP_PROCESSORS=1 $(BIOS_BUILD_DATE) -E -P $< > _rombios_.c + $(GCC) $(BIOS_BUILD_DATE) -E -P $< > _rombios_.c $(BCC) -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s $(AS86) _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt @@ -80,35 +79,5 @@ BIOS-bochs-latest: rombios.c apmbios.S biossums ./biossums BIOS-bochs-latest rm -f _rombios_.s -BIOS-bochs-2-processors: rombios.c apmbios.S biossums - $(GCC) -DBX_SMP_PROCESSORS=2 $(BIOS_BUILD_DATE) -E -P $< > _rombios2_.c - $(BCC) -o rombios2.s -C-c -D__i86__ -0 -S _rombios2_.c - sed -e 's/^\.text//' -e 's/^\.data//' rombios2.s > _rombios2_.s - $(AS86) _rombios2_.s -b tmp2.bin -u- -w- -g -0 -j -O -l rombios2.txt - -perl ${srcdir}/makesym.perl < rombios2.txt > rombios2.sym - mv tmp2.bin BIOS-bochs-2-processors - ./biossums BIOS-bochs-2-processors - rm -f _rombios2_.s - -BIOS-bochs-4-processors: rombios.c apmbios.S biossums - $(GCC) -DBX_SMP_PROCESSORS=4 $(BIOS_BUILD_DATE) -E -P $< > _rombios4_.c - $(BCC) -o rombios4.s -C-c -D__i86__ -0 -S _rombios4_.c - sed -e 's/^\.text//' -e 's/^\.data//' rombios4.s > _rombios4_.s - $(AS86) _rombios4_.s -b tmp4.bin -u- -w- -g -0 -j -O -l rombios4.txt - -perl ${srcdir}/makesym.perl < rombios4.txt > rombios4.sym - mv tmp4.bin BIOS-bochs-4-processors - ./biossums BIOS-bochs-4-processors - rm -f _rombios4_.s - -BIOS-bochs-8-processors: rombios.c apmbios.S biossums - $(GCC) -DBX_SMP_PROCESSORS=8 $(BIOS_BUILD_DATE) -E -P $< > _rombios8_.c - $(BCC) -o rombios8.s -C-c -D__i86__ -0 -S _rombios8_.c - sed -e 's/^\.text//' -e 's/^\.data//' rombios8.s > _rombios8_.s - $(AS86) _rombios8_.s -b tmp8.bin -u- -w- -g -0 -j -O -l rombios8.txt - -perl ${srcdir}/makesym.perl < rombios8.txt > rombios8.sym - mv tmp8.bin BIOS-bochs-8-processors - ./biossums BIOS-bochs-8-processors - rm -f _rombios8_.s - biossums: biossums.c $(GCC) -o biossums biossums.c diff --git a/rombios.c b/rombios.c index 626f2c9..dc3dd29 100644 --- a/rombios.c +++ b/rombios.c @@ -193,11 +193,6 @@ # error APM BIOS can only be used with 386+ cpu #endif -#ifndef BX_SMP_PROCESSORS -#define BX_SMP_PROCESSORS 1 -# warning BX_SMP_PROCESSORS not defined, defaulting to 1 -#endif - #define PANIC_PORT 0x400 #define PANIC_PORT2 0x401 #define INFO_PORT 0x402 @@ -1821,11 +1816,6 @@ print_bios_banner() { printf(BX_APPNAME" BIOS - build: %s\n%s\nOptions: ", BIOS_BUILD_DATE, bios_cvs_version_string); -#if BX_SMP_PROCESSORS > 1 - printf("smp (%d cpus) ", BX_SMP_PROCESSORS); -#else - printf("1 cpu "); -#endif printf( #ifdef BX_APM "apmbios " @@ -10509,321 +10499,4 @@ static Bit8u vgafont8[128*8]= ASM_START .org 0xcc00 // bcc-generated data will be placed here - -// For documentation of this config structure, look on developer.intel.com and -// search for multiprocessor specification. Note that when you change anything -// you must update the checksum (a pain!). It would be better to construct this -// with C structures, or at least fill in the checksum automatically. -// -// Maybe this structs could be moved elsewhere than d000 - -#if (BX_SMP_PROCESSORS==1) - // no structure necessary. -#elif (BX_SMP_PROCESSORS==2) -// define the Intel MP Configuration Structure for 2 processors at -// APIC ID 0,1. I/O APIC at ID=2. -.align 16 -mp_config_table: - db 0x50, 0x43, 0x4d, 0x50 ;; "PCMP" signature - dw (mp_config_end-mp_config_table) ;; table length - db 4 ;; spec rev - db 0x65 ;; checksum - .ascii "BOCHSCPU" ;; OEM id = "BOCHSCPU" - db 0x30, 0x2e, 0x31, 0x20 ;; vendor id = "0.1 " - db 0x20, 0x20, 0x20, 0x20 - db 0x20, 0x20, 0x20, 0x20 - dw 0,0 ;; oem table ptr - dw 0 ;; oem table size - dw 20 ;; entry count - dw 0x0000, 0xfee0 ;; memory mapped address of local APIC - dw 0 ;; extended table length - db 0 ;; extended table checksum - db 0 ;; reserved -mp_config_proc0: - db 0 ;; entry type=processor - db 0 ;; local APIC id - db 0x11 ;; local APIC version number - db 3 ;; cpu flags: enabled, bootstrap processor - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc1: - db 0 ;; entry type=processor - db 1 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_isa_bus: - db 1 ;; entry type=bus - db 0 ;; bus ID - db 0x49, 0x53, 0x41, 0x20, 0x20, 0x20 ;; bus type="ISA " -mp_config_ioapic: - db 2 ;; entry type=I/O APIC - db 2 ;; apic id=2. linux will set. - db 0x11 ;; I/O APIC version number - db 1 ;; flags=1=enabled - dw 0x0000, 0xfec0 ;; memory mapped address of I/O APIC -mp_config_irqs: - db 3 ;; entry type=I/O interrupt - db 0 ;; interrupt type=vectored interrupt - db 0,0 ;; flags po=0, el=0 (linux uses as default) - db 0 ;; source bus ID is ISA - db 0 ;; source bus IRQ - db 2 ;; destination I/O APIC ID - db 0 ;; destination I/O APIC interrrupt in - ;; repeat pattern for interrupts 0-15 - db 3,0,0,0,0,1,2,1 - db 3,0,0,0,0,2,2,2 - db 3,0,0,0,0,3,2,3 - db 3,0,0,0,0,4,2,4 - db 3,0,0,0,0,5,2,5 - db 3,0,0,0,0,6,2,6 - db 3,0,0,0,0,7,2,7 - db 3,0,0,0,0,8,2,8 - db 3,0,0,0,0,9,2,9 - db 3,0,0,0,0,10,2,10 - db 3,0,0,0,0,11,2,11 - db 3,0,0,0,0,12,2,12 - db 3,0,0,0,0,13,2,13 - db 3,0,0,0,0,14,2,14 - db 3,0,0,0,0,15,2,15 -#elif (BX_SMP_PROCESSORS==4) -// define the Intel MP Configuration Structure for 4 processors at -// APIC ID 0,1,2,3. I/O APIC at ID=4. -.align 16 -mp_config_table: - db 0x50, 0x43, 0x4d, 0x50 ;; "PCMP" signature - dw (mp_config_end-mp_config_table) ;; table length - db 4 ;; spec rev - db 0xdd ;; checksum - .ascii "BOCHSCPU" ;; OEM id = "BOCHSCPU" - db 0x30, 0x2e, 0x31, 0x20 ;; vendor id = "0.1 " - db 0x20, 0x20, 0x20, 0x20 - db 0x20, 0x20, 0x20, 0x20 - dw 0,0 ;; oem table ptr - dw 0 ;; oem table size - dw 22 ;; entry count - dw 0x0000, 0xfee0 ;; memory mapped address of local APIC - dw 0 ;; extended table length - db 0 ;; extended table checksum - db 0 ;; reserved -mp_config_proc0: - db 0 ;; entry type=processor - db 0 ;; local APIC id - db 0x11 ;; local APIC version number - db 3 ;; cpu flags: enabled, bootstrap processor - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc1: - db 0 ;; entry type=processor - db 1 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc2: - db 0 ;; entry type=processor - db 2 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc3: - db 0 ;; entry type=processor - db 3 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_isa_bus: - db 1 ;; entry type=bus - db 0 ;; bus ID - db 0x49, 0x53, 0x41, 0x20, 0x20, 0x20 ;; bus type="ISA " -mp_config_ioapic: - db 2 ;; entry type=I/O APIC - db 4 ;; apic id=4. linux will set. - db 0x11 ;; I/O APIC version number - db 1 ;; flags=1=enabled - dw 0x0000, 0xfec0 ;; memory mapped address of I/O APIC -mp_config_irqs: - db 3 ;; entry type=I/O interrupt - db 0 ;; interrupt type=vectored interrupt - db 0,0 ;; flags po=0, el=0 (linux uses as default) - db 0 ;; source bus ID is ISA - db 0 ;; source bus IRQ - db 4 ;; destination I/O APIC ID - db 0 ;; destination I/O APIC interrrupt in - ;; repeat pattern for interrupts 0-15 - db 3,0,0,0,0,1,4,1 - db 3,0,0,0,0,2,4,2 - db 3,0,0,0,0,3,4,3 - db 3,0,0,0,0,4,4,4 - db 3,0,0,0,0,5,4,5 - db 3,0,0,0,0,6,4,6 - db 3,0,0,0,0,7,4,7 - db 3,0,0,0,0,8,4,8 - db 3,0,0,0,0,9,4,9 - db 3,0,0,0,0,10,4,10 - db 3,0,0,0,0,11,4,11 - db 3,0,0,0,0,12,4,12 - db 3,0,0,0,0,13,4,13 - db 3,0,0,0,0,14,4,14 - db 3,0,0,0,0,15,4,15 -#elif (BX_SMP_PROCESSORS==8) -// define the Intel MP Configuration Structure for 8 processors at -// APIC ID 0,1,2,3,4,5,6,7. I/O APIC at ID=8. -.align 16 -mp_config_table: - db 0x50, 0x43, 0x4d, 0x50 ;; "PCMP" signature - dw (mp_config_end-mp_config_table) ;; table length - db 4 ;; spec rev - db 0xc3 ;; checksum - .ascii "BOCHSCPU" ;; OEM id = "BOCHSCPU" - db 0x30, 0x2e, 0x31, 0x20 ;; vendor id = "0.1 " - db 0x20, 0x20, 0x20, 0x20 - db 0x20, 0x20, 0x20, 0x20 - dw 0,0 ;; oem table ptr - dw 0 ;; oem table size - dw 26 ;; entry count - dw 0x0000, 0xfee0 ;; memory mapped address of local APIC - dw 0 ;; extended table length - db 0 ;; extended table checksum - db 0 ;; reserved -mp_config_proc0: - db 0 ;; entry type=processor - db 0 ;; local APIC id - db 0x11 ;; local APIC version number - db 3 ;; cpu flags: enabled, bootstrap processor - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc1: - db 0 ;; entry type=processor - db 1 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc2: - db 0 ;; entry type=processor - db 2 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc3: - db 0 ;; entry type=processor - db 3 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc4: - db 0 ;; entry type=processor - db 4 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc5: - db 0 ;; entry type=processor - db 5 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc6: - db 0 ;; entry type=processor - db 6 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_proc7: - db 0 ;; entry type=processor - db 7 ;; local APIC id - db 0x11 ;; local APIC version number - db 1 ;; cpu flags: enabled - db 0,6,0,0 ;; cpu signature - dw 0x201,0 ;; feature flags - dw 0,0 ;; reserved - dw 0,0 ;; reserved -mp_config_isa_bus: - db 1 ;; entry type=bus - db 0 ;; bus ID - db 0x49, 0x53, 0x41, 0x20, 0x20, 0x20 ;; bus type="ISA " -mp_config_ioapic: - db 2 ;; entry type=I/O APIC - db 8 ;; apic id=8 - db 0x11 ;; I/O APIC version number - db 1 ;; flags=1=enabled - dw 0x0000, 0xfec0 ;; memory mapped address of I/O APIC -mp_config_irqs: - db 3 ;; entry type=I/O interrupt - db 0 ;; interrupt type=vectored interrupt - db 0,0 ;; flags po=0, el=0 (linux uses as default) - db 0 ;; source bus ID is ISA - db 0 ;; source bus IRQ - db 8 ;; destination I/O APIC ID - db 0 ;; destination I/O APIC interrrupt in - ;; repeat pattern for interrupts 0-15 - db 3,0,0,0,0,1,8,1 - db 3,0,0,0,0,2,8,2 - db 3,0,0,0,0,3,8,3 - db 3,0,0,0,0,4,8,4 - db 3,0,0,0,0,5,8,5 - db 3,0,0,0,0,6,8,6 - db 3,0,0,0,0,7,8,7 - db 3,0,0,0,0,8,8,8 - db 3,0,0,0,0,9,8,9 - db 3,0,0,0,0,10,8,10 - db 3,0,0,0,0,11,8,11 - db 3,0,0,0,0,12,8,12 - db 3,0,0,0,0,13,8,13 - db 3,0,0,0,0,14,8,14 - db 3,0,0,0,0,15,8,15 -#else -# error Sorry, rombios only has configurations for 1, 2, 4 or 8 processors. -#endif // if (BX_SMP_PROCESSORS==...) - -mp_config_end: // this label used to find length of mp structure - db 0 - -#if (BX_SMP_PROCESSORS>1) -.align 16 -mp_floating_pointer_structure: -db 0x5f, 0x4d, 0x50, 0x5f ; "_MP_" signature -dw mp_config_table, 0xf ;; pointer to MP configuration table -db 1 ;; length of this struct in 16-bit byte chunks -db 4 ;; MP spec revision -db 0xc1 ;; checksum -db 0 ;; MP feature byte 1. value 0 means look at the config table -db 0,0,0,0 ;; MP feature bytes 2-5. -#endif - ASM_END -- 2.11.4.GIT