MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / DisablePIC

Function DisablePIC

Kernel/src/arch/x86_64/idt.cpp:248–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246 }
247
248 void DisablePIC(){
249 outportb(0x20, 0x11);
250 outportb(0xA0, 0x11);
251 outportb(0x21, 0xF0); // Remap IRQs on both PICs to 0xF0-0xF8
252 outportb(0xA1, 0xF0);
253 outportb(0x21, 0x04);
254 outportb(0xA1, 0x02);
255 outportb(0x21, 0x01);
256 outportb(0xA1, 0x01);
257
258 outportb(0x21, 0xFF); // Mask all interrupts
259 outportb(0xA1, 0xFF);
260 }
261
262 int GetErrCode(){
263 return errCode;

Callers 1

InitializeFunction · 0.85

Calls 1

outportbFunction · 0.85

Tested by

no test coverage detected