Since some people disapprove of white space cleanups mixed in regular commits
[coreboot.git] / src / devices / oprom / yabel / biosemu.h
1 /******************************************************************************
2  * Copyright (c) 2004, 2008 IBM Corporation
3  * Copyright (c) 2009 Pattrick Hueper <phueper@hueper.net>
4  * All rights reserved.
5  * This program and the accompanying materials
6  * are made available under the terms of the BSD License
7  * which accompanies this distribution, and is available at
8  * http://www.opensource.org/licenses/bsd-license.php
9  *
10  * Contributors:
11  *     IBM Corporation - initial implementation
12  *****************************************************************************/
13
14 #ifndef _BIOSEMU_BIOSEMU_H_
15 #define _BIOSEMU_BIOSEMU_H_
16
17 #define MIN_REQUIRED_VMEM_SIZE 0x100000 // 1MB
18
19 //define default segments for different components
20 #define STACK_SEGMENT 0x1000    //1000:xxxx
21 #define STACK_START_OFFSET 0xfffe
22
23 #define DATA_SEGMENT 0x2000
24 #define VBE_SEGMENT 0x3000
25
26 #define PMM_CONV_SEGMENT 0x4000 // 4000:xxxx is PMM conventional memory area, extended memory area
27                                 // will be anything beyound MIN_REQUIRED_MEMORY_SIZE
28 #define PNP_DATA_SEGMENT 0x5000
29
30 #define OPTION_ROM_CODE_SEGMENT 0xc000
31
32 #define BIOS_DATA_SEGMENT 0xF000
33 // both EBDA values are _initial_ values, they may (and will be) changed at runtime by option ROMs!!
34 #define INITIAL_EBDA_SEGMENT 0xF600     // segment of the Extended BIOS Data Area
35 #define INITIAL_EBDA_SIZE 0x400 // size of the EBDA (at least 1KB!! since size is stored in KB!)
36
37 #define PMM_INT_NUM 0xFC        // we misuse INT FC for PMM functionality, at the PMM Entry Point
38                                 // Address, there will only be a call to this INT and a RETF
39 #define PNP_INT_NUM 0xFD
40
41 /* array of funtion pointers to override generic interrupt handlers
42  * a YABEL caller can add functions to this array before calling YABEL
43  * if a interrupt occurs, YABEL checks wether a function is set in
44  * this array and only runs the generic interrupt handler code, if
45  * the function pointer is NULL */
46 typedef int (* yabel_handleIntFunc)(void);
47 extern yabel_handleIntFunc yabel_intFuncArray[256];
48
49 struct device;
50
51 u32 biosemu(u8 *biosmem, u32 biosmem_size, struct device *dev, unsigned long rom_addr);
52 #endif