Changeset ccc362a1 in mainline for kernel/arch/riscv64/src/riscv64.c
- Timestamp:
- 2017-08-21T18:46:34Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6c742f5e
- Parents:
- c16479e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/riscv64/src/riscv64.c
rc16479e rccc362a1 49 49 #include <console/console.h> 50 50 #include <mem.h> 51 #include <str.h> 51 52 52 53 char memcpy_from_uspace_failover_address; 53 54 char memcpy_to_uspace_failover_address; 54 55 56 static void riscv64_post_mm_init(void); 57 55 58 arch_ops_t riscv64_ops = { 59 .post_mm_init = riscv64_post_mm_init 56 60 }; 57 61 58 62 arch_ops_t *arch_ops = &riscv64_ops; 63 64 void riscv64_pre_main(bootinfo_t *bootinfo) 65 { 66 physmem_start = bootinfo->physmem_start; 67 htif_frame = bootinfo->htif_frame; 68 pt_frame = bootinfo->pt_frame; 69 70 htif_init(bootinfo->ucbinfo.tohost, bootinfo->ucbinfo.fromhost); 71 72 /* Copy tasks map. */ 73 init.cnt = min3(bootinfo->taskmap.cnt, TASKMAP_MAX_RECORDS, 74 CONFIG_INIT_TASKS); 75 76 for (size_t i = 0; i < init.cnt; i++) { 77 init.tasks[i].paddr = KA2PA(bootinfo->taskmap.tasks[i].addr); 78 init.tasks[i].size = bootinfo->taskmap.tasks[i].size; 79 str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, 80 bootinfo->taskmap.tasks[i].name); 81 } 82 83 /* Copy physical memory map. */ 84 memmap.total = bootinfo->memmap.total; 85 memmap.cnt = min(bootinfo->memmap.cnt, MEMMAP_MAX_RECORDS); 86 for (size_t i = 0; i < memmap.cnt; i++) { 87 memmap.zones[i].start = bootinfo->memmap.zones[i].start; 88 memmap.zones[i].size = bootinfo->memmap.zones[i].size; 89 } 90 } 91 92 void riscv64_post_mm_init(void) 93 { 94 outdev_t *htifout = htifout_init(); 95 if (htifout) 96 stdout_wire(htifout); 97 } 59 98 60 99 void calibrate_delay_loop(void) … … 90 129 } 91 130 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 131 void fpu_init(void) 103 132 { … … 122 151 } 123 152 124 void early_putchar(wchar_t ch)125 {126 }127 128 153 /** @} 129 154 */
Note:
See TracChangeset
for help on using the changeset viewer.