From 62bd906e61ccf892ac8381f1601a7068cec1c7a5 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 25 Oct 2022 02:31:27 +0300 Subject: [PATCH] Added IOAPIC redirect structure --- Architecture/amd64/cpu/apic.hpp | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Architecture/amd64/cpu/apic.hpp b/Architecture/amd64/cpu/apic.hpp index 18ff8e6..cfb2ff1 100644 --- a/Architecture/amd64/cpu/apic.hpp +++ b/Architecture/amd64/cpu/apic.hpp @@ -178,6 +178,48 @@ namespace APIC uint64_t raw; } __attribute__((packed)) InterruptCommandRegisterHigh; + typedef union + { + struct + { + /** @brief Interrupt Vector */ + uint64_t Vector : 8; + /** @brief Delivery Mode */ + uint64_t DeliveryMode : 3; + /** @brief Destination Mode + * + * 0: Physical + * 1: Logical + */ + uint64_t DestinationMode : 1; + /** @brief Delivery Status */ + uint64_t DeliveryStatus : 1; + /** @brief Interrupt Input Pin Polarity + * + * 0: Active High + * 1: Active Low + */ + uint64_t Polarity : 1; + /** @brief Remote IRR */ + uint64_t RemoteIRR : 1; + /** @brief Trigger Mode + * + * 0: Edge + * 1: Level + */ + uint64_t TriggerMode : 1; + /** @brief Mask */ + uint64_t Mask : 1; + /** @brief Reserved */ + uint64_t Reserved0 : 15; + /** @brief Reserved */ + uint64_t Reserved1 : 24; + /** @brief Destination */ + uint64_t DestinationID : 8; + }; + uint64_t raw; + } __attribute__((packed)) RedirectEntry; + typedef union { struct