|
@@ -522,10 +522,12 @@ static void bzimage_load_initrds ( struct image *image,
|
522
|
522
|
|
523
|
523
|
/* Find highest usable address */
|
524
|
524
|
top = userptr_add ( highest->data, bzimage_align ( highest->len ) );
|
525
|
|
- if ( user_to_phys ( top, 0 ) > bzimg->mem_limit )
|
526
|
|
- top = phys_to_user ( bzimg->mem_limit );
|
|
525
|
+ if ( user_to_phys ( top, -1 ) > bzimg->mem_limit ) {
|
|
526
|
+ top = phys_to_user ( ( bzimg->mem_limit + 1 ) &
|
|
527
|
+ ~( INITRD_ALIGN - 1 ) );
|
|
528
|
+ }
|
527
|
529
|
DBGC ( image, "bzImage %p loading initrds from %#08lx downwards\n",
|
528
|
|
- image, user_to_phys ( top, 0 ) );
|
|
530
|
+ image, user_to_phys ( top, -1 ) );
|
529
|
531
|
|
530
|
532
|
/* Load initrds in order */
|
531
|
533
|
for_each_image ( initrd ) {
|