Stefan Reinauer | 216fa46 | 2011-10-12 14:25:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007 Advanced Micro Devices, Inc. |
| 5 | * Copyright (C) 2009-2010 coresystems GmbH |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | */ |
| 20 | |
| 21 | #define REALMODE_BASE ((void *)0x600) |
| 22 | |
| 23 | struct realmode_idt { |
| 24 | u16 offset, cs; |
| 25 | }; |
| 26 | |
| 27 | void x86_exception(struct eregs *info); |
| 28 | |
| 29 | /* From x86_asm.S */ |
| 30 | extern unsigned char __idt_handler, __idt_handler_size; |
| 31 | extern unsigned char __realmode_code, __realmode_code_size; |
| 32 | extern unsigned char __realmode_call, __realmode_interrupt; |
Stefan Reinauer | c1efb90 | 2011-10-12 14:30:59 -0700 | [diff] [blame] | 33 | extern unsigned char __buffer; |
Stefan Reinauer | 216fa46 | 2011-10-12 14:25:07 -0700 | [diff] [blame] | 34 | |
| 35 | extern void (*realmode_call)(u32 addr, u32 eax, u32 ebx, u32 ecx, u32 edx, |
| 36 | u32 esi, u32 edi) __attribute__((regparm(0))); |
| 37 | |
| 38 | extern void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx, u32 edx, |
| 39 | u32 esi, u32 edi) __attribute__((regparm(0))); |
| 40 | |
| 41 | #define FAKE_MEMORY_SIZE (1024*1024) // only 1MB |
| 42 | #define INITIAL_EBDA_SEGMENT 0xF600 |
| 43 | #define INITIAL_EBDA_SIZE 0x400 |
| 44 | |
Patrick Georgi | 199b09c | 2012-11-22 12:46:12 +0100 | [diff] [blame^] | 45 | int int10_handler(void); |
| 46 | int int12_handler(void); |
| 47 | int int16_handler(void); |
| 48 | int int1a_handler(void); |
Stefan Reinauer | 216fa46 | 2011-10-12 14:25:07 -0700 | [diff] [blame] | 49 | |