mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
Move mips-arc link address. Previous link address was chosen
in belief that RAM on SGI platforms grows down while in fact it grows up from an unusual base.
This commit is contained in:
1 parent
17fca5734b
commit
8528c879e3
7 files changed
+24
-19
No files matched your search
@@ -128,12 +128,16 @@ grub_machine_mmap_iterate (grub_memory_hook_t hook, void *hook_data)
|
||||
extern grub_uint32_t grub_total_modules_size __attribute__ ((section(".text")));
|
||||
grub_addr_t grub_modbase;
|
||||
|
||||
extern char _end[];
|
||||
|
||||
void
|
||||
grub_machine_init (void)
|
||||
{
|
||||
struct grub_arc_memory_descriptor *cur = NULL;
|
||||
grub_addr_t modend;
|
||||
|
||||
grub_modbase = GRUB_KERNEL_MIPS_ARC_LINK_ADDR - grub_total_modules_size;
|
||||
grub_modbase = ALIGN_UP ((grub_addr_t) _end, GRUB_KERNEL_MACHINE_MOD_ALIGN);
|
||||
modend = grub_modbase + grub_total_modules_size;
|
||||
grub_console_init_early ();
|
||||
|
||||
/* FIXME: measure this. */
|
||||
@@ -153,10 +157,10 @@ grub_machine_init (void)
|
||||
start = ((grub_uint64_t) cur->start_page) << 12;
|
||||
end = ((grub_uint64_t) cur->num_pages) << 12;
|
||||
end += start;
|
||||
if ((grub_uint64_t) end > ((GRUB_KERNEL_MIPS_ARC_LINK_ADDR
|
||||
- grub_total_modules_size) & 0x1fffffff))
|
||||
end = ((GRUB_KERNEL_MIPS_ARC_LINK_ADDR - grub_total_modules_size)
|
||||
& 0x1fffffff);
|
||||
if ((grub_uint64_t) start < (modend & 0x1fffffff))
|
||||
start = (modend & 0x1fffffff);
|
||||
if ((grub_uint64_t) end > 0x20000000)
|
||||
end = 0x20000000;
|
||||
if (end > start)
|
||||
grub_mm_init_region ((void *) (grub_addr_t) (start | 0x80000000),
|
||||
end - start);
|
||||
|
||||
@@ -73,7 +73,6 @@ cont:
|
||||
#endif
|
||||
|
||||
/* Move the modules out of BSS. */
|
||||
#ifndef GRUB_MACHINE_ARC
|
||||
lui $t2, %hi(__bss_start)
|
||||
addiu $t2, %lo(__bss_start)
|
||||
|
||||
@@ -103,7 +102,6 @@ modulesmovcont:
|
||||
b modulesmovcont
|
||||
addiu $t3, $t3, -1
|
||||
modulesmovdone:
|
||||
#endif
|
||||
|
||||
/* Clean BSS. */
|
||||
|
||||
|
||||
Reference in new issue
Block a user