diff options
-rw-r--r-- | src/arch/i386/include/arch/registers.h | 34 | ||||
-rw-r--r-- | src/arch/i386/lib/exception.c | 9 | ||||
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah/apc_auto.c | 10 | ||||
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah_fam10/apc_auto.c | 10 | ||||
-rw-r--r-- | src/mainboard/gigabyte/ga_2761gxdk/apc_auto.c | 10 | ||||
-rw-r--r-- | src/mainboard/gigabyte/m57sli/apc_auto.c | 10 | ||||
-rw-r--r-- | src/mainboard/msi/ms7260/apc_auto.c | 9 | ||||
-rw-r--r-- | src/mainboard/nvidia/l1_2pvv/apc_auto.c | 10 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8dme/apc_auto.c | 10 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8dmr/apc_auto.c | 10 | ||||
-rw-r--r-- | src/mainboard/tyan/s2912/apc_auto.c | 10 | ||||
-rw-r--r-- | src/mainboard/tyan/s2912_fam10/apc_auto.c | 10 | ||||
-rw-r--r-- | util/x86emu/x86.c | 10 | ||||
-rw-r--r-- | util/x86emu/x86_interrupts.c | 10 |
15 files changed, 57 insertions, 107 deletions
diff --git a/src/arch/i386/include/arch/registers.h b/src/arch/i386/include/arch/registers.h new file mode 100644 index 0000000000..bed8732898 --- /dev/null +++ b/src/arch/i386/include/arch/registers.h @@ -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 diff --git a/src/arch/i386/lib/exception.c b/src/arch/i386/lib/exception.c index ddf37a65eb..cc923a8f35 100644 --- a/src/arch/i386/lib/exception.c +++ b/src/arch/i386/lib/exception.c @@ -359,14 +359,7 @@ static void put_packet(char *buffer) } #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) { diff --git a/src/mainboard/amd/serengeti_cheetah/apc_auto.c b/src/mainboard/amd/serengeti_cheetah/apc_auto.c index c8723e6fbf..a855c2fd39 100644 --- a/src/mainboard/amd/serengeti_cheetah/apc_auto.c +++ b/src/mainboard/amd/serengeti_cheetah/apc_auto.c @@ -102,14 +102,8 @@ void hardwaremain(int ret_addr) } -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) { diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c b/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c index 184735b104..f6741b9ec9 100644 --- a/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c +++ b/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c @@ -43,7 +43,7 @@ static void dump_mem(u32 start, u32 end) printk_debug(" %02x", (unsigned char)*((unsigned char *)i)); } print_debug("\n"); - } +} #endif extern u8 AmlCode[]; diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/apc_auto.c b/src/mainboard/amd/serengeti_cheetah_fam10/apc_auto.c index 69e3ffbb9d..ea7e2a6b29 100644 --- a/src/mainboard/amd/serengeti_cheetah_fam10/apc_auto.c +++ b/src/mainboard/amd/serengeti_cheetah_fam10/apc_auto.c @@ -96,14 +96,8 @@ void hardwaremain(int ret_addr) } -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) { diff --git a/src/mainboard/gigabyte/ga_2761gxdk/apc_auto.c b/src/mainboard/gigabyte/ga_2761gxdk/apc_auto.c index 90546b45a2..5a94cf740f 100644 --- a/src/mainboard/gigabyte/ga_2761gxdk/apc_auto.c +++ b/src/mainboard/gigabyte/ga_2761gxdk/apc_auto.c @@ -113,14 +113,8 @@ void hardwaremain(int ret_addr) } -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) { diff --git a/src/mainboard/gigabyte/m57sli/apc_auto.c b/src/mainboard/gigabyte/m57sli/apc_auto.c index 176e6b41ad..50ad68eed3 100644 --- a/src/mainboard/gigabyte/m57sli/apc_auto.c +++ b/src/mainboard/gigabyte/m57sli/apc_auto.c @@ -111,14 +111,8 @@ void hardwaremain(int ret_addr) } -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) { diff --git a/src/mainboard/msi/ms7260/apc_auto.c b/src/mainboard/msi/ms7260/apc_auto.c index 6f01fad1f8..317f9d26d3 100644 --- a/src/mainboard/msi/ms7260/apc_auto.c +++ b/src/mainboard/msi/ms7260/apc_auto.c @@ -88,14 +88,7 @@ void hardwaremain(int ret_addr) ); } -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) { diff --git a/src/mainboard/nvidia/l1_2pvv/apc_auto.c b/src/mainboard/nvidia/l1_2pvv/apc_auto.c index 7528b84ed4..d7c4e2831a 100644 --- a/src/mainboard/nvidia/l1_2pvv/apc_auto.c +++ b/src/mainboard/nvidia/l1_2pvv/apc_auto.c @@ -111,14 +111,8 @@ void hardwaremain(int ret_addr) } -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) { diff --git a/src/mainboard/supermicro/h8dme/apc_auto.c b/src/mainboard/supermicro/h8dme/apc_auto.c index f4bedfe0f0..b501cfc76e 100644 --- a/src/mainboard/supermicro/h8dme/apc_auto.c +++ b/src/mainboard/supermicro/h8dme/apc_auto.c @@ -118,14 +118,8 @@ void hardwaremain(int ret_addr) } -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) { diff --git a/src/mainboard/supermicro/h8dmr/apc_auto.c b/src/mainboard/supermicro/h8dmr/apc_auto.c index f4bedfe0f0..b501cfc76e 100644 --- a/src/mainboard/supermicro/h8dmr/apc_auto.c +++ b/src/mainboard/supermicro/h8dmr/apc_auto.c @@ -118,14 +118,8 @@ void hardwaremain(int ret_addr) } -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) { diff --git a/src/mainboard/tyan/s2912/apc_auto.c b/src/mainboard/tyan/s2912/apc_auto.c index 2600dd3b6b..880d06a1cf 100644 --- a/src/mainboard/tyan/s2912/apc_auto.c +++ b/src/mainboard/tyan/s2912/apc_auto.c @@ -100,14 +100,8 @@ void hardwaremain(int ret_addr) } -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) { diff --git a/src/mainboard/tyan/s2912_fam10/apc_auto.c b/src/mainboard/tyan/s2912_fam10/apc_auto.c index 2600dd3b6b..880d06a1cf 100644 --- a/src/mainboard/tyan/s2912_fam10/apc_auto.c +++ b/src/mainboard/tyan/s2912_fam10/apc_auto.c @@ -100,14 +100,8 @@ void hardwaremain(int ret_addr) } -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) { diff --git a/util/x86emu/x86.c b/util/x86emu/x86.c index 463c6dfd29..5c0422e826 100644 --- a/util/x86emu/x86.c +++ b/util/x86emu/x86.c @@ -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 @@ struct realmode_idt { 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; diff --git a/util/x86emu/x86_interrupts.c b/util/x86emu/x86_interrupts.c index 5bb276aa52..1582ef1ec1 100644 --- a/util/x86emu/x86_interrupts.c +++ b/util/x86emu/x86_interrupts.c @@ -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, |