blob: 7dfa60f996e09ac8f6397e2b8eaf98c5e944db7b [file] [log] [blame]
Stefan Reinauer216fa462011-10-12 14:25:07 -07001/*
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
23struct realmode_idt {
24 u16 offset, cs;
25};
26
27void x86_exception(struct eregs *info);
28
29/* From x86_asm.S */
30extern unsigned char __idt_handler, __idt_handler_size;
31extern unsigned char __realmode_code, __realmode_code_size;
32extern unsigned char __realmode_call, __realmode_interrupt;
Stefan Reinauerc1efb902011-10-12 14:30:59 -070033extern unsigned char __buffer;
Stefan Reinauer216fa462011-10-12 14:25:07 -070034
35extern void (*realmode_call)(u32 addr, u32 eax, u32 ebx, u32 ecx, u32 edx,
36 u32 esi, u32 edi) __attribute__((regparm(0)));
37
38extern 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 Georgi199b09c2012-11-22 12:46:12 +010045int int10_handler(void);
46int int12_handler(void);
47int int16_handler(void);
48int int1a_handler(void);
Stefan Reinauer216fa462011-10-12 14:25:07 -070049