Rev 854 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 854 | Rev 861 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | module_t *mod; |
34 | module_t *mod; |
35 | int i; |
35 | int i; |
36 | 36 | ||
37 | printf ("mods_count = %d, mods_addr = 0x%x\n", |
37 | // printf ("mods_count = %d, mods_addr = 0x%x\n", |
Line 38... | Line 38... | ||
38 | (u32_t) boot_mbi->mods_count, (u32_t) boot_mbi->mods_addr); |
38 | // (u32_t) boot_mbi->mods_count, (u32_t) boot_mbi->mods_addr); |
39 | for (i = 0, mod = (module_t *) boot_mbi->mods_addr; |
39 | for (i = 0, mod = (module_t *) boot_mbi->mods_addr; |
40 | i < boot_mbi->mods_count;i++, mod++) |
40 | i < boot_mbi->mods_count;i++, mod++) |
41 | { |
41 | { |
42 | pg_balloc = mod->mod_end; |
42 | pg_balloc = mod->mod_end; |
43 | printf (" mod_start = 0x%x, mod_end = 0x%x, string = %s\n", |
43 | // printf (" mod_start = 0x%x, mod_end = 0x%x, string = %s\n", |
44 | (u32_t) mod->mod_start,(u32_t) mod->mod_end, (char *) mod->string); |
44 | // (u32_t) mod->mod_start,(u32_t) mod->mod_end, (char *) mod->string); |
45 | }; |
45 | }; |
46 | mod--; |
46 | mod--; |
47 | rd_base = mod->mod_start+OS_BASE; |
47 | rd_base = mod->mod_start+OS_BASE; |
48 | rd_fat = rd_base + 512; |
48 | rd_fat = rd_base + 512; |
49 | rd_fat_end = rd_base + 512 + 4278; |
49 | rd_fat_end = rd_base + 512 + 4278; |
50 | rd_root = rd_base + 512*19; |
50 | rd_root = rd_base + 512*19; |
51 | rd_root_end = rd_base + 512*33; |
51 | rd_root_end = rd_base + 512*33; |
52 | printf(" rd_base = %x\n", rd_base); |
52 | // printf(" rd_base = %x\n", rd_base); |
53 | } |
53 | } |
54 | 54 | ||
Line 55... | Line 55... | ||
55 | if (CHECK_FLAG (boot_mbi->flags, 6)) |
55 | if (CHECK_FLAG (boot_mbi->flags, 6)) |
56 | { |
56 | { |
57 | memory_map_t *mmap; |
57 | memory_map_t *mmap; |
58 | u32_t page; |
58 | u32_t page; |
Line 59... | Line 59... | ||
59 | 59 | ||
60 | printf ("mmap_addr = 0x%x, mmap_length = 0x%x\n", |
60 | // printf ("mmap_addr = 0x%x, mmap_length = 0x%x\n", |
Line 61... | Line 61... | ||
61 | (unsigned) boot_mbi->mmap_addr, (unsigned) boot_mbi->mmap_length); |
61 | // (unsigned) boot_mbi->mmap_addr, (unsigned) boot_mbi->mmap_length); |
62 | 62 | ||
63 | for (mmap = (memory_map_t *) boot_mbi->mmap_addr; |
63 | for (mmap = (memory_map_t *) boot_mbi->mmap_addr; |
64 | (u32_t) mmap < boot_mbi->mmap_addr + boot_mbi->mmap_length; |
64 | (u32_t) mmap < boot_mbi->mmap_addr + boot_mbi->mmap_length; |
65 | mmap = (memory_map_t *) ((u32_t) mmap |
65 | mmap = (memory_map_t *) ((u32_t) mmap |
66 | + mmap->size + sizeof (mmap->size))) |
66 | + mmap->size + sizeof (mmap->size))) |
67 | { |
67 | { |
68 | u32_t page; |
68 | u32_t page; |
69 | 69 | /* |
|
70 | printf (" size = 0x%x, base_addr = 0x%x%x," |
70 | printf (" size = 0x%x, base_addr = 0x%x%x," |
71 | " length = 0x%x%x, type = 0x%x\n", |
71 | " length = 0x%x%x, type = 0x%x\n", |
72 | (unsigned) mmap->size, |
72 | (unsigned) mmap->size, |
73 | (unsigned) mmap->base_addr_high, |
73 | (unsigned) mmap->base_addr_high, |
74 | (unsigned) mmap->base_addr_low, |
74 | (unsigned) mmap->base_addr_low, |
75 | (unsigned) mmap->length_high, |
75 | (unsigned) mmap->length_high, |
76 | (unsigned) mmap->length_low, |
76 | (unsigned) mmap->length_low, |
77 | (unsigned) mmap->type); |
77 | (unsigned) mmap->type); |
78 | 78 | */ |
|
79 | if( mmap->type != 1) |
79 | if( mmap->type != 1) |
80 | continue; |
80 | continue; |
81 | page = (mmap->base_addr_low+mmap->length_low)&(~4095); |
81 | page = (mmap->base_addr_low+mmap->length_low)&(~4095); |