- 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:
- kernel
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/boot/boot.h
r3abe07f5 r61e90dd 36 36 #define KERN_sparc64_BOOT_H_ 37 37 38 39 38 #define VMA 0x400000 40 39 #define LMA VMA … … 43 42 #ifndef __LINKER__ 44 43 44 #include <config.h> 45 45 #include <arch/types.h> 46 46 #include <typedefs.h> 47 #include <genarch/ofw/ofw_tree.h> 47 48 48 49 #define TASKMAP_MAX_RECORDS 32 … … 87 88 } processor_t; 88 89 90 /** Bootinfo structure. 91 * 92 * Must be in sync with bootinfo structure used by the boot loader. 93 */ 89 94 typedef struct { 90 95 taskmap_t taskmap; … … 93 98 keyboard_t keyboard; 94 99 processor_t processor; 100 ballocs_t ballocs; 101 ofw_tree_node_t *ofw_root; 95 102 } bootinfo_t; 96 103 -
kernel/arch/sparc64/src/sparc64.c
r3abe07f5 r61e90dd 52 52 void arch_pre_main(void) 53 53 { 54 /* Setup usermode*/54 /* Copy init task info. */ 55 55 init.cnt = bootinfo.taskmap.count; 56 56 … … 61 61 init.tasks[i].size = bootinfo.taskmap.tasks[i].size; 62 62 } 63 64 /* Copy boot allocations info. */ 65 ballocs.base = bootinfo.ballocs.base; 66 ballocs.size = bootinfo.ballocs.size; 63 67 } 64 68 -
kernel/genarch/Makefile.inc
r3abe07f5 r61e90dd 88 88 genarch/src/kbd/scanc_sun.c 89 89 endif 90 91 92 ## OpenFirmware Device Tree 93 ifeq ($(CONFIG_OFW_TREE), y) 94 GENARCH_SOURCES += \ 95 genarch/src/ofw/ofw_tree,c 96 endif -
kernel/generic/include/config.h
r3abe07f5 r61e90dd 56 56 } init_t; 57 57 58 /** Boot allocations. 59 * 60 * Allocatations made by the boot that are meant to be used by the kernel 61 * are all recorded in the ballocs_t type. 62 */ 63 typedef struct { 64 uintptr_t base; 65 size_t size; 66 } ballocs_t; 67 58 68 typedef struct { 59 69 count_t cpu_count; /**< Number of processors detected. */ … … 70 80 extern config_t config; 71 81 extern init_t init; 82 extern ballocs_t ballocs; 72 83 73 84 #endif -
kernel/generic/src/main/main.c
r3abe07f5 r61e90dd 95 95 }; 96 96 97 /** Boot allocations. */ 98 ballocs_t ballocs = { 99 .base = NULL, 100 .size = 0 101 }; 102 97 103 context_t ctx; 98 104 … … 106 112 size_t hardcoded_kdata_size = 0; /**< Size of the kernel data in bytes. */ 107 113 108 uintptr_t stack_safe = 0; /**< Lowest safe stack virtual address */114 uintptr_t stack_safe = 0; /**< Lowest safe stack virtual address */ 109 115 110 116 void main_bsp(void); … … 152 158 if (PA_overlaps(config.stack_base, config.stack_size, init.tasks[i].addr, init.tasks[i].size)) 153 159 config.stack_base = ALIGN_UP(init.tasks[i].addr + init.tasks[i].size, config.stack_size); 160 } 161 162 /* Avoid placing stack on top of boot allocations. */ 163 if (ballocs.size) { 164 if (PA_overlaps(config.stack_base, config.stack_size, ballocs.base, ballocs.size)) 165 config.stack_base = ALIGN_UP(ballocs.base + ballocs.size, PAGE_SIZE); 154 166 } 155 167 -
kernel/generic/src/mm/frame.c
r3abe07f5 r61e90dd 1078 1078 frame_mark_unavailable(ADDR2PFN(KA2PA(init.tasks[i].addr)), SIZE2FRAMES(init.tasks[i].size)); 1079 1079 1080 if (ballocs.size) 1081 frame_mark_unavailable(ADDR2PFN(KA2PA(ballocs.base)), SIZE2FRAMES(ballocs.size)); 1082 1080 1083 /* Black list first frame, as allocating NULL would 1081 1084 * fail in some places */
Note:
See TracChangeset
for help on using the changeset viewer.