- Timestamp:
- 2006-09-19T22:42:57Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 16529d5
- Parents:
- 3abe07f5
- Location:
- boot
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/sparc64/loader/Makefile
r3abe07f5 r61e90dd 53 53 ../../../generic/printf.c \ 54 54 ../../../generic/string.c \ 55 ../../../genarch/balloc.c \ 55 56 ../../../genarch/ofw.c \ 56 57 ../../../genarch/ofw_tree.c \ -
boot/arch/sparc64/loader/main.c
r3abe07f5 r61e90dd 31 31 #include "asm.h" 32 32 #include "_components.h" 33 #include <balloc.h> 33 34 #include <ofw.h> 35 #include <ofw_tree.h> 34 36 #include "ofwarch.h" 35 37 #include <align.h> … … 84 86 printf(" %P: %s image (size %d bytes)\n", components[i].start, components[i].name, components[i].size); 85 87 88 void * base = (void *) KERNEL_VIRTUAL_ADDRESS; 89 unsigned int top = 0; 90 86 91 printf("\nCopying components\n"); 87 unsigned int top = 0;88 92 bootinfo.taskmap.count = 0; 89 93 for (i = 0; i < COMPONENTS; i++) { 90 void * base = (void *) KERNEL_VIRTUAL_ADDRESS;91 92 94 printf(" %s...", components[i].name); 93 95 top = ALIGN_UP(top, PAGE_SIZE); … … 102 104 } 103 105 106 balloc_init(&bootinfo.ballocs, ALIGN_UP(((uintptr_t) base) + top, PAGE_SIZE)); 107 108 printf("\nCanonizing OpenFirmware device tree..."); 109 bootinfo.ofw_root = ofw_tree_build(); 110 printf("done.\n"); 111 104 112 printf("\nBooting the kernel...\n"); 105 113 jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo, sizeof(bootinfo)); -
boot/arch/sparc64/loader/main.h
r3abe07f5 r61e90dd 31 31 32 32 #include <ofw.h> 33 #include <ofw_tree.h> 34 #include <balloc.h> 33 35 #include <types.h> 34 36 … … 55 57 keyboard_t keyboard; 56 58 cpu_t cpu; 59 ballocs_t ballocs; 60 ofw_tree_node_t *ofw_root; 57 61 } bootinfo_t; 58 62 -
boot/genarch/ofw_tree.c
r3abe07f5 r61e90dd 31 31 #include <types.h> 32 32 #include <string.h> 33 #include <balloc.h> 33 34 34 35 static ofw_tree_node_t *ofw_tree_node_alloc(void) 35 36 { 36 return NULL;37 return balloc(sizeof(ofw_tree_node_t), sizeof(ofw_tree_node_t)); 37 38 } 38 39 39 40 static ofw_tree_property_t *ofw_tree_properties_alloc(unsigned count) 40 41 { 41 return NULL;42 return balloc(count * sizeof(ofw_tree_property_t), sizeof(ofw_tree_property_t)); 42 43 } 43 44 44 45 static void * ofw_tree_space_alloc(size_t size) 45 46 { 46 return NULL;47 return balloc(size, size); 47 48 } 48 49 -
boot/genarch/ofw_tree.h
r3abe07f5 r61e90dd 38 38 typedef struct ofw_tree_property ofw_tree_property_t; 39 39 40 /** Memory representation of OpenFirmware device tree node. */ 40 41 struct ofw_tree_node { 41 42 ofw_tree_node_t *parent; … … 43 44 ofw_tree_node_t *child; 44 45 45 unsigned properties; 46 unsigned properties; /**< Number of properties. */ 46 47 ofw_tree_property_t *property; 47 48 }; 48 49 50 /** Memory representation of OpenFirmware device tree node property. */ 49 51 struct ofw_tree_property { 50 52 char name[OFW_TREE_PROPERTY_MAX_NAMELEN];
Note:
See TracChangeset
for help on using the changeset viewer.