~ubuntu-branches/ubuntu/saucy/seabios/saucy-proposed

« back to all changes in this revision

Viewing changes to src/misc.c

  • Committer: Package Import Robot
  • Author(s): Michael Tokarev
  • Date: 2013-07-08 21:34:44 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20130708213444-6ed9q23j39x143lu
Tags: 1.7.3-1
Multi-Arch: allowed

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#include "util.h" // debug_enter
11
11
#include "pic.h" // enable_hwirq
12
12
 
13
 
// Amount of continuous ram under 4Gig
14
 
u32 RamSize VAR16VISIBLE;
15
 
// Amount of continuous ram >4Gig
16
 
u64 RamSizeOver4G;
17
 
// Space for bios tables built an run-time.
18
 
char BiosTableSpace[CONFIG_MAX_BIOSTABLE] __aligned(MALLOC_MIN_ALIGN) VAR16VISIBLE;
19
 
 
20
13
 
21
14
/****************************************************************
22
15
 * Misc 16bit ISRs
113
106
 
114
107
struct bios_config_table_s BIOS_CONFIG_TABLE VAR16FIXED(0xe6f5) = {
115
108
    .size     = sizeof(BIOS_CONFIG_TABLE) - 2,
116
 
    .model    = CONFIG_MODEL_ID,
117
 
    .submodel = CONFIG_SUBMODEL_ID,
118
 
    .biosrev  = CONFIG_BIOS_REVISION,
 
109
    .model    = BUILD_MODEL_ID,
 
110
    .submodel = BUILD_SUBMODEL_ID,
 
111
    .biosrev  = BUILD_BIOS_REVISION,
119
112
    .feature1 = (
120
113
        CBT_F1_2NDPIC | CBT_F1_RTC | CBT_F1_EBDA
121
114
        | (CONFIG_KBD_CALL_INT15_4F ? CBT_F1_INT154F : 0)),
131
124
 ****************************************************************/
132
125
 
133
126
// Real mode IDT descriptor
134
 
struct descloc_s rmode_IDT_info VAR16VISIBLE = {
 
127
struct descloc_s rmode_IDT_info VARFSEG = {
135
128
    .length = sizeof(struct rmode_IVT) - 1,
136
129
    .addr = (u32)MAKE_FLATPTR(SEG_IVT, 0),
137
130
};
138
131
 
139
132
// Dummy IDT that forces a machine shutdown if an irq happens in
140
133
// protected mode.
141
 
u8 dummy_IDT VAR16VISIBLE;
 
134
u8 dummy_IDT VARFSEG;
142
135
 
143
136
// Protected mode IDT descriptor
144
 
struct descloc_s pmode_IDT_info VAR16VISIBLE = {
 
137
struct descloc_s pmode_IDT_info VARFSEG = {
145
138
    .length = sizeof(dummy_IDT) - 1,
146
 
    .addr = (u32)MAKE_FLATPTR(SEG_BIOS, &dummy_IDT),
 
139
    .addr = (u32)&dummy_IDT,
147
140
};
148
141
 
149
142
// GDT
150
 
u64 rombios32_gdt[] VAR16VISIBLE __aligned(8) = {
 
143
u64 rombios32_gdt[] VARFSEG __aligned(8) = {
151
144
    // First entry can't be used.
152
145
    0x0000000000000000LL,
153
146
    // 32 bit flat code segment (SEG32_MODE32_CS)
165
158
};
166
159
 
167
160
// GDT descriptor
168
 
struct descloc_s rombios32_gdt_48 VAR16VISIBLE = {
 
161
struct descloc_s rombios32_gdt_48 VARFSEG = {
169
162
    .length = sizeof(rombios32_gdt) - 1,
170
 
    .addr = (u32)MAKE_FLATPTR(SEG_BIOS, rombios32_gdt),
 
163
    .addr = (u32)rombios32_gdt,
171
164
};
172
165
 
173
166
 
181
174
// BIOS build date
182
175
char BiosDate[] VAR16FIXED(0xfff5) = "06/23/99";
183
176
 
184
 
u8 BiosModelId VAR16FIXED(0xfffe) = CONFIG_MODEL_ID;
 
177
u8 BiosModelId VAR16FIXED(0xfffe) = BUILD_MODEL_ID;
185
178
 
186
179
u8 BiosChecksum VAR16FIXED(0xffff);
187
180