51 |
#define add_memory_map(start,end,mtype,msubtype) \ |
#define add_memory_map(start,end,mtype,msubtype) \ |
52 |
({ \ |
({ \ |
53 |
if (memory_map_size == MEMORY_MAP_MAX) \ |
if (memory_map_size == MEMORY_MAP_MAX) \ |
54 |
panic ("Error: No more memory descriptor slots available.\n"); \ |
panic ("No more memory descriptor slots available.\n"); \ |
55 |
memory_map[memory_map_size].low = (start) >> 10; \ |
memory_map[memory_map_size].low = (start) >> 10; \ |
56 |
memory_map[memory_map_size].high = ((end) + (1 << 10) - 1) >> 10; \ |
memory_map[memory_map_size].high = ((end) + (1 << 10) - 1) >> 10; \ |
57 |
memory_map[memory_map_size].virtual = 0; \ |
memory_map[memory_map_size].virtual = 0; \ |
135 |
void printf (const char *fmt, ...); |
void printf (const char *fmt, ...); |
136 |
|
|
137 |
/* Print an error message and fail. */ |
/* Print an error message and fail. */ |
138 |
#define panic(...) ({ printf (__VA_ARGS__); putchar ('\n'); shutdown (); }) |
#define panic(...) \ |
139 |
|
({ \ |
140 |
|
printf ("laden: error: "); \ |
141 |
|
printf (__VA_ARGS__); \ |
142 |
|
putchar ('\n'); \ |
143 |
|
shutdown (); \ |
144 |
|
}) |
145 |
|
|
146 |
/* True if debug mode is enabled. */ |
/* True if debug mode is enabled. */ |
147 |
extern int debug; |
extern int debug; |