finish exec3.3
This commit is contained in:
parent
830283078f
commit
37f581eb6a
@ -13,4 +13,4 @@ define add-symbol-file-auto
|
|||||||
end
|
end
|
||||||
|
|
||||||
add-symbol-file-auto ./build/kernel.img
|
add-symbol-file-auto ./build/kernel.img
|
||||||
add-symbol-file-auto ./user/build/ramdisk/hello.bin
|
add-symbol-file-auto ./user/build/ramdisk/badinsn.bin
|
||||||
|
@ -25,6 +25,7 @@ void exception_init_per_cpu(void)
|
|||||||
* Lab3: Your code here
|
* Lab3: Your code here
|
||||||
* Setup the exception vector with the asm function written in exception.S
|
* Setup the exception vector with the asm function written in exception.S
|
||||||
*/
|
*/
|
||||||
|
set_exception_vector();
|
||||||
disable_irq();
|
disable_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +49,10 @@ void handle_entry_c(int type, u64 esr, u64 address)
|
|||||||
* Handle exceptions as required in the lab document. Checking exception codes in
|
* Handle exceptions as required in the lab document. Checking exception codes in
|
||||||
* esr.h may help.
|
* esr.h may help.
|
||||||
*/
|
*/
|
||||||
|
case ESR_EL1_EC_UNKNOWN:
|
||||||
|
// Unknown instruction
|
||||||
|
kinfo("%s", UNKNOWN);
|
||||||
|
sys_exit(-ESUPPORT);
|
||||||
default:
|
default:
|
||||||
kdebug("Unsupported Exception ESR %lx\n", esr);
|
kdebug("Unsupported Exception ESR %lx\n", esr);
|
||||||
break;
|
break;
|
||||||
|
@ -120,6 +120,30 @@
|
|||||||
.align 11
|
.align 11
|
||||||
EXPORT(el1_vector)
|
EXPORT(el1_vector)
|
||||||
|
|
||||||
|
// ELx SP_EL0
|
||||||
|
exception_entry sync_el1t
|
||||||
|
exception_entry irq_el1t
|
||||||
|
exception_entry fiq_el1t
|
||||||
|
exception_entry error_el1t
|
||||||
|
|
||||||
|
// ELx SP_ELx
|
||||||
|
exception_entry sync_el1h
|
||||||
|
exception_entry irq_el1h
|
||||||
|
exception_entry fiq_el1h
|
||||||
|
exception_entry error_el1h
|
||||||
|
|
||||||
|
// EL0 AArch64
|
||||||
|
exception_entry sync_el0_64
|
||||||
|
exception_entry irq_el0_64
|
||||||
|
exception_entry fiq_el0_64
|
||||||
|
exception_entry error_el0_64
|
||||||
|
|
||||||
|
// EL0 AArch32
|
||||||
|
exception_entry sync_el0_32
|
||||||
|
exception_entry irq_el0_32
|
||||||
|
exception_entry fiq_el0_32
|
||||||
|
exception_entry error_el0_32
|
||||||
|
|
||||||
sync_el1t:
|
sync_el1t:
|
||||||
handle_entry 1, SYNC_EL1t
|
handle_entry 1, SYNC_EL1t
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user