82 |
|
|
83 |
static struct |
static struct |
84 |
{ |
{ |
85 |
char *name; |
const char *name; |
86 |
l4_word_t start; |
l4_word_t start; |
87 |
l4_word_t end; |
l4_word_t end; |
88 |
} used_regions[MAX_REGIONS]; |
} used_regions[MAX_REGIONS]; |
93 |
/* Check that the region with the name NAME from START to END does not |
/* Check that the region with the name NAME from START to END does not |
94 |
overlap with an existing region. */ |
overlap with an existing region. */ |
95 |
static void |
static void |
96 |
check_region (char *name, l4_word_t start, l4_word_t end) |
check_region (const char *name, l4_word_t start, l4_word_t end) |
97 |
{ |
{ |
98 |
int i; |
int i; |
99 |
|
|
115 |
regions to check against. Before doing that, check for overlaps |
regions to check against. Before doing that, check for overlaps |
116 |
with existing regions. */ |
with existing regions. */ |
117 |
void |
void |
118 |
loader_add_region (char *name, l4_word_t start, l4_word_t end) |
loader_add_region (const char *name, l4_word_t start, l4_word_t end) |
119 |
{ |
{ |
120 |
debug ("Protected Region: %s (0x%x - 0x%x)\n", name, start, end); |
debug ("Protected Region: %s (0x%x - 0x%x)\n", name, start, end); |
121 |
|
|
142 |
break; |
break; |
143 |
|
|
144 |
if (i == nr_regions) |
if (i == nr_regions) |
145 |
panic ("Assertion failure: Could not find region %s for removal"); |
panic ("Assertion failure: Could not find region %s for removal", name); |
146 |
|
|
147 |
while (i < nr_regions - 1) |
while (i < nr_regions - 1) |
148 |
{ |
{ |
159 |
program in NEW_START_P and NEW_END_P, and the entry point in |
program in NEW_START_P and NEW_END_P, and the entry point in |
160 |
ENTRY. */ |
ENTRY. */ |
161 |
void |
void |
162 |
loader_elf_load (char *name, l4_word_t start, l4_word_t end, |
loader_elf_load (const char *name, l4_word_t start, l4_word_t end, |
163 |
l4_word_t *new_start_p, l4_word_t *new_end_p, |
l4_word_t *new_start_p, l4_word_t *new_end_p, |
164 |
l4_word_t *entry) |
l4_word_t *entry) |
165 |
{ |
{ |