Changes in kernel/arch/riscv64/src/riscv64.c [8b6aa39:6c742f5e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/riscv64/src/riscv64.c
r8b6aa39 r6c742f5e 34 34 35 35 #include <arch.h> 36 #include <typedefs.h> 36 #include <stddef.h> 37 #include <arch/arch.h> 37 38 #include <arch/interrupt.h> 38 39 #include <arch/asm.h> 40 #include <arch/drivers/ucb.h> 39 41 40 42 #include <func.h> … … 48 50 #include <proc/thread.h> 49 51 #include <console/console.h> 50 #include <memstr.h> 52 #include <mem.h> 53 #include <str.h> 51 54 52 55 char memcpy_from_uspace_failover_address; 53 56 char memcpy_to_uspace_failover_address; 54 57 58 static void riscv64_post_mm_init(void); 59 55 60 arch_ops_t riscv64_ops = { 61 .post_mm_init = riscv64_post_mm_init 56 62 }; 57 63 58 64 arch_ops_t *arch_ops = &riscv64_ops; 65 66 void riscv64_pre_main(bootinfo_t *bootinfo) 67 { 68 physmem_start = bootinfo->physmem_start; 69 htif_frame = bootinfo->htif_frame; 70 pt_frame = bootinfo->pt_frame; 71 72 htif_init(bootinfo->ucbinfo.tohost, bootinfo->ucbinfo.fromhost); 73 74 /* Copy tasks map. */ 75 init.cnt = min3(bootinfo->taskmap.cnt, TASKMAP_MAX_RECORDS, 76 CONFIG_INIT_TASKS); 77 78 for (size_t i = 0; i < init.cnt; i++) { 79 init.tasks[i].paddr = KA2PA(bootinfo->taskmap.tasks[i].addr); 80 init.tasks[i].size = bootinfo->taskmap.tasks[i].size; 81 str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, 82 bootinfo->taskmap.tasks[i].name); 83 } 84 85 /* Copy physical memory map. */ 86 memmap.total = bootinfo->memmap.total; 87 memmap.cnt = min(bootinfo->memmap.cnt, MEMMAP_MAX_RECORDS); 88 for (size_t i = 0; i < memmap.cnt; i++) { 89 memmap.zones[i].start = bootinfo->memmap.zones[i].start; 90 memmap.zones[i].size = bootinfo->memmap.zones[i].size; 91 } 92 } 93 94 void riscv64_post_mm_init(void) 95 { 96 outdev_t *htifout = htifout_init(); 97 if (htifout) 98 stdout_wire(htifout); 99 } 59 100 60 101 void calibrate_delay_loop(void) … … 90 131 } 91 132 92 int context_save_arch(context_t *ctx)93 {94 return 1;95 }96 97 void context_restore_arch(context_t *ctx)98 {99 while (true);100 }101 102 133 void fpu_init(void) 103 134 { … … 122 153 } 123 154 124 void early_putchar(wchar_t ch)125 {126 }127 128 155 /** @} 129 156 */
Note:
See TracChangeset
for help on using the changeset viewer.