diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-12-06 13:54:29 -0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2012-12-06 23:13:17 +0100 |
commit | 399486e8fb8f5b402f1833e496dbed11aa0ac669 (patch) | |
tree | 2dbf5ed01e8546eaf534c4dce8758f5b44624f8c /src/device/oprom/realmode | |
parent | c269a9b51cac8e6e24cd98b46543b89e1b836bf8 (diff) | |
download | coreboot-399486e8fb8f5b402f1833e496dbed11aa0ac669.tar.xz |
Unify assembler function handling
Instead of adding regparm(0) to each assembler function called
by coreboot, add an asmlinkage macro (like the Linux kernel does)
that can be different per architecture (and that is empty on ARM
right now)
Change-Id: I7ad10c463f6c552f1201f77ae24ed354ac48e2d9
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/1973
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/device/oprom/realmode')
-rw-r--r-- | src/device/oprom/realmode/x86.c | 8 | ||||
-rw-r--r-- | src/device/oprom/realmode/x86.h | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c index 6a82a691b5..697d869821 100644 --- a/src/device/oprom/realmode/x86.c +++ b/src/device/oprom/realmode/x86.c @@ -38,11 +38,11 @@ X86EMU_sysEnv _X86EMU_env; void (*realmode_call)(u32 addr, u32 eax, u32 ebx, u32 ecx, u32 edx, - u32 esi, u32 edi) __attribute__((regparm(0))) = + u32 esi, u32 edi) asmlinkage = (void *)&__realmode_call; void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx, u32 edx, - u32 esi, u32 edi) __attribute__((regparm(0))) = + u32 esi, u32 edi) asmlinkage = (void *)&__realmode_interrupt; static void setup_rombios(void) @@ -406,7 +406,7 @@ void do_vsmbios(void) /* interrupt_handler() is called from assembler code only, * so there is no use in putting the prototype into a header file. */ -int __attribute__((regparm(0))) interrupt_handler(u32 intnumber, +int asmlinkage interrupt_handler(u32 intnumber, u32 gsfs, u32 dses, u32 edi, u32 esi, u32 ebp, u32 esp, @@ -414,7 +414,7 @@ int __attribute__((regparm(0))) interrupt_handler(u32 intnumber, u32 ecx, u32 eax, u32 cs_ip, u16 stackflags); -int __attribute__((regparm(0))) interrupt_handler(u32 intnumber, +int asmlinkage interrupt_handler(u32 intnumber, u32 gsfs, u32 dses, u32 edi, u32 esi, u32 ebp, u32 esp, diff --git a/src/device/oprom/realmode/x86.h b/src/device/oprom/realmode/x86.h index 7dfa60f996..76d3e4643c 100644 --- a/src/device/oprom/realmode/x86.h +++ b/src/device/oprom/realmode/x86.h @@ -18,6 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __DEVICE_OPROM_REALMODE_X86_H__ +#define __DEVICE_OPROM_REALMODE_X86_H__ + +#include <arch/cpu.h> + #define REALMODE_BASE ((void *)0x600) struct realmode_idt { @@ -33,10 +38,10 @@ extern unsigned char __realmode_call, __realmode_interrupt; extern unsigned char __buffer; extern void (*realmode_call)(u32 addr, u32 eax, u32 ebx, u32 ecx, u32 edx, - u32 esi, u32 edi) __attribute__((regparm(0))); + u32 esi, u32 edi) asmlinkage; extern void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx, u32 edx, - u32 esi, u32 edi) __attribute__((regparm(0))); + u32 esi, u32 edi) asmlinkage; #define FAKE_MEMORY_SIZE (1024*1024) // only 1MB #define INITIAL_EBDA_SEGMENT 0xF600 @@ -47,3 +52,4 @@ int int12_handler(void); int int16_handler(void); int int1a_handler(void); +#endif |