Changeset 38fe9d0 in mainline for arch/ppc32/loader/main.c


Ignore:
Timestamp:
2006-04-02T15:10:41Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
89343aac
Parents:
730de779
Message:

add instruction cache flush
align framebuffer on 128K boundary
change OFW calling method
make OFW code more compatible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/loader/main.c

    r730de779 r38fe9d0  
    4343{
    4444        if ((unsigned int) addr % PAGE_SIZE != 0) {
    45                 printf("Error: %s not on page boundary\n", desc);
     45                printf("Error: %s not on page boundary, halting.\n", desc);
    4646                halt();
    4747        }
     
    5959               
    6060                if (ofw_map(new_pa, new_va, PAGE_SIZE, 0) != 0) {
    61                         printf("Error: Unable to map page aligned memory at %L (physical %L)\n", new_va, new_pa);
     61                        printf("Error: Unable to map page aligned memory at %L (physical %L), halting.\n", new_va, new_pa);
    6262                        halt();
    6363                }
    6464               
    6565                if ((unsigned int) new_pa + PAGE_SIZE < KERNEL_SIZE) {
    66                         printf("Error: %s cannot be relocated\n", desc);
     66                        printf("Error: %s cannot be relocated, halting.\n", desc);
    6767                        halt();
    6868                }
     
    8484       
    8585        if (!ofw_memmap(&bootinfo.memmap)) {
    86                 printf("Error: Unable to get memory map\n");
     86                printf("Error: Unable to get memory map, halting.\n");
     87                halt();
     88        }
     89       
     90        if (bootinfo.memmap.total == 0) {
     91                printf("Error: No memory detected, halting.\n");
    8792                halt();
    8893        }
    8994       
    9095        if (!ofw_screen(&bootinfo.screen)) {
    91                 printf("Error: Unable to get screen properties\n");
     96                printf("Error: Unable to get screen properties, halting.\n");
    9297                halt();
    9398        }
     
    99104        void *trans_pa = ofw_translate(&trans);
    100105        void *bootinfo_pa = ofw_translate(&bootinfo);
     106        void *fb = (void *) (((unsigned int) bootinfo.screen.addr) & ((unsigned int) ~0 << 17));
    101107       
    102108        printf("\nMemory statistics (total %d MB)\n", bootinfo.memmap.total >> 20);
     
    119125       
    120126        printf("\nBooting the kernel...\n");
    121         jump_to_kernel(bootinfo_pa, sizeof(bootinfo), trans_pa, KERNEL_SIZE, real_mode_pa);
     127        jump_to_kernel(bootinfo_pa, sizeof(bootinfo), trans_pa, KERNEL_SIZE, fb, real_mode_pa);
    122128}
Note: See TracChangeset for help on using the changeset viewer.