Changeset a8844e0 in mainline for arch/ppc64/loader/main.c


Ignore:
Timestamp:
2006-04-09T16:37:14Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e3dd773
Parents:
89343aac
Message:

fix types, 64b arguments (breaks things yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified arch/ppc64/loader/main.c

    r89343aac ra8844e0  
    3333#define KERNEL_START ((void *) &_binary_____________kernel_kernel_bin_start)
    3434#define KERNEL_END ((void *) &_binary_____________kernel_kernel_bin_end)
    35 #define KERNEL_SIZE ((unsigned int) KERNEL_END - (unsigned int) KERNEL_START)
     35#define KERNEL_SIZE ((unsigned long) KERNEL_END - (unsigned long) KERNEL_START)
    3636
    3737#define HEAP_GAP 1024000
     
    4242static void check_align(const void *addr, const char *desc)
    4343{
    44         if ((unsigned int) addr % PAGE_SIZE != 0) {
     44        if ((unsigned long) addr % PAGE_SIZE != 0) {
    4545                printf("Error: %s not on page boundary, halting.\n", desc);
    4646                halt();
     
    4949
    5050
    51 static void fix_overlap(void *va, void **pa, const char *desc, unsigned int *top)
     51static void fix_overlap(void *va, void **pa, const char *desc, unsigned long *top)
    5252{
    53         if ((unsigned int) *pa + PAGE_SIZE < *top) {
     53        if ((unsigned long) *pa + PAGE_SIZE < *top) {
    5454                printf("Warning: %s overlaps kernel physical area\n", desc);
    5555               
    56                 void *new_va = (void *) (ALIGN_UP((unsigned int) KERNEL_END + HEAP_GAP, PAGE_SIZE) + *top);
     56                void *new_va = (void *) (ALIGN_UP((unsigned long) KERNEL_END + HEAP_GAP, PAGE_SIZE) + *top);
    5757                void *new_pa = (void *) (HEAP_GAP + *top);
    5858                *top += PAGE_SIZE;
     
    6363                }
    6464               
    65                 if ((unsigned int) new_pa + PAGE_SIZE < KERNEL_SIZE) {
     65                if ((unsigned long) new_pa + PAGE_SIZE < KERNEL_SIZE) {
    6666                        printf("Error: %s cannot be relocated, halting.\n", desc);
    6767                        halt();
     
    104104        void *trans_pa = ofw_translate(&trans);
    105105        void *bootinfo_pa = ofw_translate(&bootinfo);
    106         void *fb = (void *) (((unsigned int) bootinfo.screen.addr) & ((unsigned int) ~0 << 17));
     106        void *fb = (void *) (((unsigned long) bootinfo.screen.addr) & ((unsigned long) ~0 << 17));
    107107       
    108108        printf("\nMemory statistics (total %d MB)\n", bootinfo.memmap.total >> 20);
     
    112112        printf(" translation table    at %L (physical %L)\n", &trans, trans_pa);
    113113       
    114         unsigned int top = ALIGN_UP(KERNEL_SIZE, PAGE_SIZE);
    115         unsigned int addr;
     114        unsigned long top = ALIGN_UP(KERNEL_SIZE, PAGE_SIZE);
     115        unsigned long addr;
    116116        for (addr = 0; addr < KERNEL_SIZE; addr += PAGE_SIZE) {
    117117                void *pa = ofw_translate(KERNEL_START + addr);
Note: See TracChangeset for help on using the changeset viewer.