Author: tkreuzer
Date: Tue Sep 13 14:44:47 2011
New Revision: 53704
URL:
http://svn.reactos.org/svn/reactos?rev=53704&view=rev
Log:
[HAL]
Fix amd64 build
Modified:
trunk/reactos/hal/halx86/amd64/halinit.c
trunk/reactos/hal/halx86/amd64/processor.c
trunk/reactos/hal/halx86/apic/apic.c
trunk/reactos/hal/halx86/apic/apic.h
trunk/reactos/hal/halx86/apic/apictrap.S
Modified: trunk/reactos/hal/halx86/amd64/halinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/amd64/halinit.c…
==============================================================================
--- trunk/reactos/hal/halx86/amd64/halinit.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/amd64/halinit.c [iso-8859-1] Tue Sep 13 14:44:47 2011
@@ -19,7 +19,7 @@
/* PRIVATE FUNCTIONS *********************************************************/
/* FUNCTIONS *****************************************************************/
-
+#if 0
VOID
NTAPI
HalpInitProcessor(
@@ -49,4 +49,5 @@
}
+#endif
Modified: trunk/reactos/hal/halx86/amd64/processor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/amd64/processor…
==============================================================================
--- trunk/reactos/hal/halx86/amd64/processor.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/amd64/processor.c [iso-8859-1] Tue Sep 13 14:44:47 2011
@@ -27,26 +27,6 @@
}
/* FUNCTIONS *****************************************************************/
-
-/*
- * @implemented
- */
-VOID
-NTAPI
-HalInitializeProcessor(IN ULONG ProcessorNumber,
- IN PLOADER_PARAMETER_BLOCK LoaderBlock)
-{
- /* Set default stall count */
- KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT;
-
- /* Update the interrupt affinity and processor mask */
- InterlockedBitTestAndSet((PLONG)&HalpActiveProcessors, ProcessorNumber);
- InterlockedBitTestAndSet((PLONG)&HalpDefaultInterruptAffinity,
- ProcessorNumber);
-
- /* Register routines for KDCOM */
- //HalpRegisterKdSupportFunctions();
-}
/*
* @implemented
Modified: trunk/reactos/hal/halx86/apic/apic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/apic/apic.c?rev…
==============================================================================
--- trunk/reactos/hal/halx86/apic/apic.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/apic/apic.c [iso-8859-1] Tue Sep 13 14:44:47 2011
@@ -18,7 +18,9 @@
#include "apic.h"
void HackEoi(void);
+#ifndef _M_AMD64
#define APIC_LAZY_IRQL
+#endif
/* GLOBALS ********************************************************************/
@@ -393,9 +395,10 @@
/* Set the IRQL from the PCR */
ApicWrite(APIC_TPR, IrqlToTpr(KeGetPcr()->Irql));
-
+#ifdef APIC_LAZY_IRQL
/* Save the new hard IRQL in the IRR field */
KeGetPcr()->IRR = KeGetPcr()->Irql;
+#endif
}
UCHAR
@@ -549,6 +552,7 @@
/* SOFTWARE INTERRUPT TRAPS ***************************************************/
+#ifndef _M_AMD64
VOID
DECLSPEC_NORETURN
FASTCALL
@@ -598,7 +602,6 @@
KiEoiHelper(TrapFrame);
}
-#ifndef _M_AMD64
VOID
DECLSPEC_NORETURN
FASTCALL
Modified: trunk/reactos/hal/halx86/apic/apic.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/apic/apic.h?rev…
==============================================================================
--- trunk/reactos/hal/halx86/apic/apic.h [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/apic/apic.h [iso-8859-1] Tue Sep 13 14:44:47 2011
@@ -15,7 +15,8 @@
#define APIC_PROFILE_VECTOR 0xFD // IRQL 31
#define APIC_NMI_VECTOR 0xFF
#define IrqlToTpr(Irql) (Irql << 4)
-#define TprToIrql(Tpr) (Tpr >> 4)
+#define TprToIrql(Tpr) ((KIRQL)(Tpr >> 4))
+#define CLOCK2_LEVEL CLOCK_LEVEL
#else
#define APIC_BASE 0xFFFE0000
#define IOAPIC_BASE 0xFFFE1000 // checkme
Modified: trunk/reactos/hal/halx86/apic/apictrap.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/apic/apictrap.S…
==============================================================================
--- trunk/reactos/hal/halx86/apic/apictrap.S [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/apic/apictrap.S [iso-8859-1] Tue Sep 13 14:44:47 2011
@@ -14,19 +14,45 @@
#include <ksamd64.inc>
#include <trapamd64.inc>
#define KI_PUSH_FAKE_ERROR_CODE TF_PUSH_FAKE_ERROR_CODE
+.code
+
+TRAP_ENTRY HalpClockInterrupt, KI_PUSH_FAKE_ERROR_CODE
+TRAP_ENTRY HalpProfileInterrupt, KI_PUSH_FAKE_ERROR_CODE
+
PUBLIC ApicSpuriousService
+ApicSpuriousService:
+ iret
+
+PUBLIC HackEoi
+HackEoi:
+ xor rax, rax
+ mov ax, ss
+ push rax
+ push rsp
+ pushfq
+ mov ax, cs
+ push rax
+ lea rax, HackEoiReturn[rip]
+ push rax
+ mov dword ptr [HEX(0FFFFFFFFFEE000B0)], 0
+ iretq
+HackEoiReturn:
+ ret
+
#else
#include <ks386.inc>
#include <internal/i386/asmmacro.S>
-PUBLIC _ApicSpuriousService
-#endif
-
.code
-#ifndef _M_AMD64
+TRAP_ENTRY HalpClockInterrupt, KI_PUSH_FAKE_ERROR_CODE
+TRAP_ENTRY HalpProfileInterrupt, KI_PUSH_FAKE_ERROR_CODE
TRAP_ENTRY HalpTrap0D, 0
TRAP_ENTRY HalpApcInterrupt, KI_PUSH_FAKE_ERROR_CODE
TRAP_ENTRY HalpDispatchInterrupt, KI_PUSH_FAKE_ERROR_CODE
+
+PUBLIC _ApicSpuriousService
+_ApicSpuriousService:
+ iret
// VBox APIC needs an iret more or less directly following the EOI
PUBLIC _HackEoi
@@ -40,16 +66,9 @@
ret
#endif
-TRAP_ENTRY HalpClockInterrupt, KI_PUSH_FAKE_ERROR_CODE
-TRAP_ENTRY HalpProfileInterrupt, KI_PUSH_FAKE_ERROR_CODE
-FUNC ApicSpuriousService
-#ifdef _M_AMD64
- .ENDPROLOG
-#endif
- int 3
- iret
-ENDFUNC ApicSpuriousService
+
+
END