5 struct node
*n_succ
, *n_pred
;
9 struct node
*l_head
, *l_tail
, *l_tailpred
;
16 unsigned long m_lowest
;
17 unsigned long m_highest
;
24 unsigned long s_lowest
;
25 unsigned long s_highest
;
28 static inline void new_list(list_t
*l
)
30 l
->l_tailpred
= (node_t
*)l
;
31 l
->l_tail
= (node_t
*)0;
32 l
->l_head
= (node_t
*)&l
->l_tail
;
35 static inline void add_head(list_t
*l
, node_t
*n
)
37 n
->n_succ
= l
->l_head
;
38 n
->n_pred
= (node_t
*)&l
->l_head
;
40 l
->l_head
->n_pred
= n
;
44 static inline void add_tail(list_t
*l
, node_t
*n
)
46 n
->n_succ
= (node_t
*)&l
->l_tail
;
47 n
->n_pred
= l
->l_tailpred
;
49 l
->l_tailpred
->n_succ
= n
;
53 static inline node_t
*remove(node_t
*n
)
55 n
->n_pred
->n_succ
= n
->n_succ
;
56 n
->n_succ
->n_pred
= n
->n_pred
;
61 list_t
*list_new(void);
62 void list_append(list_t
* self
, node_t
* node
);
64 typedef struct tagitem
{
65 unsigned long ti_tag
, ti_data
;
68 struct StackSwapStruct
{
69 void *stk_Pointer
; /* Stack pointer at switch point */
72 /* Markers for .bss section in the file. They will be used to clear BSS out */
73 extern unsigned long __bss_start
;
74 extern unsigned long _end
;
76 typedef unsigned char uint8_t;
77 typedef unsigned short uint16_t;
78 typedef unsigned int uint32_t;
80 typedef signed char int8_t;
81 typedef signed short int16_t;
82 typedef signed int int32_t;
85 int strlen(const char *str
);
90 int strncasecmp(const char *s1
, const char *s2
, int max
);
91 int strcasecmp(const char *s1
, const char *s2
);
92 int strncmp(const char *s1
, const char *s2
, int max
);
93 int strcmp(const char *s1
, const char *s2
);
94 void bzero(void *dest
, int length
);
97 int StackSwap(struct StackSwapStruct
*sss
);
99 #define __used __attribute__((used))
100 #define __startup __attribute__((section(".aros.startup")))
102 #define BOOT_DIR "boot/"
103 #define BOOT_FILE(x) BOOT_DIR # x
105 #define KERNEL_PHYS_BASE 0x00800000
106 #define KERNEL_VIRT_BASE 0xff800000
108 #define MAX_BSS_SECTIONS 1024
111 #define NULL ((void*)0)
114 #define TAG_USER 0x80000000
116 #define KRN_Dummy (TAG_USER + 0x03d00000)
117 #define KRN_KernelBase (KRN_Dummy + 1)
118 #define KRN_KernelLowest (KRN_Dummy + 2)
119 #define KRN_KernelHighest (KRN_Dummy + 3)
120 #define KRN_KernelBss (KRN_Dummy + 4)
121 #define KRN_GDT (KRN_Dummy + 5)
122 #define KRN_IDT (KRN_Dummy + 6)
123 #define KRN_PL4 (KRN_Dummy + 7)
124 #define KRN_VBEModeInfo (KRN_Dummy + 8)
125 #define KRN_VBEControllerInfo (KRN_Dummy + 9)
126 #define KRN_MMAPAddress (KRN_Dummy + 10)
127 #define KRN_MMAPLength (KRN_Dummy + 11)
128 #define KRN_CmdLine (KRN_Dummy + 12)
129 #define KRN_ProtAreaStart (KRN_Dummy + 13)
130 #define KRN_ProtAreaEnd (KRN_Dummy + 14)
131 #define KRN_VBEMode (KRN_Dummy + 15)
132 #define KRN_VBEPaletteWidth (KRN_Dummy + 16)
133 #define KRN_MEMLower (KRN_Dummy + 17)
134 #define KRN_MEMUpper (KRN_Dummy + 18)
135 #define KRN_OpenFirmwareTree (KRN_Dummy + 19)
136 #define KRN_HostInterface (KRN_Dummy + 20)
137 #define KRN_DebugInfo (KRN_Dummy + 21)
138 #define KRN_BootLoader (KRN_Dummy + 22)
141 char *strcpy(char *dest
, const char *src
);
142 char *strncpy(char *dest
, const char *src
, int n
);
143 char *strchr(char *s
, int c
);
144 char *strdup(const char *s
);
145 int strtol(const char *s
);
147 void *calloc(int size
, int n
);
148 void *memcpy(void *dest
, const void *src
, int n
);
149 void *memset(void *s
, int c
, int n
);
152 #endif /*SUPPORT_H_ */