mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
compatability fixes, so some hal code can be shared
svn path=/branches/ros-amd64-bringup/; revision=35902
This commit is contained in:
parent
24326fcfd3
commit
89f1272447
4 changed files with 21 additions and 6 deletions
|
@ -48,7 +48,7 @@ HalpInitializeClock(VOID)
|
|||
PKPRCB Prcb = KeGetCurrentPrcb();
|
||||
ULONG Increment;
|
||||
USHORT RollOver;
|
||||
ULONG Flags = 0;
|
||||
ULONG_PTR Flags = 0;
|
||||
|
||||
/* Check the CPU Type */
|
||||
if (Prcb->CpuType <= 4)
|
||||
|
@ -92,7 +92,7 @@ NTAPI
|
|||
HalCalibratePerformanceCounter(IN volatile PLONG Count,
|
||||
IN ULONGLONG NewCount)
|
||||
{
|
||||
ULONG Flags = 0;
|
||||
ULONG_PTR Flags = 0;
|
||||
|
||||
/* Disable interrupts */
|
||||
Ke386SaveFlags(Flags);
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#define TYPE1_READ(x, y) \
|
||||
TYPE1_START(x, y) \
|
||||
*((POINTER_TO_(y))Buffer) = \
|
||||
READ_FROM(y)((POINTER_TO_(y))(BusData->Config.Type1.Data + i)); \
|
||||
READ_FROM(y)((POINTER_TO_(y))(ULONG_PTR)(BusData->Config.Type1.Data + i)); \
|
||||
TYPE1_END(y)
|
||||
|
||||
//
|
||||
|
@ -51,7 +51,7 @@
|
|||
//
|
||||
#define TYPE1_WRITE(x, y) \
|
||||
TYPE1_START(x, y) \
|
||||
WRITE_TO(y)((POINTER_TO_(y))(BusData->Config.Type1.Data + i), \
|
||||
WRITE_TO(y)((POINTER_TO_(y))(ULONG_PTR)(BusData->Config.Type1.Data + i), \
|
||||
*((POINTER_TO_(y))Buffer)); \
|
||||
TYPE1_END(y)
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
|||
#define TYPE2_READ(x, y) \
|
||||
TYPE2_START(x, y) \
|
||||
*((POINTER_TO_(y))Buffer) = \
|
||||
READ_FROM(y)((POINTER_TO_(y))(ULONG)PciCfg->u.AsUSHORT); \
|
||||
READ_FROM(y)((POINTER_TO_(y))(ULONG_PTR)PciCfg->u.AsUSHORT); \
|
||||
TYPE2_END(y)
|
||||
|
||||
//
|
||||
|
@ -77,7 +77,7 @@
|
|||
//
|
||||
#define TYPE2_WRITE(x, y) \
|
||||
TYPE2_START(x, y) \
|
||||
WRITE_TO(y)((POINTER_TO_(y))(ULONG)PciCfg->u.AsUSHORT, \
|
||||
WRITE_TO(y)((POINTER_TO_(y))(ULONG_PTR)PciCfg->u.AsUSHORT, \
|
||||
*((POINTER_TO_(y))Buffer)); \
|
||||
TYPE2_END(y)
|
||||
|
||||
|
|
|
@ -35,7 +35,11 @@
|
|||
|
||||
/* Internal kernel headers */
|
||||
#include "internal/pci.h"
|
||||
#ifdef _M_AMD64
|
||||
#include "internal/amd64/intrin_i.h"
|
||||
#else
|
||||
#include "internal/i386/intrin_i.h"
|
||||
#endif
|
||||
|
||||
/* Internal HAL Headers */
|
||||
#include "apic.h"
|
||||
|
|
|
@ -154,6 +154,17 @@ HalpTrap06(
|
|||
VOID
|
||||
);
|
||||
|
||||
#ifdef _M_AMD64
|
||||
#define KfLowerIrql KeLowerIrql
|
||||
#ifndef CONFIG_SMP
|
||||
/* On UP builds, spinlocks don't exist at IRQL >= DISPATCH */
|
||||
#define KiAcquireSpinLock(SpinLock)
|
||||
#define KiReleaseSpinLock(SpinLock)
|
||||
#define KfAcquireSpinLock(SpinLock) KfRaiseIrql(DISPATCH_LEVEL);
|
||||
#define KfReleaseSpinLock(SpinLock, OldIrql) KeLowerIrql(OldIrql);
|
||||
#endif // !CONFIG_SMP
|
||||
#endif // _M_AMD64
|
||||
|
||||
extern PVOID HalpRealModeStart;
|
||||
extern PVOID HalpRealModeEnd;
|
||||
|
||||
|
|
Loading…
Reference in a new issue