MCPcopy Create free account
hub / github.com/YatSenOS/YatSenOS-Tutorial-Volume-1 / initialize

Method initialize

lab4/src/6/src/kernel/interrupt.cpp:11–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9}
10
11void InterruptManager::initialize()
12{
13 // 初始化IDT
14 IDT = (uint32 *)IDT_START_ADDRESS;
15 asm_lidt(IDT_START_ADDRESS, 256 * 8 - 1);
16
17 for (uint i = 0; i < 256; ++i)
18 {
19 setInterruptDescriptor(i, (uint32)asm_unhandled_interrupt, 0);
20 }
21
22}
23
24void InterruptManager::setInterruptDescriptor(uint32 index, uint32 address, byte DPL)
25{

Callers 1

setup_kernelFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected