2006-05-10 17:47:44 +00:00
|
|
|
/*++ NDK Version: 0098
|
2005-11-22 04:57:45 +00:00
|
|
|
|
|
|
|
Copyright (c) Alex Ionescu. All rights reserved.
|
|
|
|
|
|
|
|
Header Name:
|
|
|
|
|
|
|
|
halfuncs.h
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
|
|
|
|
Function definitions for the HAL.
|
|
|
|
|
|
|
|
Author:
|
|
|
|
|
2006-05-10 17:47:44 +00:00
|
|
|
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
|
2005-11-22 04:57:45 +00:00
|
|
|
|
|
|
|
--*/
|
|
|
|
|
2005-06-18 23:33:40 +00:00
|
|
|
#ifndef _HALFUNCS_H
|
|
|
|
#define _HALFUNCS_H
|
|
|
|
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
|
|
|
// Dependencies
|
|
|
|
//
|
2005-11-25 00:17:40 +00:00
|
|
|
#include <umtypes.h>
|
|
|
|
#include <haltypes.h>
|
2006-11-14 22:42:59 +00:00
|
|
|
#include <ketypes.h>
|
2005-11-22 04:57:45 +00:00
|
|
|
|
2005-11-25 00:17:40 +00:00
|
|
|
#ifndef NTOS_MODE_USER
|
2005-06-18 23:33:40 +00:00
|
|
|
|
2006-11-14 18:17:33 +00:00
|
|
|
//
|
|
|
|
// Private HAL Callbacks
|
|
|
|
//
|
|
|
|
#define HalHandlerForBus HALPRIVATEDISPATCH->HalHandlerForBus
|
|
|
|
#define HalHandlerForConfigSpace HALPRIVATEDISPATCH->HalHandlerForConfigSpace
|
|
|
|
#define HalLocateHiberRanges HALPRIVATEDISPATCH->HalLocateHiberRanges
|
|
|
|
#define HalRegisterBusHandler HALPRIVATEDISPATCH->HalRegisterBusHandler
|
|
|
|
#define HalSetWakeEnable HALPRIVATEDISPATCH->HalSetWakeEnable
|
|
|
|
#define HalSetWakeAlarm HALPRIVATEDISPATCH->HalSetWakeAlarm
|
|
|
|
#define HalPciTranslateBusAddress HALPRIVATEDISPATCH->HalPciTranslateBusAddress
|
|
|
|
#define HalPciAssignSlotResources HALPRIVATEDISPATCH->HalPciAssignSlotResources
|
|
|
|
#define HalHaltSystem HALPRIVATEDISPATCH->HalHaltSystem
|
|
|
|
#define HalFindBusAddressTranslation HALPRIVATEDISPATCH->HalFindBusAddressTranslation
|
|
|
|
#define HalResetDisplay HALPRIVATEDISPATCH->HalResetDisplay
|
|
|
|
#define HalAllocateMapRegisters HALPRIVATEDISPATCH->HalAllocateMapRegisters
|
|
|
|
#define KdSetupPciDeviceForDebugging HALPRIVATEDISPATCH->KdSetupPciDeviceForDebugging
|
|
|
|
#define KdReleasePciDeviceforDebugging HALPRIVATEDISPATCH->KdReleasePciDeviceforDebugging
|
|
|
|
#define KdGetAcpiTablePhase0 HALPRIVATEDISPATCH->KdGetAcpiTablePhase0
|
|
|
|
#define KdCheckPowerButton HALPRIVATEDISPATCH->KdCheckPowerButton
|
|
|
|
#define HalVectorToIDTEntry HALPRIVATEDISPATCH->HalVectorToIDTEntry
|
|
|
|
#define KdMapPhysicalMemory64 HALPRIVATEDISPATCH->KdMapPhysicalMemory64
|
|
|
|
#define KdUnmapVirtualAddress HALPRIVATEDISPATCH->KdUnmapVirtualAddress
|
|
|
|
|
2006-01-07 02:06:22 +00:00
|
|
|
//
|
|
|
|
// The DDK steals these away from you.
|
|
|
|
//
|
|
|
|
#ifdef _MSC_VER
|
2006-11-13 04:31:39 +00:00
|
|
|
//void _enable(void);
|
|
|
|
//void _disable(void);
|
2006-10-26 01:49:51 +00:00
|
|
|
#pragma intrinsic(_enable)
|
|
|
|
#pragma intrinsic(_disable)
|
2006-01-07 02:06:22 +00:00
|
|
|
#endif
|
|
|
|
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
|
|
|
// Display Functions
|
|
|
|
//
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-11-22 04:57:45 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalDisplayString(
|
|
|
|
IN PCHAR String
|
|
|
|
);
|
|
|
|
|
|
|
|
//
|
|
|
|
// Initialization Functions
|
|
|
|
//
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-11-22 04:57:45 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
HalAllProcessorsStarted(
|
|
|
|
VOID
|
|
|
|
);
|
2005-06-18 23:33:40 +00:00
|
|
|
|
2006-05-10 17:47:44 +00:00
|
|
|
#ifdef _ARC_
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-11-22 04:57:45 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalInitializeProcessor(
|
|
|
|
ULONG ProcessorNumber,
|
2006-05-10 17:47:44 +00:00
|
|
|
struct _LOADER_PARAMETER_BLOCK *LoaderBlock
|
2005-11-22 04:57:45 +00:00
|
|
|
);
|
2005-06-18 23:33:40 +00:00
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-26 05:52:40 +00:00
|
|
|
BOOLEAN
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2005-11-22 04:57:45 +00:00
|
|
|
HalInitSystem(
|
|
|
|
ULONG BootPhase,
|
2006-05-10 17:47:44 +00:00
|
|
|
struct _LOADER_PARAMETER_BLOCK *LoaderBlock
|
2005-11-22 04:57:45 +00:00
|
|
|
);
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2006-11-14 20:59:48 +00:00
|
|
|
BOOLEAN
|
2005-11-22 04:57:45 +00:00
|
|
|
NTAPI
|
2006-11-14 20:59:48 +00:00
|
|
|
HalStartNextProcessor(
|
2006-11-14 22:42:59 +00:00
|
|
|
IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
|
2006-11-14 20:59:48 +00:00
|
|
|
IN PKPROCESSOR_STATE ProcessorState
|
2005-11-22 04:57:45 +00:00
|
|
|
);
|
2005-06-26 05:52:40 +00:00
|
|
|
|
2006-11-14 20:59:48 +00:00
|
|
|
#endif
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2006-11-14 20:59:48 +00:00
|
|
|
VOID
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2006-11-14 20:59:48 +00:00
|
|
|
HalReturnToFirmware(
|
|
|
|
FIRMWARE_REENTRY Action
|
2005-11-22 04:57:45 +00:00
|
|
|
);
|
2005-06-18 23:33:40 +00:00
|
|
|
|
2006-09-11 06:50:19 +00:00
|
|
|
//
|
|
|
|
// CPU Routines
|
|
|
|
//
|
|
|
|
NTHALAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalProcessorIdle(
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
|
|
|
// Interrupt Functions
|
|
|
|
//
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-26 01:08:55 +00:00
|
|
|
BOOLEAN
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
HalBeginSystemInterrupt(
|
|
|
|
KIRQL Irql,
|
2006-05-27 15:38:37 +00:00
|
|
|
ULONG Vector,
|
2005-06-18 23:33:40 +00:00
|
|
|
PKIRQL OldIrql
|
|
|
|
);
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
BOOLEAN
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
HalDisableSystemInterrupt(
|
|
|
|
ULONG Vector,
|
|
|
|
KIRQL Irql
|
|
|
|
);
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
BOOLEAN
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
HalEnableSystemInterrupt(
|
|
|
|
ULONG Vector,
|
|
|
|
KIRQL Irql,
|
|
|
|
KINTERRUPT_MODE InterruptMode
|
|
|
|
);
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
VOID
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
HalEndSystemInterrupt(
|
|
|
|
KIRQL Irql,
|
|
|
|
ULONG Vector
|
|
|
|
);
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
BOOLEAN
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
HalGetEnvironmentVariable(
|
2006-06-23 21:21:45 +00:00
|
|
|
PCH Variable,
|
|
|
|
USHORT Length,
|
|
|
|
PCH Buffer
|
2005-06-18 23:33:40 +00:00
|
|
|
);
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
VOID
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2005-11-22 04:57:45 +00:00
|
|
|
HalReportResourceUsage(
|
|
|
|
VOID
|
2005-06-18 23:33:40 +00:00
|
|
|
);
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
HalRequestSoftwareInterrupt(
|
|
|
|
KIRQL SoftwareInterruptRequested
|
|
|
|
);
|
|
|
|
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
VOID
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2005-11-22 04:57:45 +00:00
|
|
|
HalRequestIpi(
|
2006-05-10 17:47:44 +00:00
|
|
|
KAFFINITY TargetSet
|
2005-06-18 23:33:40 +00:00
|
|
|
);
|
|
|
|
|
2005-12-01 21:23:06 +00:00
|
|
|
NTHALAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalHandleNMI(
|
2006-06-23 21:21:45 +00:00
|
|
|
PVOID NmiInfo
|
2005-12-01 21:23:06 +00:00
|
|
|
);
|
|
|
|
|
2005-11-22 04:57:45 +00:00
|
|
|
//
|
|
|
|
// Environment Functions
|
|
|
|
//
|
2005-11-27 20:18:33 +00:00
|
|
|
NTHALAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
BOOLEAN
|
2005-09-05 04:48:20 +00:00
|
|
|
NTAPI
|
2005-06-18 23:33:40 +00:00
|
|
|
HalSetEnvironmentVariable(
|
|
|
|
IN PCH Name,
|
|
|
|
IN PCH Value
|
|
|
|
);
|
|
|
|
|
2006-05-10 17:47:44 +00:00
|
|
|
//
|
|
|
|
// Time Functions
|
|
|
|
//
|
|
|
|
NTHALAPI
|
2006-06-23 21:21:45 +00:00
|
|
|
BOOLEAN
|
2006-05-10 17:47:44 +00:00
|
|
|
NTAPI
|
|
|
|
HalQueryRealTimeClock(
|
|
|
|
IN PTIME_FIELDS RtcTime
|
|
|
|
);
|
|
|
|
|
2006-10-26 01:49:51 +00:00
|
|
|
NTHALAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalSetRealTimeClock(
|
|
|
|
IN PTIME_FIELDS RtcTime
|
|
|
|
);
|
|
|
|
|
2005-11-25 00:17:40 +00:00
|
|
|
#endif
|
2005-06-18 23:33:40 +00:00
|
|
|
#endif
|