- Timestamp:
- 2006-09-23T13:12:10Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ff1f1e
- Parents:
- 28ecadb
- Location:
- boot/arch/sparc64/loader
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/sparc64/loader/main.c
r28ecadb r5d684e4 58 58 } 59 59 60 if (!ofw_screen(&bootinfo.screen)) {61 printf("Error: unable to get screen properties, halting.\n");62 halt();63 }64 bootinfo.screen.addr = ofw_translate(bootinfo.screen.addr);65 /* transform scanline to bytes with respect to potential alignment */66 bootinfo.screen.scanline = bootinfo.screen.scanline*bpp2align[bootinfo.screen.bpp >> 3];67 68 60 if (!ofw_cpu(&bootinfo.cpu)) 69 61 printf("Error: unable to get cpu properties\n"); 70 62 71 printf("\nDevice statistics\n");63 printf("\nDevice info\n"); 72 64 printf(" cpu: %dMHz\n", bootinfo.cpu.clock_frequency/1000000); 73 65 printf(" memory: %dM\n", bootinfo.memmap.total>>20); 74 printf(" screen at %P, resolution %dx%d, %d bpp (scanline %d bytes)\n", (uintptr_t) bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline);75 66 76 67 printf("\nMemory statistics\n"); -
boot/arch/sparc64/loader/main.h
r28ecadb r5d684e4 54 54 taskmap_t taskmap; 55 55 memmap_t memmap; 56 screen_t screen;57 56 cpu_t cpu; 58 57 ballocs_t ballocs; -
boot/arch/sparc64/loader/ofwarch.c
r28ecadb r5d684e4 38 38 #include "main.h" 39 39 40 int bpp2align[] = {41 [0] = 0, /** Invalid bpp. */42 [1] = 1, /** 8bpp is not aligned. */43 [2] = 2, /** 16bpp is naturally aligned. */44 [3] = 4, /** 24bpp is aligned on 4 byte boundary. */45 [4] = 4, /** 32bpp is naturally aligned. */46 };47 48 40 void write(const char *str, const int len) 49 41 { … … 60 52 { 61 53 return flag != -1; 62 }63 64 int ofw_keyboard(keyboard_t *keyboard)65 {66 char device_name[BUF_SIZE];67 uint32_t virtaddr;68 69 if (ofw_get_property(ofw_aliases, "keyboard", device_name, sizeof(device_name)) <= 0)70 return false;71 72 phandle device = ofw_find_device(device_name);73 if (device == -1)74 return false;75 76 if (ofw_get_property(device, "address", &virtaddr, sizeof(virtaddr)) <= 0)77 return false;78 79 if (!(keyboard->addr = ofw_translate((void *) ((uintptr_t) virtaddr))))80 return false;81 82 return true;83 54 } 84 55
Note:
See TracChangeset
for help on using the changeset viewer.