[NDK] Add BIOS call API for amd64

This commit is contained in:
Timo Kreuzer 2018-02-11 16:43:51 +01:00
parent 187c9fc33c
commit f18958ffa2
2 changed files with 65 additions and 2 deletions

View file

@ -294,5 +294,48 @@ HalSetTimeIncrement(
_In_ ULONG Increment
);
#endif
#endif
//
// BIOS call API
//
#ifdef _M_AMD64
NTSTATUS
NTAPI
x86BiosAllocateBuffer(
_In_ ULONG *Size,
_In_ USHORT *Segment,
_In_ USHORT *Offset);
NTSTATUS
NTAPI
x86BiosFreeBuffer(
_In_ USHORT Segment,
_In_ USHORT Offset);
NTSTATUS
NTAPI
x86BiosReadMemory(
_In_ USHORT Segment,
_In_ USHORT Offset,
_Out_writes_bytes_(Size) PVOID Buffer,
_In_ ULONG Size);
NTSTATUS
NTAPI
x86BiosWriteMemory(
_In_ USHORT Segment,
_In_ USHORT Offset,
_In_reads_bytes_(Size) PVOID Buffer,
_In_ ULONG Size);
BOOLEAN
NTAPI
x86BiosCall(
_In_ ULONG InterruptNumber,
_Inout_ PX86_BIOS_REGISTERS Registers);
#endif // _M_AMD64
#endif // NTOS_MODE_USER
#endif // _HALFUNCS_H

View file

@ -275,6 +275,26 @@ extern PUCHAR NTHALAPI KdComPortInUse;
//
#define HAL_IRQ_TRANSLATOR_VERSION 0x0
//
// BIOS call structure
//
#ifdef _M_AMD64
typedef struct _X86_BIOS_REGISTERS
{
ULONG Eax;
ULONG Ecx;
ULONG Edx;
ULONG Ebx;
ULONG Ebp;
ULONG Esi;
ULONG Edi;
USHORT SegDs;
USHORT SegEs;
} X86_BIOS_REGISTERS, *PX86_BIOS_REGISTERS;
#endif // _M_AMD64
#endif
#endif