* grub-core/partmap/dfly.c: New partition map.
This commit is contained in:
parent
141430a295
commit
5bac5d9ad6
3 changed files with 19 additions and 17 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2013-05-16 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/arm/uboot/startup.S: Move stack before modules.
|
||||||
|
|
||||||
2013-05-16 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-05-16 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/lib/dtc/libfdt-grub.diff: Remove extraneous uintptr_t
|
* grub-core/lib/dtc/libfdt-grub.diff: Remove extraneous uintptr_t
|
||||||
|
|
|
@ -39,11 +39,9 @@
|
||||||
* Also where global/static variables are located.
|
* Also where global/static variables are located.
|
||||||
* _end:
|
* _end:
|
||||||
* End of bss region (but not necessarily module blob).
|
* End of bss region (but not necessarily module blob).
|
||||||
* <overflow>:
|
* <stack>:
|
||||||
* Any part of the module blob that extends beyond _end.
|
|
||||||
* <modules>:
|
* <modules>:
|
||||||
* Loadable modules, post relocation.
|
* Loadable modules, post relocation.
|
||||||
* <stack>:
|
|
||||||
* <heap>:
|
* <heap>:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -71,8 +69,7 @@ FUNCTION(codestart)
|
||||||
str r2, [r12]
|
str r2, [r12]
|
||||||
|
|
||||||
@ Modules have been stored as a blob in BSS,
|
@ Modules have been stored as a blob in BSS,
|
||||||
@ they need to be manually relocated to _end or
|
@ they need to be manually relocated to _end
|
||||||
@ (__bss_start + grub_total_module_size), whichever greater.
|
|
||||||
ldr r0, =EXT_C(__bss_start) @ src
|
ldr r0, =EXT_C(__bss_start) @ src
|
||||||
add r0, r0, #(GRUB_KERNEL_MACHINE_MOD_ALIGN - 1)
|
add r0, r0, #(GRUB_KERNEL_MACHINE_MOD_ALIGN - 1)
|
||||||
mvn r1, #(GRUB_KERNEL_MACHINE_MOD_ALIGN - 1)
|
mvn r1, #(GRUB_KERNEL_MACHINE_MOD_ALIGN - 1)
|
||||||
|
@ -80,23 +77,25 @@ FUNCTION(codestart)
|
||||||
|
|
||||||
ldr r1, =EXT_C(_end) @ dst = End of BSS
|
ldr r1, =EXT_C(_end) @ dst = End of BSS
|
||||||
ldr r2, grub_total_module_size @ blob size
|
ldr r2, grub_total_module_size @ blob size
|
||||||
add r3, r0, r2 @ blob end
|
|
||||||
cmp r1, r3 @ _end < blob end?
|
add r1, r1, #GRUB_KERNEL_MACHINE_STACK_SIZE
|
||||||
movlt r1, r3 @ dst = blob end + blob size
|
and r1, r1, #~0x7 @ Ensure 8-byte alignment
|
||||||
|
sub sp, r1, #8
|
||||||
|
add r1, r1, #1024
|
||||||
|
|
||||||
ldr r12, =EXT_C(grub_modbase)
|
ldr r12, =EXT_C(grub_modbase)
|
||||||
str r1, [r12]
|
str r1, [r12]
|
||||||
|
|
||||||
1: ldr r3, [r0], #4 @ r3 = *src++
|
add r1, r1, r2
|
||||||
str r3, [r1], #4 @ *dst++ = r3
|
add r0, r0, r2
|
||||||
|
sub r1, r1, #4
|
||||||
|
sub r0, r0, #4
|
||||||
|
|
||||||
|
1: ldr r3, [r0], #-4 @ r3 = *src--
|
||||||
|
str r3, [r1], #-4 @ *dst-- = r3
|
||||||
subs r2, #4 @ remaining -= 4
|
subs r2, #4 @ remaining -= 4
|
||||||
bne 1b @ while remaining != 0
|
bne 1b @ while remaining != 0
|
||||||
|
|
||||||
@ Set up a new stack, beyond the end of copied modules.
|
|
||||||
ldr r3, =GRUB_KERNEL_MACHINE_STACK_SIZE
|
|
||||||
add r3, r1, r3 @ Place stack beyond end of modules
|
|
||||||
and sp, r3, #~0x7 @ Ensure 8-byte alignment
|
|
||||||
|
|
||||||
@ Since we _are_ the C run-time, we need to manually zero the BSS
|
@ Since we _are_ the C run-time, we need to manually zero the BSS
|
||||||
@ region before continuing
|
@ region before continuing
|
||||||
ldr r0, =EXT_C(__bss_start) @ zero from here
|
ldr r0, =EXT_C(__bss_start) @ zero from here
|
||||||
|
|
|
@ -40,8 +40,7 @@ grub_uboot_mm_init (void)
|
||||||
{
|
{
|
||||||
struct sys_info *si = grub_uboot_get_sys_info ();
|
struct sys_info *si = grub_uboot_get_sys_info ();
|
||||||
|
|
||||||
grub_mm_init_region ((void *) (grub_modules_get_end ()
|
grub_mm_init_region ((void *) grub_modules_get_end (),
|
||||||
+ GRUB_KERNEL_MACHINE_STACK_SIZE),
|
|
||||||
GRUB_KERNEL_MACHINE_HEAP_SIZE);
|
GRUB_KERNEL_MACHINE_HEAP_SIZE);
|
||||||
|
|
||||||
if (si && (si->mr_no != 0))
|
if (si && (si->mr_no != 0))
|
||||||
|
|
Loading…
Reference in a new issue