/* PRIVATE FUNCTIONS **********************************************************/
-VOID
-NTAPI
-HalpCheckPowerButton(VOID)
-{
- //
- // Nothing to do on non-ACPI
- //
- return;
-}
-
-#ifndef _MINIHAL_
-PVOID
+NTSTATUS
NTAPI
-HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
- IN ULONG NumberPage)
+HalpOpenRegistryKey(IN PHANDLE KeyHandle,
+ IN HANDLE RootKey,
+ IN PUNICODE_STRING KeyName,
+ IN ACCESS_MASK DesiredAccess,
+ IN BOOLEAN Create)
{
- //
- // Use kernel memory manager I/O map facilities
- //
- return MmMapIoSpace(PhysicalAddress,
- NumberPage << PAGE_SHIFT,
- MmNonCached);
+ NTSTATUS Status;
+ ULONG Disposition;
+ OBJECT_ATTRIBUTES ObjectAttributes;
+
+ /* Setup the attributes we received */
+ InitializeObjectAttributes(&ObjectAttributes,
+ KeyName,
+ OBJ_CASE_INSENSITIVE,
+ RootKey,
+ NULL);
+
+ /* What to do? */
+ if ( Create )
+ {
+ /* Create the key */
+ Status = ZwCreateKey(KeyHandle,
+ DesiredAccess,
+ &ObjectAttributes,
+ 0,
+ NULL,
+ REG_OPTION_VOLATILE,
+ &Disposition);
+ }
+ else
+ {
+ /* Open the key */
+ Status = ZwOpenKey(KeyHandle, DesiredAccess, &ObjectAttributes);
+ }
+
+ /* We're done */
+ return Status;
}
VOID
NTAPI
-HalpUnmapVirtualAddress(IN PVOID VirtualAddress,
- IN ULONG NumberPages)
+HalpCheckPowerButton(VOID)
{
//
- // Use kernel memory manager I/O map facilities
+ // Nothing to do on non-ACPI
//
- MmUnmapIoSpace(VirtualAddress, NumberPages << PAGE_SHIFT);
+ return;
}
-#endif
VOID
NTAPI