Changes in kernel/arch/riscv64/src/riscv64.c [6c742f5e:8b6aa39] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/riscv64/src/riscv64.c
r6c742f5e r8b6aa39 34 34 35 35 #include <arch.h> 36 #include <stddef.h> 37 #include <arch/arch.h> 36 #include <typedefs.h> 38 37 #include <arch/interrupt.h> 39 38 #include <arch/asm.h> 40 #include <arch/drivers/ucb.h>41 39 42 40 #include <func.h> … … 50 48 #include <proc/thread.h> 51 49 #include <console/console.h> 52 #include <mem.h> 53 #include <str.h> 50 #include <memstr.h> 54 51 55 52 char memcpy_from_uspace_failover_address; 56 53 char memcpy_to_uspace_failover_address; 57 54 58 static void riscv64_post_mm_init(void);59 60 55 arch_ops_t riscv64_ops = { 61 .post_mm_init = riscv64_post_mm_init62 56 }; 63 57 64 58 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 }100 59 101 60 void calibrate_delay_loop(void) … … 131 90 } 132 91 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 133 102 void fpu_init(void) 134 103 { … … 153 122 } 154 123 124 void early_putchar(wchar_t ch) 125 { 126 } 127 155 128 /** @} 156 129 */
Note:
See TracChangeset
for help on using the changeset viewer.