diff options
author | neal <neal> | 2007-07-26 20:48:41 +0000 |
---|---|---|
committer | neal <neal> | 2007-07-26 20:48:41 +0000 |
commit | a084d87a3692c39b8106b995705ca56a65cc0ea2 (patch) | |
tree | 624a47aaf79408ce9df8265bc525f996b9355461 /laden/laden.h | |
parent | 45cb4f373b40d36664601e545dc485077cc73f83 (diff) |
2007-07-26 Neal H. Walfield <neal@gnu.org>
* loader.h (loader_add_region): Take an additional parameter, the
L4 descriptor type. Update callers.
(loader_elf_load): Likewise.
(loader_regions_reserve): New function.
* loader.c: Add field desc_type.
(loader_add_region): Take an additional parameter, an L4
descriptor type. Save it in the allocated descriptor. Round the
start address to a page boundary.
(loader_remove_region): Remove all regions with the name NAME, not
just the first one.
(loader_regions_reserve): New function.
(loader_elf_load): Take an additional parameter, an L4 descriptor
type. Mark regions that we allocate with this type. Coalesce
regions where possible.
* laden.h: Include <assert.h>.
(add_memory_map): Improve comment. Add an assert.
* ia32-cmain.c (module_relocate): Rename from this...
(modules_relocate): ... to this. Handle relocating multiple
modules.
(find_components): When protecting module data areas, coalesce
when possible. Fix an off by one error when calculating the upper
memory bound. Rename the module meta data region to better
reflect its nature.
* kip-fixup.c (kip_fixup): Call loader_regions_reserve before
copying the memory descriptors. Don't set KIP->MEMORY_INFO.NR
* laden.c (load_components): Allocate a stack for sigma0 and the
root server just beyond their highest address.
* kip-fixup.c (kip_fixup): Only boot versions of L4 that we know
how to boot.
* ia32-cmain.c (find_components): Only reserve conventional memory
for an X2 kernel.
Diffstat (limited to 'laden/laden.h')
-rw-r--r-- | laden/laden.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/laden/laden.h b/laden/laden.h index 1f9ad8c..dd0b832 100644 --- a/laden/laden.h +++ b/laden/laden.h @@ -23,6 +23,7 @@ #endif #include <string.h> +#include <assert.h> #include <l4.h> @@ -62,10 +63,15 @@ extern l4_word_t boot_info; extern l4_memory_desc_t memory_map[MEMORY_MAP_MAX]; extern l4_word_t memory_map_size; +/* START identifies the start of a region and must be 1k aligned. END + is the last byte of the region. END + 1 must be 1k aligned. */ #define add_memory_map(start, end, mtype, msubtype) \ ({ \ if (memory_map_size == MEMORY_MAP_MAX) \ panic ("No more memory descriptor slots available.\n"); \ + /* Make sure START and END are 1k aligned. */ \ + assert (((start) & ((1 << 10) - 1)) == 0); \ + assert (((end) & ((1 << 10) - 1)) == (1 << 10) - 1); \ memory_map[memory_map_size].low = (start) >> 10; \ memory_map[memory_map_size].high = (end) >> 10; \ memory_map[memory_map_size].virtual = 0; \ |