diff --git a/include/gint/mpu/ubc.h b/include/gint/mpu/ubc.h index 4dacb87..5cefe8f 100644 --- a/include/gint/mpu/ubc.h +++ b/include/gint/mpu/ubc.h @@ -22,13 +22,15 @@ typedef volatile struct uint32_t SZ :3; /* Operand Size Select */ uint32_t :4; uint32_t CD :2; /* Bus Select */ - uint32_t ID :2; /* Instruction Fetch / Operand Access Select */ + uint32_t ID :2; /* Ins. Fetch / Operand Access Select */ uint32_t :1; uint32_t RW :2; /* Bus Command Select */ uint32_t CE :1; /* Channel Enable */ ); lword_union(CRR0, /* Match operation setting 0 */ - uint32_t :30; + uint32_t :18; + uint32_t _1 :1; /* Always set to 1 */ + uint32_t :11; uint32_t PCB :1; /* PC Break Select */ uint32_t BIE :1; /* Break Enable */ ); @@ -36,7 +38,6 @@ typedef volatile struct uint32_t CAMR0; /* Match address mask setting 0 */ pad(0x10); - lword_union(CBR1, /* Match condition setting 1 */ uint32_t MFE :1; /* Match Flag Enable */ uint32_t AIE :1; /* ASID Enable */ @@ -47,13 +48,15 @@ typedef volatile struct uint32_t ETBE :1; /* Execution Count Value Enable */ uint32_t :3; uint32_t CD :2; /* Bus Select */ - uint32_t ID :2; /* Instruction Fetch / Operand Access Select */ + uint32_t ID :2; /* Ins. Fetch / Operand Access Select */ uint32_t :1; uint32_t RW :2; /* Bus Command Select */ uint32_t CE :1; /* Channel Enable */ ); lword_union(CRR1, /* Match operation setting 1 */ - uint32_t :30; + uint32_t :18; + uint32_t _1 :1; /* Always set to 1 */ + uint32_t :11; uint32_t PCB :1; /* PC Break Select */ uint32_t BIE :1; /* Break Enable */ ); diff --git a/src/ubc/ubc.c b/src/ubc/ubc.c index 104879d..166c652 100644 --- a/src/ubc/ubc.c +++ b/src/ubc/ubc.c @@ -55,9 +55,6 @@ static void hpoweroff(void) } while (0) bool ubc_set_breakpoint(int channel, void* break_address, ubc_break_mode_t break_mode) { - if (!hpowered()) - hpoweron(); - uint32_t pcb = break_mode == UBC_BREAK_AFTER ? 1 : 0; if (channel == 0) { UBC_BREAK_CHANNEL(CBR0, CRR0, CAR0, CAMR0); @@ -73,9 +70,6 @@ bool ubc_set_breakpoint(int channel, void* break_address, ubc_break_mode_t break bool ubc_get_break_address(int channel, void** break_address) { - if (!hpowered()) - hpoweron(); - if (channel == 0 && UBC.CBR0.CE) { *break_address = (void*) UBC.CAR0; return true; @@ -89,9 +83,6 @@ bool ubc_get_break_address(int channel, void** break_address) bool ubc_disable_channel(int channel) { - if (!hpowered()) - hpoweron(); - if (channel == 0) { UBC.CBR0.CE = 0; return true;