- Timestamp:
- 2006-07-13T17:32:38Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a5f76758
- Parents:
- 63cda71
- Location:
- boot
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/sparc64/loader/asm.S
r63cda71 r94d614e 99 99 100 100 jump_to_kernel: 101 set ofw_cif, %l0 102 jmp %o0 ! jump to kernel 103 ldx [%l0], %o4 ! pass OpenFirmware address in %o4 101 mov %o0, %l1 102 mov %o1, %o0 103 mov %o2, %o1 104 jmp %l1 ! jump to kernel 105 nop 104 106 105 107 .global ofw -
boot/arch/sparc64/loader/main.c
r63cda71 r94d614e 81 81 printf("\nCopying components\n"); 82 82 unsigned int top = 0; 83 bootinfo. cnt = 0;83 bootinfo.taskmap.count = 0; 84 84 for (i = 0; i < COMPONENTS; i++) { 85 void * base = (void *) KERNEL_VIRTUAL_ADDRESS; 86 85 87 printf(" %s...", components[i].name); 86 88 top = ALIGN_UP(top, PAGE_SIZE); 87 memcpy( ((void *) KERNEL_VIRTUAL_ADDRESS)+ top, components[i].start, components[i].size);89 memcpy(base + top, components[i].start, components[i].size); 88 90 if (i > 0) { 89 bootinfo.task s[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS)+ top;90 bootinfo.task s[bootinfo.cnt].size = components[i].size;91 bootinfo. cnt++;91 bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr = base + top; 92 bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = components[i].size; 93 bootinfo.taskmap.count++; 92 94 } 93 95 top += components[i].size; -
boot/arch/sparc64/loader/main.h
r63cda71 r94d614e 31 31 32 32 #include <ofw.h> 33 #include <types.h> 33 34 34 35 #define TASKMAP_MAX_RECORDS 32 … … 36 37 typedef struct { 37 38 void *addr; 38 u nsigned int size;39 uint32_t size; 39 40 } task_t; 40 41 41 42 typedef struct { 42 u nsigned int cnt;43 uint32_t count; 43 44 task_t tasks[TASKMAP_MAX_RECORDS]; 45 } taskmap_t; 46 47 typedef struct { 48 taskmap_t taskmap; 44 49 memmap_t memmap; 45 50 screen_t screen; -
boot/genarch/ofw.c
r63cda71 r94d614e 75 75 } 76 76 77 77 /** Perform a call to OpenFirmware client interface. 78 * 79 * @param service String identifying the service requested. 80 * @param nargs Number of input arguments. 81 * @param nret Number of output arguments. This includes the return value. 82 * @param rets Buffer for output arguments or NULL. The buffer must accommodate nret - 1 items. 83 * 84 * @return Return value returned by the client interface. 85 */ 78 86 static unsigned long ofw_call(const char *service, const int nargs, const int nret, ofw_arg_t *rets, ...) 79 87 { … … 82 90 int i; 83 91 84 args.service = service;92 args.service = (ofw_arg_t) service; 85 93 args.nargs = nargs; 86 94 args.nret = nret; -
boot/genarch/ofw.h
r63cda71 r94d614e 47 47 */ 48 48 typedef struct { 49 const char *service; /**< Command name*/50 unsigned long nargs; /**< Number of in arguments*/51 unsigned long nret; /**< Number of out arguments*/52 ofw_arg_t args[MAX_OFW_ARGS]; /**< List of arguments */49 ofw_arg_t service; /**< Command name. */ 50 ofw_arg_t nargs; /**< Number of in arguments. */ 51 ofw_arg_t nret; /**< Number of out arguments. */ 52 ofw_arg_t args[MAX_OFW_ARGS]; /**< List of arguments. */ 53 53 } ofw_args_t; 54 54 55 55 typedef struct { 56 56 void *start; 57 u nsigned int size;57 uint32_t size; 58 58 } memzone_t; 59 59 60 60 typedef struct { 61 u nsigned int total;62 u nsigned int count;61 uint32_t total; 62 uint32_t count; 63 63 memzone_t zones[MEMMAP_MAX_RECORDS]; 64 64 } memmap_t; … … 66 66 typedef struct { 67 67 void *addr; 68 u nsigned int width;69 u nsigned int height;70 u nsigned int bpp;71 u nsigned int scanline;68 uint32_t width; 69 uint32_t height; 70 uint32_t bpp; 71 uint32_t scanline; 72 72 } screen_t; 73 73 74 74 typedef struct { 75 75 void *addr; 76 u nsigned int size;76 uint32_t size; 77 77 } keyboard_t; 78 78 79 79 typedef struct { 80 u nsigned int info;81 u nsigned int addr_hi;82 u nsigned int addr_lo;80 uint32_t info; 81 uint32_t addr_hi; 82 uint32_t addr_lo; 83 83 } pci_addr_t; 84 84 85 85 typedef struct { 86 86 pci_addr_t addr; 87 u nsigned int size_hi;88 u nsigned int size_lo;87 uint32_t size_hi; 88 uint32_t size_lo; 89 89 } pci_reg_t; 90 90
Note:
See TracChangeset
for help on using the changeset viewer.