73 if (EntryPoint21->
Length > 32)
78 for (
i = 0;
i < EntryPoint21->
Length;
i++)
80 Checksum += EntryPointAddress[
i];
88 BiosTablesHeader->Used20CallingMethod = 0;
89 BiosTablesHeader->SmbiosMajorVersion = EntryPoint21->
MajorVersion;
90 BiosTablesHeader->SmbiosMinorVersion = EntryPoint21->
MinorVersion;
91 BiosTablesHeader->DmiRevision = 2;
100 if (EntryPoint30->
Length > 32)
105 for (
i = 0;
i < EntryPoint30->
Length;
i++)
107 Checksum += EntryPointAddress[
i];
115 BiosTablesHeader->Used20CallingMethod = 0;
116 BiosTablesHeader->SmbiosMajorVersion = EntryPoint30->
MajorVersion;
117 BiosTablesHeader->SmbiosMinorVersion = EntryPoint30->
MinorVersion;
118 BiosTablesHeader->DmiRevision = 3;
129WmipGetRawSMBiosTableData(
133 static const SIZE_T SearchSize = 0x10000;
138 PVOID BiosTables, TableMapping;
147 if (EntryPointMapping ==
NULL)
149 DPRINT1(
"Failed to map range for SMBIOS entry point\n");
170 if (TableAddress == 0)
172 DPRINT1(
"Could not find the SMBIOS entry point\n");
183 if (BiosTables ==
NULL)
185 DPRINT1(
"Failed to allocate %lu bytes for the SMBIOS table\n",
198 if (TableMapping ==
NULL)
233 DPRINT1(
"WmipGetRawSMBiosTableData failed: 0x%08lx\n",
Status);
243 if (*InOutBufferSize < ResultSize)
245 DPRINT1(
"Buffer too small. Got %lu, need %lu\n",
246 *InOutBufferSize, ResultSize);
271 *InOutBufferSize = ResultSize;
274 if (TableData !=
NULL)
#define NT_SUCCESS(StatCode)
#define __drv_allocatesMem(kind)
#define ExAllocatePoolWithTag(hernya, size, tag)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
const GUID MSSmBios_RawSMBiosTables_GUID
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
#define RtlEqualMemory(dst, src, len)
#define ExFreePoolWithTag(_P, _T)
unsigned __int64 * PULONG64
#define _Outptr_opt_result_buffer_(s)
_In_ ULONG _In_ ULONG Offset
struct _SMBIOS30_ENTRY_POINT * PSMBIOS30_ENTRY_POINT
_At_ * OutTableData(Mem)) NTSTATUSNTAPIWmipGetRawSMBiosTableData(_Outptr_opt_result_buffer_(*OutDataSize) PVOID *OutTableData, _Out_ PULONG OutDataSize
struct _SMBIOS30_ENTRY_POINT SMBIOS30_ENTRY_POINT
static BOOLEAN GetEntryPointData(_In_ const UCHAR *EntryPointAddress, _Out_ PULONG64 TableAddress, _Out_ PULONG TableSize, _Out_ PMSSmBios_RawSMBiosTables BiosTablesHeader)
struct _SMBIOS21_ENTRY_POINT * PSMBIOS21_ENTRY_POINT
NTSTATUS NTAPI WmipQueryRawSMBiosTables(_Inout_ ULONG *InOutBufferSize, _Out_opt_ PVOID OutBuffer)
struct _SMBIOS21_ENTRY_POINT SMBIOS21_ENTRY_POINT
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
#define STATUS_BUFFER_TOO_SMALL
USHORT NumberOfStructures
struct _WNODE_HEADER WnodeHeader
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
#define WNODE_FLAG_FIXED_INSTANCE_SIZE
struct tagWNODE_ALL_DATA WNODE_ALL_DATA
_Must_inspect_result_ typedef _Out_ PULONG TableSize
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress