mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
APIC interrupts working
This commit is contained in:
parent
d5447c288e
commit
4ca5db1fee
@ -49,7 +49,8 @@ namespace APIC
|
|||||||
|
|
||||||
void APIC::Write(uint32_t Register, uint32_t Value)
|
void APIC::Write(uint32_t Register, uint32_t Value)
|
||||||
{
|
{
|
||||||
debug("APIC::Write(%#lx, %#lx)", Register, Value);
|
if (Register != APIC_EOI)
|
||||||
|
debug("APIC::Write(%#lx, %#lx)", Register, Value);
|
||||||
if (x2APICSupported)
|
if (x2APICSupported)
|
||||||
{
|
{
|
||||||
if (Register != APIC_ICRHI)
|
if (Register != APIC_ICRHI)
|
||||||
@ -216,7 +217,7 @@ namespace APIC
|
|||||||
|
|
||||||
void Timer::OnInterruptReceived(CPU::x64::TrapFrame *Frame)
|
void Timer::OnInterruptReceived(CPU::x64::TrapFrame *Frame)
|
||||||
{
|
{
|
||||||
fixme("APIC IRQ0 INTERRUPT RECEIVED ON CPU %d", CPU::x64::rdmsr(CPU::x64::MSR_FS_BASE));
|
// fixme("APIC IRQ0 INTERRUPT RECEIVED ON CPU %d", CPU::x64::rdmsr(CPU::x64::MSR_FS_BASE));
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer::Timer(APIC *apic) : Interrupts::Handler(CPU::x64::IRQ0)
|
Timer::Timer(APIC *apic) : Interrupts::Handler(CPU::x64::IRQ0)
|
||||||
|
@ -72,7 +72,7 @@ extern "C" void StartCPU()
|
|||||||
CPU::Interrupts(CPU::Enable);
|
CPU::Interrupts(CPU::Enable);
|
||||||
KPrint("CPU %d is online", CPU_ID);
|
KPrint("CPU %d is online", CPU_ID);
|
||||||
CPUEnabled = true;
|
CPUEnabled = true;
|
||||||
CPU::Stop();
|
CPU::Stop(); // Stop and surpress interrupts.
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace SMP
|
namespace SMP
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
#include <uart.hpp>
|
#include <uart.hpp>
|
||||||
#include <printf.h>
|
#include <printf.h>
|
||||||
|
#include <lock.hpp>
|
||||||
|
|
||||||
|
NEWLOCK(DebuggerLock);
|
||||||
|
|
||||||
using namespace UniversalAsynchronousReceiverTransmitter;
|
using namespace UniversalAsynchronousReceiverTransmitter;
|
||||||
|
|
||||||
@ -54,6 +57,7 @@ namespace SysDbg
|
|||||||
|
|
||||||
void WriteLine(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
void WriteLine(DebugLevel Level, const char *File, int Line, const char *Function, const char *Format, ...)
|
||||||
{
|
{
|
||||||
|
SMARTLOCK(DebuggerLock);
|
||||||
WritePrefix(Level, File, Line, Function);
|
WritePrefix(Level, File, Line, Function);
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, Format);
|
va_start(args, Format);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user