mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:02:59 +00:00
Build MP HAL with w32api
svn path=/trunk/; revision=16036
This commit is contained in:
parent
a5579f945f
commit
3e334c65fc
9 changed files with 21 additions and 84 deletions
|
@ -27,16 +27,9 @@
|
|||
|
||||
/* INCLUDE ***********************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/i386/ps.h>
|
||||
|
||||
#include <hal.h>
|
||||
#include <halirq.h>
|
||||
#include <mps.h>
|
||||
#include <apic.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
#include <internal/ntoskrnl.h>
|
||||
|
||||
/* GLOBALS ***********************************************************************/
|
||||
|
||||
|
@ -89,8 +82,6 @@ CHAR *APstart, *APend;
|
|||
WRITE_PORT_UCHAR((PUCHAR)0x71, value); \
|
||||
})
|
||||
|
||||
extern PVOID IMPORTED MmSystemRangeStart;
|
||||
|
||||
/* FUNCTIONS *********************************************************************/
|
||||
|
||||
extern ULONG Read8254Timer(VOID);
|
||||
|
@ -866,7 +857,7 @@ APICCalibrateTimer(ULONG CPU)
|
|||
|
||||
APICSetupLVTT(1000000000);
|
||||
|
||||
TSCPresent = KeGetCurrentKPCR()->PrcbData.FeatureBits & X86_FEATURE_TSC ? TRUE : FALSE;
|
||||
TSCPresent = ((PKIPCR)KeGetCurrentKPCR())->PrcbData.FeatureBits & X86_FEATURE_TSC ? TRUE : FALSE;
|
||||
|
||||
/*
|
||||
* The timer chip counts down to zero. Let's wait
|
||||
|
@ -895,7 +886,7 @@ APICCalibrateTimer(ULONG CPU)
|
|||
DPRINT("CPU clock speed is %ld.%04ld MHz.\n",
|
||||
CPUMap[CPU].CoreSpeed/1000000,
|
||||
CPUMap[CPU].CoreSpeed%1000000);
|
||||
KeGetCurrentKPCR()->PrcbData.MHz = CPUMap[CPU].CoreSpeed/1000000;
|
||||
((PKIPCR)KeGetCurrentKPCR())->PrcbData.MHz = CPUMap[CPU].CoreSpeed/1000000;
|
||||
}
|
||||
|
||||
CPUMap[CPU].BusSpeed = (HZ * (long)(tt1 - tt2) * APIC_DIVISOR);
|
||||
|
|
|
@ -11,12 +11,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
#include <mps.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<include base="ntoskrnl">include</include>
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
<define name="CONFIG_SMP" />
|
||||
<define name="__NTHAL__" />
|
||||
<define name="_NTHAL_" />
|
||||
<define name="__USE_W32API" />
|
||||
<library>hal_generic</library>
|
||||
<library>hal_generic_pc</library>
|
||||
<library>ntoskrnl</library>
|
||||
|
|
|
@ -9,21 +9,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
|
||||
#include <mps.h>
|
||||
#include <halirq.h>
|
||||
#include <apic.h>
|
||||
#include <ioapic.h>
|
||||
|
||||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/i386/segment.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* GLOBALS *****************************************************************/
|
||||
|
||||
|
|
|
@ -9,12 +9,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
#include <apic.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
|
|
@ -9,15 +9,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos/types.h>
|
||||
#include <hal.h>
|
||||
#include <mps.h>
|
||||
#include <apic.h>
|
||||
#include <ioapic.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
|
|
|
@ -11,18 +11,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/ps.h>
|
||||
#include <ntos/minmax.h>
|
||||
#include <halirq.h>
|
||||
#include <hal.h>
|
||||
#include <mps.h>
|
||||
#include <apic.h>
|
||||
#include <ioapic.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/;
|
||||
|
||||
|
@ -42,7 +32,7 @@ KIRQL STDCALL KeGetCurrentIrql (VOID)
|
|||
Ki386SaveFlags(Flags);
|
||||
Ki386DisableInterrupts();
|
||||
|
||||
irql = Ki386ReadFsByte(offsetof(KPCR, Irql));
|
||||
irql = Ki386ReadFsByte(FIELD_OFFSET(KPCR, Irql));
|
||||
if (irql > HIGH_LEVEL)
|
||||
{
|
||||
DPRINT1 ("CurrentIrql %x\n", irql);
|
||||
|
@ -70,7 +60,7 @@ VOID KeSetCurrentIrql (KIRQL NewIrql)
|
|||
}
|
||||
Ki386SaveFlags(Flags);
|
||||
Ki386DisableInterrupts();
|
||||
Ki386WriteFsByte(offsetof(KPCR, Irql), NewIrql);
|
||||
Ki386WriteFsByte(FIELD_OFFSET(KPCR, Irql), NewIrql);
|
||||
if (Flags & X86_EFLAGS_IF)
|
||||
{
|
||||
Ki386EnableInterrupts();
|
||||
|
@ -92,9 +82,9 @@ HalpLowerIrql(KIRQL NewIrql, BOOL FromHalEndSystemInterrupt)
|
|||
{
|
||||
KeSetCurrentIrql (DISPATCH_LEVEL);
|
||||
APICWrite(APIC_TPR, IRQL2TPR (DISPATCH_LEVEL) & APIC_TPR_PRI);
|
||||
if (FromHalEndSystemInterrupt || Ki386ReadFsByte(offsetof(KPCR, HalReserved[HAL_DPC_REQUEST])))
|
||||
if (FromHalEndSystemInterrupt || Ki386ReadFsByte(FIELD_OFFSET(KIPCR, HalReserved[HAL_DPC_REQUEST])))
|
||||
{
|
||||
Ki386WriteFsByte(offsetof(KPCR, HalReserved[HAL_DPC_REQUEST]), 0);
|
||||
Ki386WriteFsByte(FIELD_OFFSET(KIPCR, HalReserved[HAL_DPC_REQUEST]), 0);
|
||||
Ki386EnableInterrupts();
|
||||
KiDispatchInterrupt();
|
||||
if (!(Flags & X86_EFLAGS_IF))
|
||||
|
@ -166,7 +156,7 @@ KfLowerIrql (KIRQL NewIrql)
|
|||
*
|
||||
* NOTES
|
||||
*/
|
||||
|
||||
#undef KeLowerIrql
|
||||
VOID STDCALL
|
||||
KeLowerIrql (KIRQL NewIrql)
|
||||
{
|
||||
|
@ -240,6 +230,7 @@ KfRaiseIrql (KIRQL NewIrql)
|
|||
* NOTES
|
||||
* Calls KfRaiseIrql
|
||||
*/
|
||||
#undef KeRaiseIrql
|
||||
VOID STDCALL
|
||||
KeRaiseIrql (KIRQL NewIrql,
|
||||
PKIRQL OldIrql)
|
||||
|
@ -392,11 +383,11 @@ HalRequestSoftwareInterrupt(IN KIRQL Request)
|
|||
switch (Request)
|
||||
{
|
||||
case APC_LEVEL:
|
||||
Ki386WriteFsByte(offsetof(KPCR, HalReserved[HAL_APC_REQUEST]), 1);
|
||||
Ki386WriteFsByte(FIELD_OFFSET(KIPCR, HalReserved[HAL_APC_REQUEST]), 1);
|
||||
break;
|
||||
|
||||
case DISPATCH_LEVEL:
|
||||
Ki386WriteFsByte(offsetof(KPCR, HalReserved[HAL_DPC_REQUEST]), 1);
|
||||
Ki386WriteFsByte(FIELD_OFFSET(KIPCR, HalReserved[HAL_DPC_REQUEST]), 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -14,23 +14,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
#include <halirq.h>
|
||||
#include <mps.h>
|
||||
|
||||
#include <ioapic.h>
|
||||
#include <apic.h>
|
||||
|
||||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/i386/segment.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
|
|
@ -9,11 +9,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <hal.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <hal.h>
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue