Changeset 96e0748d in mainline for kernel/arch/arm32
- Timestamp:
- 2009-02-17T22:47:27Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f89979b
- Parents:
- e662a5f
- Location:
- kernel/arch/arm32
- Files:
-
- 1 deleted
- 4 edited
-
include/arch.h (modified) (2 diffs)
-
include/asm/boot.h (modified) (2 diffs)
-
include/boot.h (deleted)
-
src/arm32.c (modified) (2 diffs)
-
src/start.S (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/arch.h
re662a5f r96e0748d 27 27 */ 28 28 29 /** @addtogroup arm32 29 /** @addtogroup arm32 30 30 * @{ 31 31 */ … … 37 37 #define KERN_arm32_ARCH_H_ 38 38 39 #define TASKMAP_MAX_RECORDS 32 40 #define CPUMAP_MAX_RECORDS 32 41 42 #include <typedefs.h> 43 44 typedef struct { 45 uintptr_t addr; 46 uint32_t size; 47 } utask_t; 48 49 typedef struct { 50 uint32_t cnt; 51 utask_t tasks[TASKMAP_MAX_RECORDS]; 52 } bootinfo_t; 53 54 extern void arch_pre_main(void *entry, bootinfo_t *bootinfo); 55 39 56 #endif 40 57 -
kernel/arch/arm32/include/asm/boot.h
re662a5f r96e0748d 27 27 */ 28 28 29 /** @addtogroup arm32 29 /** @addtogroup arm32 30 30 * @{ 31 31 */ … … 40 40 #define TEMP_STACK_SIZE 0x100 41 41 42 #ifndef __ASM__43 44 /** Kernel entry point.45 *46 * Implemented in assembly. Copies boot_bootinfo (declared as bootinfo in47 * boot/arch/arm32/loader/main.c) to #bootinfo struct. Then jumps to48 * #arch_pre_main and #main_bsp.49 *50 * @param entry Entry point address (not used).51 * @param boot_bootinfo Struct holding information about loaded tasks.52 * @param bootinfo_size Size of the bootinfo structure.53 */54 extern void kernel_image_start(void *entry, void *boot_bootinfo,55 unsigned int bootinfo_size);56 57 #endif58 59 42 #endif 60 43 -
kernel/arch/arm32/src/arm32.c
re662a5f r96e0748d 35 35 36 36 #include <arch.h> 37 #include <arch/boot.h>38 37 #include <config.h> 39 38 #include <arch/console.h> … … 49 48 #include <arch/machine.h> 50 49 #include <userspace.h> 51 52 /** Information about loaded tasks. */ 53 bootinfo_t bootinfo; 50 #include <macros.h> 54 51 55 52 /** Performs arm32 specific initialization before main_bsp() is called. */ 56 void arch_pre_main(void )53 void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo) 57 54 { 58 55 unsigned int i; 59 60 init.cnt = bootinfo .cnt;61 62 for (i = 0; i < bootinfo.cnt; ++i) {63 init.tasks[i].addr = bootinfo .tasks[i].addr;64 init.tasks[i].size = bootinfo .tasks[i].size;56 57 init.cnt = bootinfo->cnt; 58 59 for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); ++i) { 60 init.tasks[i].addr = bootinfo->tasks[i].addr; 61 init.tasks[i].size = bootinfo->tasks[i].size; 65 62 } 66 67 63 } 68 64 -
kernel/arch/arm32/src/start.S
re662a5f r96e0748d 41 41 bic r3, r3, #0x1f 42 42 orr r3, r3, #0x13 43 msr cpsr_c, r3 43 msr cpsr_c, r3 44 44 45 45 ldr sp, =temp_stack 46 47 cmp r2, #048 beq bootinfo_end49 50 ldr r3, =bootinfo51 52 bootinfo_loop:53 ldr r4, [r1]54 str r4, [r3]55 56 add r1, r1, #457 add r3, r3, #458 add r2, r2, #-459 60 cmp r2, #061 bne bootinfo_loop62 46 63 bootinfo_end:64 65 47 bl arch_pre_main 66 48 67 49 bl main_bsp 68 50 … … 75 57 supervisor_sp: 76 58 .space 4 77
Note:
See TracChangeset
for help on using the changeset viewer.
