|
2 | 2 | * |
3 | 3 | * Copyright (C) 1991, 1992 Linus Torvalds |
4 | 4 | * Copyright 2007 rPath, Inc. - All Rights Reserved |
| 5 | + * Copyright 2009 Intel Corporation; author H. Peter Anvin |
5 | 6 | * |
6 | 7 | * This file is part of the Linux kernel, and is made available under |
7 | 8 | * the terms of the GNU General Public License version 2. |
|
26 | 27 | #include <asm/setup.h> |
27 | 28 | #include "bitops.h" |
28 | 29 | #include <asm/cpufeature.h> |
| 30 | +#include <asm/processor-flags.h> |
29 | 31 |
|
30 | 32 | /* Useful macros */ |
31 | 33 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
@@ -241,6 +243,49 @@ int enable_a20(void); |
241 | 243 | /* apm.c */ |
242 | 244 | int query_apm_bios(void); |
243 | 245 |
|
| 246 | +/* bioscall.c */ |
| 247 | +struct biosregs { |
| 248 | + union { |
| 249 | + struct { |
| 250 | + u32 edi; |
| 251 | + u32 esi; |
| 252 | + u32 ebp; |
| 253 | + u32 _esp; |
| 254 | + u32 ebx; |
| 255 | + u32 edx; |
| 256 | + u32 ecx; |
| 257 | + u32 eax; |
| 258 | + u32 _fsgs; |
| 259 | + u32 _dses; |
| 260 | + u32 eflags; |
| 261 | + }; |
| 262 | + struct { |
| 263 | + u16 di, hdi; |
| 264 | + u16 si, hsi; |
| 265 | + u16 bp, hbp; |
| 266 | + u16 _sp, _hsp; |
| 267 | + u16 bx, hbx; |
| 268 | + u16 dx, hdx; |
| 269 | + u16 cx, hcx; |
| 270 | + u16 ax, hax; |
| 271 | + u16 gs, fs; |
| 272 | + u16 es, ds; |
| 273 | + u16 flags, hflags; |
| 274 | + }; |
| 275 | + struct { |
| 276 | + u8 dil, dih, edi2, edi3; |
| 277 | + u8 sil, sih, esi2, esi3; |
| 278 | + u8 bpl, bph, ebp2, ebp3; |
| 279 | + u8 _spl, _sph, _esp2, _esp3; |
| 280 | + u8 bl, bh, ebx2, ebx3; |
| 281 | + u8 dl, dh, edx2, edx3; |
| 282 | + u8 cl, ch, ecx2, ecx3; |
| 283 | + u8 al, ah, eax2, eax3; |
| 284 | + }; |
| 285 | + }; |
| 286 | +}; |
| 287 | +void intcall(u8 int_no, const struct biosregs *ireg, struct biosregs *oreg); |
| 288 | + |
244 | 289 | /* cmdline.c */ |
245 | 290 | int cmdline_find_option(const char *option, char *buffer, int bufsize); |
246 | 291 | int cmdline_find_option_bool(const char *option); |
@@ -279,6 +324,9 @@ int sprintf(char *buf, const char *fmt, ...); |
279 | 324 | int vsprintf(char *buf, const char *fmt, va_list args); |
280 | 325 | int printf(const char *fmt, ...); |
281 | 326 |
|
| 327 | +/* regs.c */ |
| 328 | +void initregs(struct biosregs *regs); |
| 329 | + |
282 | 330 | /* string.c */ |
283 | 331 | int strcmp(const char *str1, const char *str2); |
284 | 332 | size_t strnlen(const char *s, size_t maxlen); |
|
0 commit comments