- refactored interrupt en/dis

- enable mips-debugger in App



git-svn-id: http://moon:8086/svn/mips@132 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2017-01-26 20:09:46 +00:00
parent 3bcdafc447
commit 41414d5648
7 changed files with 26 additions and 15 deletions
+3 -1
View File
@@ -2,10 +2,12 @@
# BOARD = {ml402, denano}
# TLB = {no, yes}
# ENDIANESS = {eb, el}
# DEBUGGER = {gdb, mips, rom}
BOARD ?= ml402
TLB ?= no
ENDIANESS ?= eb
DEBUGGER ?= rom
DEBUGGER ?= mips
ifeq ($(ENDIANESS),el)
+1 -1
View File
@@ -103,7 +103,7 @@ void board_init(void)
// Setup interrupt support
interrupt_init();
interrupt_enable_all();
interrupt_global_enable();
// Do some initializations here
}
+1 -1
View File
@@ -91,7 +91,7 @@ void board_init(void)
// Setup interrupt support
interrupt_init();
interrupt_enable_all();
interrupt_global_enable();
// Do some initializations here
}
+2 -2
View File
@@ -59,13 +59,13 @@ void interrupt_disable(int irq_num)
}
}
void interrupt_enable_all()
void interrupt_global_enable()
{
uint32_t reg = CP0_SR_read() | SR_MASK_IEC;
CP0_SR_write(reg);
}
void interrupt_disable_all()
void interrupt_global_disable()
{
uint32_t reg = CP0_SR_read() & ~SR_MASK_IEC;
CP0_SR_write(reg);
+2 -2
View File
@@ -12,7 +12,7 @@ int _irq_dispatch(struct xcptcontext * xcp);
void interrupt_register(int irq_num, fp_irq_t fp);
void interrupt_enable(int irq_num);
void interrupt_disable(int irq_num);
void interrupt_enable_all();
void interrupt_disable_all();
void interrupt_global_enable();
void interrupt_global_disable();
#endif // IRQ_H
+2 -2
View File
@@ -14,7 +14,7 @@ void enter_critical()
{
if (critical_nesting_counter == 0)
{
interrupt_disable_all();
interrupt_global_disable();
}
critical_nesting_counter++;
}
@@ -26,7 +26,7 @@ void exit_critical()
critical_nesting_counter--;
if (critical_nesting_counter == 0)
{
interrupt_enable_all();
interrupt_global_enable();
}
}
}