NJU-ProjectN/abstract-machine ics2023 initialized

NJU-ProjectN/abstract-machine 3348db971fd860be5cb28e21c18f9d0e65d0c96a Merge pull request #8 from Jasonyanyusong/master
This commit is contained in:
xinyangli 2023-12-21 00:20:42 +08:00
parent 2824efad33
commit 8e4feb4010
129 changed files with 9017 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#include <am.h>
bool cte_init(Context*(*handler)(Event, Context*)) {
return false;
}
Context *kcontext(Area kstack, void (*entry)(void *), void *arg) {
return NULL;
}
void yield() {
}
bool ienabled() {
return false;
}
void iset(bool enable) {
}

View file

@ -0,0 +1,11 @@
#include <am.h>
#include <klib-macros.h>
static void fail(void *buf) { panic("access nonexist register"); }
bool ioe_init() {
return false;
}
void ioe_read (int reg, void *buf) { fail(buf); }
void ioe_write(int reg, void *buf) { fail(buf); }

View file

@ -0,0 +1,17 @@
#include <am.h>
bool mpe_init(void (*entry)()) {
return false;
}
int cpu_count() {
return 1;
}
int cpu_current() {
return 0;
}
int atomic_xchg(int *addr, int newval) {
return 0;
}

View file

@ -0,0 +1,10 @@
#include <am.h>
Area heap = RANGE(NULL, NULL);
void putch(char ch) {
}
void halt(int code) {
while (1);
}

View file

@ -0,0 +1,18 @@
#include <am.h>
bool vme_init(void* (*pgalloc_f)(int), void (*pgfree_f)(void*)) {
return false;
}
void protect(AddrSpace *as) {
}
void unprotect(AddrSpace *as) {
}
void map(AddrSpace *as, void *va, void *pa, int prot) {
}
Context *ucontext(AddrSpace *as, Area kstack, void *entry) {
return NULL;
}