AppPathLength - sizeof(UNICODE_NULL));
PathCopy[AppPathLength] = UNICODE_NULL;
- /* Finally, initialize the outoing string */
+ /* Finally, initialize the outgoing string */
RtlInitUnicodeString(ApplicationDirectoryPath, PathCopy);
}
else
VOID
)
{
- /* Check if we're booted by UEFI off the DVD directlry */
+ /* Check if we're booted by UEFI off the DVD directly */
if ((BlpBootDevice->DeviceType == LocalDevice) &&
(BlpBootDevice->Local.Type == CdRomDevice) &&
(BlpApplicationFlags & BL_APPLICATION_FLAG_CONVERTED_FROM_EFI))
return MenuPolicyLegacy;
}
- /* Use the correct opetion ID */
+ /* Use the correct option ID */
OptionId = BcdResumeInteger_BootMenuPolicy;
}
/* If the legacy menu must be shown, or if we have a boot entry */
if ((BmGetBootMenuPolicy(BootEntry) != MenuPolicyStandard) || (BootEntry))
{
- /* Check if any key has been presseed */
+ /* Check if any key has been pressed */
BmDisplayGetBootMenuStatus(&MenuStatus);
if (MenuStatus.AnyKey)
{
BcdLibraryDevice_ApplicationDevice,
&AppDevice,
NULL);
- if (NT_SUCCESS(Status))
+ if (!NT_SUCCESS(Status))
{
/* Force re-enumeration */
Status = BlFwEnumerateDevice(AppDevice);
}
else if (ReturnArgs.Flags & 4)
{
- /* Flag 4 -- unkown */
+ /* Flag 4 -- unknown */
*LaunchCode = 1;
}
else if (ReturnArgs.Flags & 8)
{
- /* Flag 5 -- unkown */
+ /* Flag 5 -- unknown */
*LaunchCode = 5;
}
else if (ReturnArgs.Flags & 0x10)
{
- /* Flag 6 -- unkown */
+ /* Flag 6 -- unknown */
*LaunchCode = 6;
}
else if (ReturnArgs.Flags & 0x20)
{
- /* Flag 7 -- unkown */
+ /* Flag 7 -- unknown */
*LaunchCode = 7;
}
else if (ReturnArgs.Flags & BL_RETURN_ARGUMENTS_NO_PAE_FLAG)
return Status;
}
- /* Check if boot was successfull, or cancelled and we're not doing WinRE */
+ /* Check if boot was successful, or cancelled and we're not doing WinRE */
if (((NT_SUCCESS(Status)) || (Status == STATUS_CANCELLED)) && !(DoRecovery))
{
return Status;
}
}
+
+ /* TEST MODE */
+ EfiPrintf(L"Performing memory allocator tests...\r\n");
+ {
+ NTSTATUS Status;
+ PHYSICAL_ADDRESS PhysicalAddress;
+ PBL_MEMORY_DESCRIPTOR Found;
+
+ /* Allocate 1 physical page */
+ PhysicalAddress.QuadPart = 0;
+ Status = BlMmAllocatePhysicalPages(&PhysicalAddress, BlLoaderData, 1, 0, 1);
+ EfiPrintf(L"Allocation status: %lx at address: %llx\r\n", Status, PhysicalAddress.QuadPart);
+ EfiStall(10000);
+
+ Found = MmMdFindDescriptor(BL_MM_INCLUDE_UNMAPPED_ALLOCATED, 0, PhysicalAddress.QuadPart >> PAGE_SHIFT);
+ EfiPrintf(L"Found descriptor: %p %llx\r\n", Found, Found->BasePage);
+
+ Status = BlMmFreePhysicalPages(PhysicalAddress);
+ EfiPrintf(L"Memory free status: %lx\r\n", Status);
+ }
+
+
/* Write out the first XML tag */
BlXmiWrite(L"<bootmgr/>");
- /* Check for factory resset */
+ /* Check for factory reset */
BlSecureBootCheckForFactoryReset();
/* Load the revocation list */
&CustomActions);
if ((NT_SUCCESS(Status)) && (CustomActions))
{
- /* We don't suppport this yet */
+ /* We don't support this yet */
EfiPrintf(L"Not implemented\r\n");
Status = STATUS_NOT_IMPLEMENTED;
goto Failure;