Rev 4022 | Rev 4220 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4022 | Rev 4193 | ||
---|---|---|---|
Line 98... | Line 98... | ||
98 | } |
98 | } |
99 | 99 | ||
100 | /* Copy module information. */ |
100 | /* Copy module information. */ |
101 | 101 | ||
102 | if ((flags & MBINFO_FLAGS_MODS) != 0) { |
102 | if ((flags & MBINFO_FLAGS_MODS) != 0) { |
103 | init.cnt = mi->mods_count; |
103 | init.cnt = min(mi->mods_count, CONFIG_INIT_TASKS); |
104 | mods = (multiboot_mod_t *) MULTIBOOT_PTR(mi->mods_addr); |
104 | mods = (multiboot_mod_t *) MULTIBOOT_PTR(mi->mods_addr); |
105 | 105 | ||
106 | for (i = 0; i < init.cnt; i++) { |
106 | for (i = 0; i < init.cnt; i++) { |
107 | init.tasks[i].addr = PA2KA(mods[i].start); |
107 | init.tasks[i].addr = PA2KA(mods[i].start); |
108 | init.tasks[i].size = mods[i].end - mods[i].start; |
108 | init.tasks[i].size = mods[i].end - mods[i].start; |
Line 128... | Line 128... | ||
128 | mmap_length = mi->mmap_length; |
128 | mmap_length = mi->mmap_length; |
129 | mme = MULTIBOOT_PTR(mi->mmap_addr); |
129 | mme = MULTIBOOT_PTR(mi->mmap_addr); |
130 | e820counter = 0; |
130 | e820counter = 0; |
131 | 131 | ||
132 | i = 0; |
132 | i = 0; |
133 | while (mmap_length > 0) { |
133 | while ((mmap_length > 0) && (i < MEMMAP_E820_MAX_RECORDS)) { |
134 | e820table[i++] = mme->mm_info; |
134 | e820table[i++] = mme->mm_info; |
135 | 135 | ||
136 | /* Compute address of next structure. */ |
136 | /* Compute address of next structure. */ |
137 | size = sizeof(mme->size) + mme->size; |
137 | size = sizeof(mme->size) + mme->size; |
138 | mme = ((void *) mme) + size; |
138 | mme = ((void *) mme) + size; |