243#define DISK_SIGNATURE_OFFSET 0x1B8
244#define PARTITION_TABLE_OFFSET 0x1BE
245#define BOOT_SIGNATURE_OFFSET (0x200 - 2)
247#define BOOT_RECORD_SIGNATURE 0xAA55
248#define NUM_PARTITION_TABLE_ENTRIES 4
253#define GET_STARTING_SECTOR(p) \
254 ((ULONG)(p->StartingSectorLsb0) + \
255 (ULONG)(p->StartingSectorLsb1 << 8 ) + \
256 (ULONG)(p->StartingSectorMsb0 << 16) + \
257 (ULONG)(p->StartingSectorMsb1 << 24))
259#define GET_ENDING_S_OF_CHS(p) \
260 ((UCHAR)(p->EndingCylinderLsb & 0x3F))
262#define GET_PARTITION_LENGTH(p) \
263 ((ULONG)(p->PartitionLengthLsb0) + \
264 (ULONG)(p->PartitionLengthLsb1 << 8) + \
265 (ULONG)(p->PartitionLengthMsb0 << 16) + \
266 (ULONG)(p->PartitionLengthMsb1 << 24))
268#define SET_PARTITION_LENGTH(p, l) \
269 p->PartitionLengthLsb0 = l & 0xFF; \
270 p->PartitionLengthLsb1 = (l >> 8) & 0xFF; \
271 p->PartitionLengthMsb0 = (l >> 16) & 0xFF; \
272 p->PartitionLengthMsb1 = (l >> 24) & 0xFF
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
BIOS_MEMORY_MAP MemoryMap[32]
static const WCHAR Signature[]
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T ContextSize
_In_ FILTER_INFORMATION_CLASS InformationClass
enum _INTERFACE_TYPE INTERFACE_TYPE
static PTIME_FIELDS TimeFields
NTSTATUS(NTAPI * PINSTALL_BUS_HANDLER)(_In_ PBUS_HANDLER Bus)
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
struct _PARTITION_DESCRIPTOR * PPARTITION_DESCRIPTOR
struct _PARTITION_TABLE * PPARTITION_TABLE
NTSTATUS NTAPI xHalQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer, OUT PULONG ReturnedLength)
struct _DISK_LAYOUT * PDISK_LAYOUT
PBUS_HANDLER FASTCALL xHalHandlerForBus(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber)
VOID NTAPI xKdUnmapVirtualAddress(IN PVOID VirtualAddress, IN ULONG NumberPages, IN BOOLEAN FlushCurrentTLB)
NTSTATUS NTAPI xHalGetInterruptTranslator(IN INTERFACE_TYPE ParentInterfaceType, IN ULONG ParentBusNumber, IN INTERFACE_TYPE BridgeInterfaceType, IN USHORT Size, IN USHORT Version, OUT PTRANSLATOR_INTERFACE Translator, OUT PULONG BridgeBusNumber)
NTSTATUS FASTCALL xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, IN OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
VOID FASTCALL xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
UCHAR NTAPI xHalVectorToIDTEntry(IN ULONG Vector)
VOID NTAPI xHalLocateHiberRanges(IN PVOID MemoryMap)
NTSTATUS NTAPI xHalMirrorPhysicalMemory(IN PHYSICAL_ADDRESS PhysicalAddress, IN LARGE_INTEGER NumberOfBytes)
struct _BOOT_SECTOR_INFO BOOT_SECTOR_INFO
VOID NTAPI xHalSetWakeAlarm(IN ULONGLONG AlartTime, IN PTIME_FIELDS TimeFields)
NTSTATUS NTAPI xHalInitPowerManagement(IN PPM_DISPATCH_TABLE PmDriverDispatchTable, OUT PPM_DISPATCH_TABLE *PmHalDispatchTable)
NTSTATUS NTAPI xHalStartMirroring(VOID)
NTSTATUS NTAPI xKdReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
VOID NTAPI xHalHaltSystem(VOID)
struct _PARTITION_DESCRIPTOR PARTITION_DESCRIPTOR
VOID FASTCALL xHalReferenceHandler(IN PBUS_HANDLER BusHandler)
NTSTATUS NTAPI xHalInitPnpDriver(VOID)
VOID NTAPI xHalSetWakeEnable(IN BOOLEAN Enable)
VOID FASTCALL xHalExamineMBR(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG MbrTypeIdentifier, OUT PVOID *MbrBuffer)
NTSTATUS FASTCALL xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG PartitionNumber, IN ULONG PartitionType)
NTSTATUS NTAPI xKdSetupPciDeviceForDebugging(IN PVOID LoaderBlock OPTIONAL, IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
NTSTATUS NTAPI xHalEndMirroring(IN ULONG PassNumber)
struct _PARTITION_TABLE PARTITION_TABLE
PVOID NTAPI xKdGetAcpiTablePhase(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, IN ULONG Signature)
NTSTATUS NTAPI xHalQueryBusSlots(IN PBUS_HANDLER BusHandler, IN ULONG BufferSize, OUT PULONG SlotNumbers, OUT PULONG ReturnedLength)
NTSTATUS NTAPI xHalSetSystemInformation(IN HAL_SET_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN PVOID Buffer)
NTSTATUS NTAPI xHalRegisterBusHandler(IN INTERFACE_TYPE InterfaceType, IN BUS_DATA_TYPE ConfigSpace, IN ULONG BusNumber, IN INTERFACE_TYPE ParentInterfaceType, IN ULONG ParentBusNumber, IN ULONG ContextSize, IN PINSTALL_BUS_HANDLER InstallCallback, OUT PBUS_HANDLER *BusHandler)
struct _BOOT_SECTOR_INFO * PBOOT_SECTOR_INFO
BOOLEAN NTAPI xHalTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
NTSTATUS FASTCALL xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG SectorsPerTrack, IN ULONG NumberOfHeads, IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
VOID NTAPI xHalEndOfBoot(VOID)
PVOID NTAPI MatchAll(IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG NumberPages, IN BOOLEAN FlushCurrentTLB)
struct _DISK_LAYOUT DISK_LAYOUT
NTSTATUS NTAPI xHalAllocateMapRegisters(IN PADAPTER_OBJECT AdapterObject, IN ULONG Unknown, IN ULONG Unknown2, PMAP_REGISTER_ENTRY Registers)
enum _BUS_DATA_TYPE BUS_DATA_TYPE
PULONG MinorVersion OPTIONAL
PARTITION_TABLE PartitionTable[1]
UCHAR PartitionLengthMsb0
UCHAR PartitionLengthLsb1
UCHAR PartitionLengthMsb1
UCHAR PartitionLengthLsb0
UCHAR StartingCylinderLsb
UCHAR StartingCylinderMsb
PARTITION_INFORMATION PartitionEntry[4]
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
enum _HAL_SET_INFORMATION_CLASS HAL_SET_INFORMATION_CLASS
enum _HAL_QUERY_INFORMATION_CLASS HAL_QUERY_INFORMATION_CLASS
_In_ ULONG _In_ ULONG _In_ ULONG NumberOfHeads
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
_In_ ULONG _In_ BOOLEAN ReturnRecognizedPartitions
_In_ ULONG _In_ ULONG SectorsPerTrack
_In_ ULONG _In_ BOOLEAN _Out_ struct _DRIVE_LAYOUT_INFORMATION ** PartitionBuffer
_In_ ULONG _In_ ULONG PartitionNumber
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes