Author: stepan Date: 2009-10-24 02:47:07 +0200 (Sat, 24 Oct 2009) New Revision: 4832
Added: trunk/coreboot-v2/src/arch/i386/include/arch/registers.h Modified: trunk/coreboot-v2/src/arch/i386/lib/exception.c trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah/apc_auto.c trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah_fam10/apc_auto.c trunk/coreboot-v2/src/mainboard/gigabyte/ga_2761gxdk/apc_auto.c trunk/coreboot-v2/src/mainboard/gigabyte/m57sli/apc_auto.c trunk/coreboot-v2/src/mainboard/msi/ms7260/apc_auto.c trunk/coreboot-v2/src/mainboard/nvidia/l1_2pvv/apc_auto.c trunk/coreboot-v2/src/mainboard/supermicro/h8dme/apc_auto.c trunk/coreboot-v2/src/mainboard/supermicro/h8dmr/apc_auto.c trunk/coreboot-v2/src/mainboard/tyan/s2912/apc_auto.c trunk/coreboot-v2/src/mainboard/tyan/s2912_fam10/apc_auto.c trunk/coreboot-v2/util/x86emu/x86.c trunk/coreboot-v2/util/x86emu/x86_interrupts.c Log: move all register fram definitions to arch/register.h
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Added: trunk/coreboot-v2/src/arch/i386/include/arch/registers.h =================================================================== --- trunk/coreboot-v2/src/arch/i386/include/arch/registers.h (rev 0) +++ trunk/coreboot-v2/src/arch/i386/include/arch/registers.h 2009-10-24 00:47:07 UTC (rev 4832) @@ -0,0 +1,34 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2009 coresystems GmbH + * + * 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; version 2 of + * the License. + * + * 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 + */ + +#ifndef __ARCH_REGISTERS_H +#define __ARCH_REGISTERS_H + +struct eregs { + uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; + uint32_t vector; + uint32_t error_code; + uint32_t eip; + uint32_t cs; + uint32_t eflags; +}; + +#endif
Modified: trunk/coreboot-v2/src/arch/i386/lib/exception.c =================================================================== --- trunk/coreboot-v2/src/arch/i386/lib/exception.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/arch/i386/lib/exception.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -359,14 +359,7 @@ } #endif /* CONFIG_GDB_STUB */
-struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -}; +#include <arch/registers.h>
void x86_exception(struct eregs *info) {
Modified: trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -102,15 +102,9 @@
} -struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -};
+#include <arch/registers.h> + void x86_exception(struct eregs *info) { do {
Modified: trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c =================================================================== --- trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -43,7 +43,7 @@ printk_debug(" %02x", (unsigned char)*((unsigned char *)i)); } print_debug("\n"); - } +} #endif
extern u8 AmlCode[];
Modified: trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah_fam10/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah_fam10/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah_fam10/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -96,15 +96,9 @@
} -struct eregs { - u32 eax, ecx, edx, ebx, esp, ebp, esi, edi; - u32 vector; - u32 error_code; - u32 eip; - u32 cs; - u32 eflags; -};
+#include <arch/registers.h> + void x86_exception(struct eregs *info) { do {
Modified: trunk/coreboot-v2/src/mainboard/gigabyte/ga_2761gxdk/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/gigabyte/ga_2761gxdk/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/gigabyte/ga_2761gxdk/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -113,15 +113,9 @@
} -struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -};
+#include <arch/registers.h> + void x86_exception(struct eregs *info) { do {
Modified: trunk/coreboot-v2/src/mainboard/gigabyte/m57sli/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/gigabyte/m57sli/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/gigabyte/m57sli/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -111,15 +111,9 @@
} -struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -};
+#include <arch/registers.h> + void x86_exception(struct eregs *info) { do {
Modified: trunk/coreboot-v2/src/mainboard/msi/ms7260/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/msi/ms7260/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/msi/ms7260/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -88,14 +88,7 @@ ); }
-struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -}; +#include <arch/registers.h>
void x86_exception(struct eregs *info) {
Modified: trunk/coreboot-v2/src/mainboard/nvidia/l1_2pvv/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/nvidia/l1_2pvv/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/nvidia/l1_2pvv/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -111,15 +111,9 @@
} -struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -};
+#include <arch/registers.h> + void x86_exception(struct eregs *info) { do {
Modified: trunk/coreboot-v2/src/mainboard/supermicro/h8dme/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/supermicro/h8dme/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/supermicro/h8dme/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -118,15 +118,9 @@
} -struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -};
+#include <arch/registers.h> + void x86_exception(struct eregs *info) { do {
Modified: trunk/coreboot-v2/src/mainboard/supermicro/h8dmr/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/supermicro/h8dmr/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/supermicro/h8dmr/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -118,15 +118,9 @@
} -struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -};
+#include <arch/registers.h> + void x86_exception(struct eregs *info) { do {
Modified: trunk/coreboot-v2/src/mainboard/tyan/s2912/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/tyan/s2912/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/tyan/s2912/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -100,15 +100,9 @@
} -struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -};
+#include <arch/registers.h> + void x86_exception(struct eregs *info) { do {
Modified: trunk/coreboot-v2/src/mainboard/tyan/s2912_fam10/apc_auto.c =================================================================== --- trunk/coreboot-v2/src/mainboard/tyan/s2912_fam10/apc_auto.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/src/mainboard/tyan/s2912_fam10/apc_auto.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -100,15 +100,9 @@
} -struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -};
+#include <arch/registers.h> + void x86_exception(struct eregs *info) { do {
Modified: trunk/coreboot-v2/util/x86emu/x86.c =================================================================== --- trunk/coreboot-v2/util/x86emu/x86.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/util/x86emu/x86.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -22,6 +22,7 @@
#ifdef CONFIG_COREBOOT_V2 #include <arch/io.h> +#include <arch/registers.h> #include <console/console.h> #define printk(x...) do_printk(x) #else @@ -34,15 +35,6 @@ u16 offset, cs; };
-struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -}; - void x86_exception(struct eregs *info);
extern unsigned char __idt_handler, __idt_handler_size;
Modified: trunk/coreboot-v2/util/x86emu/x86_interrupts.c =================================================================== --- trunk/coreboot-v2/util/x86emu/x86_interrupts.c 2009-10-23 23:30:31 UTC (rev 4831) +++ trunk/coreboot-v2/util/x86emu/x86_interrupts.c 2009-10-24 00:47:07 UTC (rev 4832) @@ -26,21 +26,13 @@ #ifdef CONFIG_COREBOOT_V2 #include <console/console.h> #include <arch/io.h> +#include <arch/registers.h> #define printk(x...) do_printk(x) #else #include <console.h> #include <io.h> #endif
-struct eregs { - uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi; - uint32_t vector; - uint32_t error_code; - uint32_t eip; - uint32_t cs; - uint32_t eflags; -}; - enum { CHECK = 0xb001, FINDDEV = 0xb102,