Changeset 6196dae in mainline


Ignore:
Timestamp:
2009-01-28T15:22:54Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f3776a3
Parents:
623dc03
Message:

correct memory mapping for machines with physical memory displacement
this fixes booting on machines whose physical memory does not start at 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/sparc64/loader/main.c

    r623dc03 r6196dae  
    143143                silo_ramdisk_image -= 0x400000;
    144144                /* Install 1:1 mapping for the ramdisk. */
    145                 if (ofw_map((void *)((uintptr_t)silo_ramdisk_image),
    146                     (void *)((uintptr_t)silo_ramdisk_image),
     145                if (ofw_map((void *)((uintptr_t) silo_ramdisk_image),
     146                    (void *)((uintptr_t) silo_ramdisk_image),
    147147                    silo_ramdisk_size, -1) != 0) {
    148148                        printf("Failed to map ramdisk.\n");
     
    204204                 */
    205205                (void) ofw_claim_phys(base + top, silo_ramdisk_size);
    206                 (void) ofw_map(base + top, base + top, silo_ramdisk_size, -1);
     206                (void) ofw_map(bootinfo.physmem_start + base + top, base + top,
     207                    silo_ramdisk_size, -1);
    207208                memmove(base + top, (void *)((uintptr_t)silo_ramdisk_image),
    208209                    silo_ramdisk_size);
     
    254255        (void) ofw_claim_phys(bootinfo.physmem_start + balloc_base,
    255256            BALLOC_MAX_SIZE);
    256         (void) ofw_map(balloc_base, balloc_base, BALLOC_MAX_SIZE, -1);
     257        (void) ofw_map(bootinfo.physmem_start + balloc_base, balloc_base,
     258            BALLOC_MAX_SIZE, -1);
    257259        balloc_init(&bootinfo.ballocs, (uintptr_t)balloc_base);
    258260
     
    275277            sizeof(bootinfo));
    276278}
    277 
Note: See TracChangeset for help on using the changeset viewer.