- increasing the readability
git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@396 315a16e6-25f9-4109-90ae-ca3045a26c18
This commit is contained in:
parent
23ed873c24
commit
9130e9f03c
3 changed files with 8 additions and 3 deletions
|
@ -28,6 +28,11 @@
|
|||
* which specifies an interface between a boot loader and a operating system
|
||||
*/
|
||||
|
||||
/* are there modules to do something with? */
|
||||
#define MULTIBOOT_INFO_MODS 0x00000008
|
||||
/* is there a full memory map? */
|
||||
#define MULTIBOOT_INFO_MEM_MAP 0x00000040
|
||||
|
||||
typedef uint16_t multiboot_uint16_t;
|
||||
typedef uint32_t multiboot_uint32_t;
|
||||
typedef uint64_t multiboot_uint64_t;
|
||||
|
|
|
@ -218,7 +218,7 @@ int initrd_init(void)
|
|||
uint32_t mods_count = 0;
|
||||
multiboot_module_t* mmodule = NULL;
|
||||
|
||||
if (mb_info && (mb_info->flags & (1 << 3))) {
|
||||
if (mb_info && (mb_info->flags & MULTIBOOT_INFO_MODS)) {
|
||||
mmodule = (multiboot_module_t*) mb_info->mods_addr;
|
||||
mods_count = mb_info->mods_count;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ int mmu_init(void)
|
|||
size_t addr, end_addr;
|
||||
|
||||
#ifdef CONFIG_MULTIBOOT
|
||||
if (mb_info && (mb_info->flags & (1 << 6))) {
|
||||
if (mb_info && (mb_info->flags & MULTIBOOT_INFO_MEM_MAP)) {
|
||||
multiboot_memory_map_t* mmap = (multiboot_memory_map_t*) mb_info->mmap_addr;
|
||||
multiboot_memory_map_t* mmap_end = (void*) ((size_t) mb_info->mmap_addr + mb_info->mmap_length);
|
||||
|
||||
|
@ -124,7 +124,7 @@ int mmu_init(void)
|
|||
* Modules like the init ram disk are already loaded.
|
||||
* Therefore, we set these pages as used.
|
||||
*/
|
||||
if (mb_info && (mb_info->flags & (1 << 3))) {
|
||||
if (mb_info && (mb_info->flags & MULTIBOOT_INFO_MODS)) {
|
||||
multiboot_module_t* mmodule = (multiboot_module_t*) mb_info->mods_addr;
|
||||
|
||||
for(i=0; i<mb_info->mods_count; i++, mmodule++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue