> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 23:40:44 up 4 days, 18:46, 1 user, load average: 2.96, 2.16, 1.08
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
#define __COMMON_H__
|
#define __COMMON_H__
|
||||||
|
|
||||||
/* Uncomment these macros to enable corresponding functionality. */
|
/* Uncomment these macros to enable corresponding functionality. */
|
||||||
//#define HAS_CTE
|
#define HAS_CTE
|
||||||
//#define HAS_VME
|
//#define HAS_VME
|
||||||
//#define MULTIPROGRAM
|
//#define MULTIPROGRAM
|
||||||
//#define TIME_SHARING
|
//#define TIME_SHARING
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
static Context* do_event(Event e, Context* c) {
|
static Context* do_event(Event e, Context* c) {
|
||||||
switch (e.event) {
|
switch (e.event) {
|
||||||
|
case EVENT_YIELD: printf("EVENT_YIELD\n"); break;
|
||||||
default: panic("Unhandled event ID = %d", e.event);
|
default: panic("Unhandled event ID = %d", e.event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ if ITRACE
|
|||||||
config ITRACE_COND
|
config ITRACE_COND
|
||||||
depends on ITRACE
|
depends on ITRACE
|
||||||
string "Only trace instructions when the condition is true"
|
string "Only trace instructions when the condition is true"
|
||||||
default "true"
|
default "dnpc != 0"
|
||||||
endif # ITRACE
|
endif # ITRACE
|
||||||
|
|
||||||
menuconfig IRINGBUF
|
menuconfig IRINGBUF
|
||||||
@ -109,4 +109,9 @@ config DTRACE_READ
|
|||||||
|
|
||||||
endif # DTRACE
|
endif # DTRACE
|
||||||
|
|
||||||
|
menuconfig ETRACE
|
||||||
|
depends on TRACE
|
||||||
|
bool "Enable exception tracer"
|
||||||
|
default n
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -21,6 +21,9 @@ word_t isa_raise_intr(word_t NO, vaddr_t epc) {
|
|||||||
/* TODO: Trigger an interrupt/exception with ``NO''.
|
/* TODO: Trigger an interrupt/exception with ``NO''.
|
||||||
* Then return the address of the interrupt/exception vector.
|
* Then return the address of the interrupt/exception vector.
|
||||||
*/
|
*/
|
||||||
|
#ifdef CONFIG_ETRACE
|
||||||
|
log_write("raise intr %d\n", NO);
|
||||||
|
#endif
|
||||||
C(MEPC) = epc;
|
C(MEPC) = epc;
|
||||||
C(MCAUSE) = NO;
|
C(MCAUSE) = NO;
|
||||||
C(MSTATUS) = 0x1800;
|
C(MSTATUS) = 0x1800;
|
||||||
|
Reference in New Issue
Block a user