From 75064d724711dc90a9ae2cfd406605fecdda449f Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 27 Feb 2007 17:13:40 +0000 Subject: [PATCH] Move qemu-i386 to qemu-x86, as per request from Uwe. Plus some small trivial reformatting of comments in stage0_i586.S Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@146 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/stage0_i586.S | 26 ++++++++------ mainboard/emulation/Kconfig | 2 +- mainboard/emulation/qemu-i386/config.h | 5 --- mainboard/emulation/qemu-i386/mainboard.c | 35 ------------------- .../emulation/{qemu-i386 => qemu-x86}/Kconfig | 4 +-- .../{qemu-i386 => qemu-x86}/Makefile | 0 .../{qemu-i386 => qemu-x86}/cmos.layout | 0 mainboard/emulation/qemu-x86/config.h | 5 +++ .../emulation/{qemu-i386 => qemu-x86}/dts | 10 +++--- .../{qemu-i386 => qemu-x86}/initram.c | 0 mainboard/emulation/qemu-x86/mainboard.c | 35 +++++++++++++++++++ .../setup_before_car.c | 0 12 files changed, 64 insertions(+), 58 deletions(-) delete mode 100644 mainboard/emulation/qemu-i386/config.h delete mode 100644 mainboard/emulation/qemu-i386/mainboard.c rename mainboard/emulation/{qemu-i386 => qemu-x86}/Kconfig (58%) rename mainboard/emulation/{qemu-i386 => qemu-x86}/Makefile (100%) rename mainboard/emulation/{qemu-i386 => qemu-x86}/cmos.layout (100%) create mode 100644 mainboard/emulation/qemu-x86/config.h rename mainboard/emulation/{qemu-i386 => qemu-x86}/dts (77%) rename mainboard/emulation/{qemu-i386 => qemu-x86}/initram.c (100%) create mode 100644 mainboard/emulation/qemu-x86/mainboard.c rename mainboard/emulation/{qemu-i386 => qemu-x86}/setup_before_car.c (100%) diff --git a/arch/x86/stage0_i586.S b/arch/x86/stage0_i586.S index 028c5a8d8d..1d6a3a83de 100644 --- a/arch/x86/stage0_i586.S +++ b/arch/x86/stage0_i586.S @@ -54,8 +54,10 @@ _stage0: movl %eax, %cr3 /* Invalidate TLB */ /* switch to protected mode */ - /* NOTE: WIth GNU assembler version 2.15.94.0.2.2 (i386-redhat-linux) using BFD version 2.15.94.0.2.2 20041220 - * this works fine without all the ld hackery and other things. So leave it as is with this comment. + + /* NOTE: With GNU assembler version 2.15.94.0.2.2 (i386-redhat-linux) + * using BFD version 2.15.94.0.2.2 20041220 this works fine without all + * the ld hackery and other things. So leave it as is with this comment. */ # movw %cs, %ax @@ -105,13 +107,17 @@ gdt16xend: .code32 -/* We have two gdts where we could have one. That is ok. - * Let's not worry about this -- optimizing gdt is pointless since we're only in it for a little bit. - * BTW note the trick below: the gdt points to ITSELF, and the first good descriptor is at offset 8. - * so you word-align the table, and then because you chose 8, - * you get a nice 64-bit aligned gdt endtry, which is - * good as this is the size of the entry. Just in case you ever wonder why people do this. - */ +/* We have two gdts where we could have one. That is ok. + * + * Let's not worry about this -- optimizing gdt is pointless since we're + * only in it for a little bit. + * + * BTW note the trick below: The GDT points to ITSELF, and the first good + * descriptor is at offset 8. So you word-align the table, and then because + * you chose 8, you get a nice 64-bit aligned GDT entry, which is good as + * this is the size of the entry. + * Just in case you ever wonder why people do this. + */ .align 4 .globl gdtptr gdt: @@ -145,7 +151,7 @@ gdt_end: * After that, we call the chipset bootstrap routine that * does what is left of the chipset initialization. * - * NOTE aligned to 4 so that we are sure that the prefetch + * NOTE: Aligned to 4 so that we are sure that the prefetch * cache will be reloaded. */ diff --git a/mainboard/emulation/Kconfig b/mainboard/emulation/Kconfig index f10484cb30..93a7107a05 100644 --- a/mainboard/emulation/Kconfig +++ b/mainboard/emulation/Kconfig @@ -17,5 +17,5 @@ config BOARD_EMULATION_QEMU_POWERPC endchoice -source "mainboard/emulation/qemu-i386/Kconfig" +source "mainboard/emulation/qemu-x86/Kconfig" diff --git a/mainboard/emulation/qemu-i386/config.h b/mainboard/emulation/qemu-i386/config.h deleted file mode 100644 index 51e37b1bc3..0000000000 --- a/mainboard/emulation/qemu-i386/config.h +++ /dev/null @@ -1,5 +0,0 @@ -extern struct chip_operations mainboard_emulation_qemu_i386_ops; - -struct mainboard_emulation_qemu_i386_config { - int nothing; -}; diff --git a/mainboard/emulation/qemu-i386/mainboard.c b/mainboard/emulation/qemu-i386/mainboard.c deleted file mode 100644 index 4530dc616d..0000000000 --- a/mainboard/emulation/qemu-i386/mainboard.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -*/ -#include -#include -#include -#include -#include -#include -// #include "dtc.h" - -char *mainboard_vendor = "emulation"; -char *mainboard_part_number = "qemu-x86"; - -static void enable_dev(struct device *dev){ - printk(BIOS_INFO, "qemu-i386 enable_dev done\n"); -} - -struct chip_operations mainboard_emulation_qemu_i386_ops = { - .name = "QEMU Mainboard", - .enable_dev = enable_dev -}; diff --git a/mainboard/emulation/qemu-i386/Kconfig b/mainboard/emulation/qemu-x86/Kconfig similarity index 58% rename from mainboard/emulation/qemu-i386/Kconfig rename to mainboard/emulation/qemu-x86/Kconfig index decbab79b5..10f44fddda 100644 --- a/mainboard/emulation/qemu-i386/Kconfig +++ b/mainboard/emulation/qemu-x86/Kconfig @@ -1,8 +1,8 @@ config MAINBOARD_NAME string - default emulation/qemu-i386 + default emulation/qemu-x86 depends BOARD_EMULATION_QEMU_X86 help This is the default mainboard name. -source northbridge/intel/i440bxemulation/Kconfig \ No newline at end of file +source northbridge/intel/i440bxemulation/Kconfig diff --git a/mainboard/emulation/qemu-i386/Makefile b/mainboard/emulation/qemu-x86/Makefile similarity index 100% rename from mainboard/emulation/qemu-i386/Makefile rename to mainboard/emulation/qemu-x86/Makefile diff --git a/mainboard/emulation/qemu-i386/cmos.layout b/mainboard/emulation/qemu-x86/cmos.layout similarity index 100% rename from mainboard/emulation/qemu-i386/cmos.layout rename to mainboard/emulation/qemu-x86/cmos.layout diff --git a/mainboard/emulation/qemu-x86/config.h b/mainboard/emulation/qemu-x86/config.h new file mode 100644 index 0000000000..f3fee40a60 --- /dev/null +++ b/mainboard/emulation/qemu-x86/config.h @@ -0,0 +1,5 @@ +extern struct chip_operations mainboard_emulation_qemu_x86_ops; + +struct mainboard_emulation_qemu_x86_config { + int nothing; +}; diff --git a/mainboard/emulation/qemu-i386/dts b/mainboard/emulation/qemu-x86/dts similarity index 77% rename from mainboard/emulation/qemu-i386/dts rename to mainboard/emulation/qemu-x86/dts index f1a66bee2d..b9a02fbac7 100644 --- a/mainboard/emulation/qemu-i386/dts +++ b/mainboard/emulation/qemu-x86/dts @@ -1,12 +1,12 @@ /{ - config="mainboard,emulation,qemu-i386"; + config="mainboard,emulation,qemu-x86"; cpus { - emulation,qemu-i386@0{ + emulation,qemu-x86@0{ enabled; on_mainboard; device_type = "cpu"; - name = "emulation,qemu-i386"; + name = "emulation,qemu-x86"; pcidomain = "0"; ops="i440bxemulation,pcidomainops"; /* the I/O stuff */ @@ -26,11 +26,11 @@ extern struct device_operations i440bxemulation_pcidomainops; -struct mainboard_emulation_qemu_i386_config root = { +struct mainboard_emulation_qemu_x86_config root = { .nothing = 1, }; struct northbridge_intel_i440bx_config northbridge_intel_440bx = { .ramsize = CONFIG_NORTHBRIDGE_INTEL_I440BXEMULATION_RAMSIZE, -}; \ No newline at end of file +}; diff --git a/mainboard/emulation/qemu-i386/initram.c b/mainboard/emulation/qemu-x86/initram.c similarity index 100% rename from mainboard/emulation/qemu-i386/initram.c rename to mainboard/emulation/qemu-x86/initram.c diff --git a/mainboard/emulation/qemu-x86/mainboard.c b/mainboard/emulation/qemu-x86/mainboard.c new file mode 100644 index 0000000000..cb8a0cfd36 --- /dev/null +++ b/mainboard/emulation/qemu-x86/mainboard.c @@ -0,0 +1,35 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include +#include +// #include "dtc.h" + +char *mainboard_vendor = "emulation"; +char *mainboard_part_number = "qemu-x86"; + +static void enable_dev(struct device *dev){ + printk(BIOS_INFO, "qemu-x86 enable_dev done\n"); +} + +struct chip_operations mainboard_emulation_qemu_x86_ops = { + .name = "QEMU Mainboard", + .enable_dev = enable_dev +}; diff --git a/mainboard/emulation/qemu-i386/setup_before_car.c b/mainboard/emulation/qemu-x86/setup_before_car.c similarity index 100% rename from mainboard/emulation/qemu-i386/setup_before_car.c rename to mainboard/emulation/qemu-x86/setup_before_car.c