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

Method initialize

lab8/src/1/src/kernel/interrupt.cpp:16–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16void InterruptManager::initialize()
17{
18 // 初始化中断计数变量
19 times = 0;
20
21 // 初始化IDT
22 IDT = (uint32 *)IDT_START_ADDRESS;
23 asm_lidt(IDT_START_ADDRESS, 256 * 8 - 1);
24
25 for (uint i = 0; i < 256; ++i)
26 {
27 setInterruptDescriptor(i, (uint32)asm_unhandled_interrupt, 0);
28 }
29
30 // 初始化8259A芯片
31 initialize8259A();
32}
33
34void InterruptManager::setInterruptDescriptor(uint32 index, uint32 address, byte DPL)
35{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected