58 if (!UmaDesc)
return NULL;
106 if (UmaDesc->
Size > MaxSize) MaxSize = UmaDesc->
Size;
145 DPRINT1(
"CreateUmaDescriptor failed, UMA descriptor list possibly corrupted!\n");
153 UmaDesc = NewUmaDesc;
176 DPRINT1(
"CreateUmaDescriptor failed, UMA descriptor list possibly corrupted!\n");
186 FoundUmaDesc = UmaDesc;
202 *
Size = (MaxSize >> 4);
224 FoundUmaDesc = UmaDesc;
242 if (NextDesc && NextDesc->Type == FoundUmaDesc->
Type)
244 FoundUmaDesc->
Size += NextDesc->Size;
248 if (PrevDesc && PrevDesc->
Type == FoundUmaDesc->
Type)
250 PrevDesc->
Size += FoundUmaDesc->
Size;
282 if (UmaDesc->
Size > MaxSize) MaxSize = UmaDesc->
Size;
289 FoundUmaDesc = UmaDesc;
331 DPRINT1(
"CreateUmaDescriptor failed, UMA descriptor list possibly corrupted!\n");
370 *
Size = (MaxSize >> 4);
378#define ROM_AREA_START 0xE0000
379#define ROM_AREA_END 0xFFFFF
381#define OPTION_ROM_SIGNATURE 0xAA55
384 ULONG StartAddress = 0;
397 ULONG RomBoundaries[] = {0xA0000, 0xC0000, 0xF0000, 0x100000};
398 ULONG SizeIncrement[] = {0x20000, 0x00800, 0x10000, 0x0000 };
408 End = RomBoundaries[
i+1];
413 if (StartAddress == 0)
430 if (!UmaDesc)
return FALSE;
444 if (!UmaDesc)
return FALSE;
453 ULONG PrevRomAddress = 0;
454 ULONG PrevRomSize = 0;
480 if (!UmaDesc)
return FALSE;
495 if (StartAddress == 0)
521 if (StartAddress != 0 &&
Size != 0 &&
526 if (!UmaDesc)
return FALSE;
533 if (PrevRomAddress + PrevRomSize >
Address)
541 PrevRomSize =
max(PrevRomSize, RomSize +
Address - PrevRomAddress);
545 StartAddress = PrevRomAddress;
554 PrevRomSize = RomSize;
584 if (!UmaDesc)
return FALSE;
600 if (StartAddress != 0 &&
Size != 0)
604 if (!UmaDesc)
return FALSE;
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#define REAL_TO_PHYS(ptr)
#define RemoveEntryList(Entry)
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
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
base of all file and directory entries
struct _LIST_ENTRY * Blink
struct _LIST_ENTRY * Flink
#define CONTAINING_RECORD(address, type, field)
BOOLEAN UmaMgrInitialize(VOID)
BOOLEAN UmaDescReallocate(IN USHORT Segment, IN OUT PUSHORT Size)
struct _UMA_DESCRIPTOR * PUMA_DESCRIPTOR
#define OPTION_ROM_SIGNATURE
static LIST_ENTRY UmaDescriptorList
struct _UMA_DESCRIPTOR UMA_DESCRIPTOR
BOOLEAN UmaDescRelease(IN USHORT Segment)
BOOLEAN UmaDescReserve(IN OUT PUSHORT Segment, IN OUT PUSHORT Size)
static VOID FreeUmaDescriptor(PUMA_DESCRIPTOR UmaDesc)
static PUMA_DESCRIPTOR CreateUmaDescriptor(IN OUT PLIST_ENTRY ListHead, IN ULONG Address, IN ULONG Size, IN UMA_DESC_TYPE Type)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size