mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-06 21:09:22 +00:00
Fixed timer calibration
This commit is contained in:
@ -86,6 +86,26 @@ namespace APIC
|
||||
uint64_t raw;
|
||||
} __attribute__((packed)) LVTTimer;
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
{
|
||||
/** @brief Spurious Vector */
|
||||
uint64_t Vector : 8;
|
||||
/** @brief Enable or disable APIC software */
|
||||
uint64_t Software : 1;
|
||||
/** @brief Focus Processor Checking */
|
||||
uint64_t FocusProcessorChecking : 1;
|
||||
/** @brief Reserved */
|
||||
uint64_t Reserved : 2;
|
||||
/** @brief Disable EOI Broadcast */
|
||||
uint64_t DisableEOIBroadcast : 1;
|
||||
/** @brief Reserved */
|
||||
uint64_t Reserved1 : 19;
|
||||
};
|
||||
uint64_t raw;
|
||||
} __attribute__((packed)) APICSpurious;
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
@ -123,11 +143,11 @@ namespace APIC
|
||||
{
|
||||
private:
|
||||
APIC *lapic;
|
||||
uint64_t TicksIn10ms = 0;
|
||||
uint64_t Ticks = 0;
|
||||
void OnInterruptReceived(CPU::x64::TrapFrame *Frame);
|
||||
|
||||
public:
|
||||
uint64_t GetTicksIn10ms() { return TicksIn10ms; }
|
||||
uint64_t GetTicks() { return Ticks; }
|
||||
void OneShot(uint32_t Vector, uint64_t Miliseconds);
|
||||
Timer(APIC *apic);
|
||||
~Timer();
|
||||
|
Reference in New Issue
Block a user