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 #define REALMODE_BASE 0x600
17 #define PTR_TO_REAL_MODE(x) (x - asm_realmode_code + REALMODE_BASE)
21 /* Convert a symbol address to our real mode area */
22 #define PTR_TO_REAL_MODE(sym)\
23 (void *)(REALMODE_BASE + ((char *)&(sym) - (char *)&asm_realmode_code))
26 * The following symbols cannot be used directly. They need to be fixed up
27 * to point to the correct address location after the code has been copied
28 * to REALMODE_BASE. Absolute symbols are not used because those symbols are
29 * relocated by U-Boot.
31 extern unsigned char asm_realmode_call, __realmode_interrupt;
32 extern unsigned char asm_realmode_buffer;
78 void x86_exception(struct eregs *info);
81 extern unsigned char __idt_handler;
82 extern unsigned int __idt_handler_size;
83 extern unsigned char asm_realmode_code;
84 extern unsigned int asm_realmode_code_size;
86 asmlinkage void (*realmode_call)(u32 addr, u32 eax, u32 ebx, u32 ecx, u32 edx,
89 asmlinkage void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx,
90 u32 edx, u32 esi, u32 edi);
92 int int10_handler(void);
93 int int12_handler(void);
94 int int16_handler(void);
95 int int1a_handler(void);
96 #endif /*__ASSEMBLY__ */