revert between 56095 -> 55830 in arch
[AROS.git] / arch / all-pc / bootstrap / bootstrap.h
blob302e194971f97d9bc15e8e0d732d2ae2b9f1f475
1 #ifndef _BOOTSTRAP_H
2 #define _BOOTSTRAP_H
4 /*
5 Copyright (C) 2006-2011 The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <aros/multiboot.h>
11 #ifdef DEBUG
12 #define D(x) x
13 #else
14 #define D(x) /* eps */
15 #endif
17 #ifdef MULTIBOOT_64BIT
20 * Our kickstart is 64-bit but we are being compiled in 32-bit mode.
21 * So we need a correct definition of TagItem
23 struct TagItem64
25 unsigned long long ti_Tag;
26 unsigned long long ti_Data;
29 #else
31 #define TagItem64 TagItem
33 #endif
35 /* A pointer used for building boot taglist */
36 extern struct TagItem64 *tag;
37 extern struct vbe_mode VBEModeInfo;
38 extern struct vbe_controller VBEControllerInfo;
40 /* The target base address of 64-bit kernel */
41 #define KERNEL_TARGET_ADDRESS 0x01000000
43 /* Our kickstart will operate with page size = 4KB */
44 #define PAGE_SIZE 4096
46 //#define KERNEL_HIGH_OFFSET 0x1ffULL
47 //#define KERNEL_HIGH_OFFSET 0x1ffULL
48 //#define KERNEL_HIGH_OFFSET 31ULL
49 //#define KERNEL_OFFSET 0x01000000
50 #define KERNEL_OFFSET 0
51 //#define KERNEL_OFFSET 0xfffffffff8000000ULL
52 //#define KERNEL_OFFSET 0x0000000000000000ULL
54 extern char _end;
56 #define TOP_ADDR(a1, a2) ((unsigned long)a2 > a1 ? (unsigned long)a2 : a1)
57 #define STR_TOP_ADDR(a1, s) TOP_ADDR(a1, s + strlen(s) + 1)
59 void setup_mmu(void);
60 void kick(void *kick_base, struct TagItem64 *km);
62 unsigned long AddModule(unsigned long mod_start, unsigned long mod_end, unsigned long end);
63 void AllocFB(void);
64 void Hello(void);
65 int ParseCmdLine(const char *cmdline);
66 struct mb_mmap *mmap_make(unsigned long *len, unsigned long mem_lower, unsigned long long mem_upper);
67 void panic(const char *str);
68 unsigned long mb1_parse(struct multiboot *mb, struct mb_mmap **mmap_addr, unsigned long *mmap_len);
69 unsigned long mb2_parse(void *mb, struct mb_mmap **mmap_addr, unsigned long *mmap_len);
70 void setupVESA(char *str);
72 #if defined(__i386__) || defined(__x86_64__)
73 #define LONG2BE(v) ({ unsigned int __v32; asm volatile("bswap %0":"=a"(__v32):"0"((v))); __v32; })
74 #else
75 #define LONG2BE(v) (v)
76 #endif
78 #endif // _BOOTSTRAP_H