diff --git a/PayloadPkg/OsLoader/LoadImage.c b/PayloadPkg/OsLoader/LoadImage.c index 3d4285c9..46a79f70 100644 --- a/PayloadPkg/OsLoader/LoadImage.c +++ b/PayloadPkg/OsLoader/LoadImage.c @@ -52,14 +52,14 @@ FindBootPartition ( // Status = MediaSetInterfaceType (BootOption->DevType); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "Invalid Boot device configured\n")); + DEBUG ((DEBUG_ERROR, "Failed to set media interface - %r\n", Status)); return RETURN_UNSUPPORTED; } - DEBUG ((DEBUG_INFO, "Getting boot image from... %a\n", GetBootDeviceNameString(BootOption->DevType))); - + DEBUG ((DEBUG_INFO, "Getting boot image from %a\n", GetBootDeviceNameString(BootOption->DevType))); Status = MediaInitialize (BootMediumPciBase, DevInitAll); if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed to init media - %r\n", Status)); return Status; } @@ -70,6 +70,7 @@ FindBootPartition ( DEBUG ((DEBUG_INFO, "Try to find boot partition\n")); Status = FindPartitions (BootOption->HwPart, HwPartHandle); if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed to find partition - %r\n", Status)); return Status; } AddMeasurePoint (0x4060); @@ -295,7 +296,7 @@ LoadLinuxFile ( } Ptr[FileInfo->Len] = 0; - AsciiStrToUnicodeStrS (Ptr, FileName, sizeof(FileName) / sizeof(CHAR16)); + AsciiStrToUnicodeStrS (Ptr, FileName, sizeof(FileName) / sizeof(CHAR16)); FileSize = 0; FileBuffer = NULL; Status = GetFileByName (FsHandle, FileName, &FileBuffer, &FileSize); @@ -373,13 +374,13 @@ GetTraditionalLinux ( MenuEntry = LinuxBootCfg.MenuEntry; MenuEntry[0].Name.Pos = 0; MenuEntry[0].Name.Len = 5; - AsciiStrCpyS (MenuEntry[0].Name.Buf, sizeof(MenuEntry[0].Name.Buf), "Linux"); + AsciiStrCpyS (MenuEntry[0].Name.Buf, sizeof(MenuEntry[0].Name.Buf), "Linux"); MenuEntry[0].InitRd.Pos = 0; MenuEntry[0].InitRd.Len = 6; - AsciiStrCpyS (MenuEntry[0].InitRd.Buf, sizeof(MenuEntry[0].InitRd.Buf), "initrd"); + AsciiStrCpyS (MenuEntry[0].InitRd.Buf, sizeof(MenuEntry[0].InitRd.Buf), "initrd"); MenuEntry[0].Kernel.Pos = 0; MenuEntry[0].Kernel.Len = 7; - AsciiStrCpyS (MenuEntry[0].Kernel.Buf, sizeof(MenuEntry[0].Kernel.Buf), "vmlinuz"); + AsciiStrCpyS (MenuEntry[0].Kernel.Buf, sizeof(MenuEntry[0].Kernel.Buf), "vmlinuz"); MenuEntry[0].Command.Pos = 0; MenuEntry[0].Command.Len = ConfigFileSize; EntryIdx = 0;