Changeset a8844e0 in mainline for arch/ppc64/loader/main.c
- Timestamp:
- 2006-04-09T16:37:14Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e3dd773
- Parents:
- 89343aac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified arch/ppc64/loader/main.c ¶
r89343aac ra8844e0 33 33 #define KERNEL_START ((void *) &_binary_____________kernel_kernel_bin_start) 34 34 #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) 36 36 37 37 #define HEAP_GAP 1024000 … … 42 42 static void check_align(const void *addr, const char *desc) 43 43 { 44 if ((unsigned int) addr % PAGE_SIZE != 0) {44 if ((unsigned long) addr % PAGE_SIZE != 0) { 45 45 printf("Error: %s not on page boundary, halting.\n", desc); 46 46 halt(); … … 49 49 50 50 51 static void fix_overlap(void *va, void **pa, const char *desc, unsigned int*top)51 static void fix_overlap(void *va, void **pa, const char *desc, unsigned long *top) 52 52 { 53 if ((unsigned int) *pa + PAGE_SIZE < *top) {53 if ((unsigned long) *pa + PAGE_SIZE < *top) { 54 54 printf("Warning: %s overlaps kernel physical area\n", desc); 55 55 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); 57 57 void *new_pa = (void *) (HEAP_GAP + *top); 58 58 *top += PAGE_SIZE; … … 63 63 } 64 64 65 if ((unsigned int) new_pa + PAGE_SIZE < KERNEL_SIZE) {65 if ((unsigned long) new_pa + PAGE_SIZE < KERNEL_SIZE) { 66 66 printf("Error: %s cannot be relocated, halting.\n", desc); 67 67 halt(); … … 104 104 void *trans_pa = ofw_translate(&trans); 105 105 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)); 107 107 108 108 printf("\nMemory statistics (total %d MB)\n", bootinfo.memmap.total >> 20); … … 112 112 printf(" translation table at %L (physical %L)\n", &trans, trans_pa); 113 113 114 unsigned inttop = ALIGN_UP(KERNEL_SIZE, PAGE_SIZE);115 unsigned intaddr;114 unsigned long top = ALIGN_UP(KERNEL_SIZE, PAGE_SIZE); 115 unsigned long addr; 116 116 for (addr = 0; addr < KERNEL_SIZE; addr += PAGE_SIZE) { 117 117 void *pa = ofw_translate(KERNEL_START + addr);
Note:
See TracChangeset
for help on using the changeset viewer.