2 * From Coreboot file device/oprom/realmode/x86.h
4 * Copyright (C) 2007 Advanced Micro Devices, Inc.
5 * Copyright (C) 2009-2010 coresystems GmbH
7 * SPDX-License-Identifier: GPL-2.0
10 #ifndef _X86_LIB_BIOS_H
11 #define _X86_LIB_BIOS_H
13 #include <linux/linkage.h>
15 #define REALMODE_BASE 0x600
19 #define PTR_TO_REAL_MODE(x) (x - asm_realmode_code + REALMODE_BASE)
23 /* Convert a symbol address to our real mode area */
24 #define PTR_TO_REAL_MODE(sym)\
25 (void *)(REALMODE_BASE + ((char *)&(sym) - (char *)&asm_realmode_code))
28 * The following symbols cannot be used directly. They need to be fixed up
29 * to point to the correct address location after the code has been copied
30 * to REALMODE_BASE. Absolute symbols are not used because those symbols are
31 * relocated by U-Boot.
33 extern unsigned char asm_realmode_call, __realmode_interrupt;
34 extern unsigned char asm_realmode_buffer;
80 void x86_exception(struct eregs *info);
83 extern unsigned char __idt_handler;
84 extern unsigned int __idt_handler_size;
85 extern unsigned char asm_realmode_code;
86 extern unsigned int asm_realmode_code_size;
88 asmlinkage void (*realmode_call)(u32 addr, u32 eax, u32 ebx, u32 ecx, u32 edx,
91 asmlinkage void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx,
92 u32 edx, u32 esi, u32 edi);
94 int int10_handler(void);
95 int int12_handler(void);
96 int int16_handler(void);
97 int int1a_handler(void);
98 #endif /*__ASSEMBLY__ */