https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6a5472a75416787f95fbfd6620be85d80da0d448

commit 6a5472a75416787f95fbfd6620be85d80da0d448
Author:     Serge Gautherie <[email protected]>
AuthorDate: Sun Jun 14 13:49:22 2020 +0200
Commit:     Stanislav Motylkov <[email protected]>
CommitDate: Fri Sep 3 23:20:10 2021 +0300

    [HALX86:APIC] apic.c: Use new defines some more
    
    Follow-up to b7a149f.
---
 hal/halx86/apic/apic.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hal/halx86/apic/apic.c b/hal/halx86/apic/apic.c
index 69f1841642c..0d152539c33 100644
--- a/hal/halx86/apic/apic.c
+++ b/hal/halx86/apic/apic.c
@@ -286,7 +286,7 @@ ApicInitializeLocalApic(ULONG Cpu)
 
     /* Create a template LVT */
     LvtEntry.Long = 0;
-    LvtEntry.Vector = 0xFF;
+    LvtEntry.Vector = APIC_FREE_VECTOR;
     LvtEntry.MessageType = APIC_MT_Fixed;
     LvtEntry.DeliveryStatus = 0;
     LvtEntry.RemoteIRR = 0;
@@ -336,7 +336,7 @@ HalpAllocateSystemInterrupt(
 {
     IOAPIC_REDIRECTION_REGISTER ReDirReg;
 
-    ASSERT(Irq < 24);
+    ASSERT(Irq < APIC_MAX_IRQ);
     ASSERT(HalpVectorToIndex[Vector] == APIC_FREE_VECTOR);
 
     /* Setup a redirection entry */
@@ -375,7 +375,7 @@ HalpGetRootInterruptVector(
     Vector = HalpIrqToVector(BusInterruptLevel);
 
     /* Check if it's used */
-    if (Vector != 0xFF)
+    if (Vector != APIC_FREE_VECTOR)
     {
         /* Calculate IRQL */
         NT_ASSERT(HalpVectorToIndex[Vector] == BusInterruptLevel);
@@ -439,7 +439,7 @@ ApicInitializeIOApic(VOID)
     _ReadWriteBarrier();
 
     /* Setup a redirection entry */
-    ReDirReg.Vector = 0xFF;
+    ReDirReg.Vector = APIC_FREE_VECTOR;
     ReDirReg.DeliveryMode = APIC_MT_Fixed;
     ReDirReg.DestinationMode = APIC_DM_Physical;
     ReDirReg.DeliveryStatus = 0;
@@ -646,7 +646,7 @@ HalEnableSystemInterrupt(
     Index = HalpVectorToIndex[Vector];
 
     /* Check if its valid */
-    if (Index == 0xff)
+    if (Index == APIC_FREE_VECTOR)
     {
         /* Interrupt is not in use */
         return FALSE;

Reply via email to