arch.c (839B)
1 #include <os9/os9.h> 2 3 #include <setjmp.h> 4 #include <stdlib.h> 5 #include <string.h> 6 7 #include "hosted.h" 8 9 jmp_buf recover; 10 11 noreturn void abort(void); 12 noreturn void longjmp(jmp_buf env, int val); 13 14 char bufto[PAGESIZE], buffrom[PAGESIZE]; 15 16 void 17 barrier(int what) 18 { 19 } 20 21 void 22 halt(void) 23 { 24 abort(); 25 } 26 27 /* 28 * we don't implement context switch in hosted mode 29 * so, this function is going to be called only once 30 * with the entry point of the initial task 31 */ 32 void 33 swtch(Context *ctx) 34 { 35 void (*fn)(void) = (void (*)(void)) ctx->entry; 36 37 (*fn)(); 38 } 39 40 uint8_t 41 inm8(void *addr) 42 { 43 return 0; 44 } 45 46 uint16_t 47 inm16(void *addr) 48 { 49 return 0; 50 } 51 52 uint32_t 53 inm32(void *addr) 54 { 55 return 0; 56 } 57 58 uint8_t 59 outm8(uint8_t val, void *addr) 60 { 61 return 0; 62 } 63 64 uint16_t 65 outm16(uint16_t val, void *addr) 66 { 67 return 0; 68 } 69 70 uint32_t 71 outm32(uint32_t val, void *addr) 72 { 73 return 0; 74 }