added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / x86_64-pc / bootstrap / bootstrap.h
blob1a75e5c0acc0054d9e6dff34b12e238c3fa6644f
1 #ifndef _BOOTSTRAP_H
2 #define _BOOTSTRAP_H
4 /*
5 Copyright (C) 2006 The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #define NULL ((void*)0)
12 struct KernelMessage {
13 struct { void *low,*high; } GRUBData;
15 struct { void *low,*high; } kernelBase;
16 struct { void *low,*high; } kernelLowest;
17 struct { void *low,*high; } kernelHighest;
18 struct { void *low,*high; } kernelBSS;
19 struct { void *low,*high; } GDT;
20 struct { void *low,*high; } IDT;
21 struct { void *low,*high; } PL4;
23 struct { void *low,*high; } vbeModeInfo;
24 struct { void *low,*high; } vbeControllerInfo;
29 #ifdef DEBUG
30 #define D(x) x
31 #else
32 #define D(x) /* eps */
33 #endif
37 * Multiboot stuff
39 typedef struct {
40 unsigned int magic;
41 unsigned int flags;
42 unsigned int chksum;
43 } multiboot_header;
45 #define MB_MAGIC 0x1BADB002
46 #define MB_FLAGS 0x00000003
48 struct module {
49 const char *name;
50 void *address;
53 void *_binary_aros_o_start;
54 void *_binary_vesa_start;
55 long _binary_vesa_size;
57 #if defined(__i386__) || defined(__x86_64__)
58 #define LONG2BE(v) ({ unsigned int __v32; asm volatile("bswap %0":"=a"(__v32):"0"((v))); __v32; })
59 #else
60 #define LONG2BE(v) (v)
61 #endif
63 #endif // _BOOTSTRAP_H