Changeset 2e672fd in mainline for arch/ppc32/loader


Ignore:
Timestamp:
2006-07-10T20:48:40Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
daab5145
Parents:
822b64e
Message:

Some 32-bit vs. 64-bit fixes.

Make the call to OpenFirmware client interface architecture dependent.
For instance and contrary to my previous experience, the sparc64 version of
'translate' method would not work reliably unless the Address Mask bit in the
PSTATE register is cleared during duration of the call.

sparc64 and ppc32 OpenFirmware seem to differ in details, for example, the above
mentioned method 'translate' signals success by setting the first return value
to -1 on sparc64 while on ppc32 the value is/stays (???) zero.

Location:
arch/ppc32/loader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/loader/boot.S

    r822b64e r2e672fd  
    3434
    3535start:
    36         lis r4, ofw@ha
    37         addi r4, r4, ofw@l
     36        lis r4, ofw_cif@ha
     37        addi r4, r4, ofw_cif@l
    3838        stw r5, 0(r4)
    3939       
  • arch/ppc32/loader/main.c

    r822b64e r2e672fd  
    157157       
    158158        printf("\nBooting the kernel...\n");
    159         jump_to_kernel(bootinfo_pa, sizeof(bootinfo), trans_pa, pages << PAGE_WIDTH, real_mode_pa, bootinfo.screen.addr, bootinfo.screen.scanline);
     159        jump_to_kernel(bootinfo_pa, sizeof(bootinfo), trans_pa, pages << PAGE_WIDTH, real_mode_pa, (void *) bootinfo.screen.addr, bootinfo.screen.scanline);
    160160}
  • arch/ppc32/loader/ofw.c

    r822b64e r2e672fd  
    3030#include <printf.h>
    3131
     32typedef int (* ofw_entry_t)(ofw_args_t *args);
     33
     34int ofw(ofw_args_t *args)
     35{
     36        return ((ofw_entry_t) ofw_cif)(args);
     37}
     38
    3239void write(const char *str, const int len)
    3340{
     
    4956        if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0)
    5057                return false;
    51         keyboard->addr = (void *) macio.addr.addr_lo;
     58        keyboard->addr = macio.addr.addr_lo;
    5259        keyboard->size = macio.size_lo;
    5360
    5461        return true;
    5562}
     63
     64int ofw_translate_failed(ofw_arg_t flag)
     65{
     66        return 0;
     67}
Note: See TracChangeset for help on using the changeset viewer.