Changeset 48730 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Sep 27, 2013 12:28:22 PM (11 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
r48674 r48730 466 466 // machinename is ia32, ia64, x64, ... 467 467 // 468 LogFlowFuncMark();468 VBoxLogFlowFuncMark(); 469 469 FullDevicePath = FileDevicePath (Handle, EFI_REMOVABLE_MEDIA_FILE_NAME); 470 470 if (FullDevicePath != NULL) { … … 619 619 EFI_HANDLE Handle; 620 620 EFI_HANDLE ImageHandle; 621 EFI_DEVICE_PATH_PROTOCOL *FilePath = NULL;621 EFI_DEVICE_PATH_PROTOCOL *FilePath; 622 622 EFI_LOADED_IMAGE_PROTOCOL *ImageInfo; 623 623 EFI_DEVICE_PATH_PROTOCOL *WorkingDevicePath; … … 756 756 ); 757 757 758 LogFlowFuncMarkRC(Status);758 VBoxLogFlowFuncMarkRC(Status); 759 759 // 760 760 // If we didn't find an image directly, we need to try as if it is a removable device boot option … … 767 767 // 768 768 Handle = BdsLibGetBootableHandle(DevicePath); 769 LogFlowFuncMarkVar(Handle, "%p");769 VBoxLogFlowFuncMarkVar(Handle, "%p"); 770 770 if (Handle == NULL) { 771 771 goto Done; … … 777 777 #ifdef VBOX 778 778 /* @todo: improve Mac Detection */ 779 FilePath = NULL; 779 780 if ( Option->LoadOptionsSize 780 781 || StrnCmp(Option->OptionName, L"Boot0080", 8) == 0) … … 782 783 if (Option->LoadOptionsSize) 783 784 { 784 LogFlowFuncMarkVar(Option->LoadOptions, "%s");785 VBoxLogFlowFuncMarkVar(Option->LoadOptions, "%s"); 785 786 if (StrnCmp(L"config=", (CHAR16 *)Option->LoadOptions, 7) == 0) 786 787 { … … 793 794 pszTemp0 = &pszConfigValue[fQouted ? 2 : 1]; 794 795 pszTemp1 = pszTemp0; 795 LogFlowFuncMarkVar(pszTemp0, "%s");796 LogFlowFuncMarkVar(pszTemp1, "%s");796 VBoxLogFlowFuncMarkVar(pszTemp0, "%s"); 797 VBoxLogFlowFuncMarkVar(pszTemp1, "%s"); 797 798 pszFolder = AllocateZeroPool((StrLen(pszConfigValue) + StrLen(L"\\boot.efi") + 1) * sizeof(UINT16)); 798 799 while (pszTemp0) 799 800 { 800 LogFlowFuncMarkVar(pszTemp0, "%s");801 LogFlowFuncMarkVar(pszTemp1, "%s");801 VBoxLogFlowFuncMarkVar(pszTemp0, "%s"); 802 VBoxLogFlowFuncMarkVar(pszTemp1, "%s"); 802 803 pszFolder = StrnCat(pszFolder, pszTemp1, StrLen(pszTemp1) - StrLen(pszTemp0)); 803 804 pszTemp1 = pszTemp0; 804 805 pszFolder = StrCat(pszFolder, L"\\"); 805 LogFlowFuncMarkVar(pszFolder, "%s");806 LogFlowFuncMarkVar(pszTemp0, "%s");807 LogFlowFuncMarkVar(pszTemp1, "%s");806 VBoxLogFlowFuncMarkVar(pszFolder, "%s"); 807 VBoxLogFlowFuncMarkVar(pszTemp0, "%s"); 808 VBoxLogFlowFuncMarkVar(pszTemp1, "%s"); 808 809 pszTemp0 = StrStr(&pszTemp0[1], L"\\"); 809 LogFlowFuncMarkVar(pszTemp0, "%s");810 VBoxLogFlowFuncMarkVar(pszTemp0, "%s"); 810 811 } 811 812 pszFolder = StrCat(pszFolder, L"boot.efi"); 812 LogFlowFuncMarkVar(pszFolder,"%s");813 VBoxLogFlowFuncMarkVar(pszFolder,"%s"); 813 814 814 815 Status = gBS->HandleProtocol ( … … 816 817 &gEfiSimpleFileSystemProtocolGuid, 817 818 (VOID *) &Volume); 818 LogFlowFuncMarkRC(Status);819 VBoxLogFlowFuncMarkRC(Status); 819 820 if (!EFI_ERROR(Status)) 820 821 { 821 822 FilePath = FileDevicePath ((EFI_HANDLE)Handle, pszFolder); 822 LogFlowFuncMarkVar(DevicePathToStr(FilePath), "%s");823 VBoxLogFlowFuncMarkVar(DevicePathToStr(FilePath), "%s"); 823 824 } 824 825 } … … 827 828 { 828 829 /* Boot0080 hasn't got hint how detect file path */ 829 LogFlowFuncMarkVar(Handle, "%p");830 VBoxLogFlowFuncMarkVar(Handle, "%p"); 830 831 FilePath = FileDevicePath (Handle, L"\\System\\Library\\CoreServices\\boot.efi"); 831 832 if (FilePath) 832 833 { 833 LogFlowFuncMarkVar(DevicePathToStr(FilePath), "%s");834 VBoxLogFlowFuncMarkVar(DevicePathToStr(FilePath), "%s"); 834 835 } 835 836 } … … 850 851 &ImageHandle 851 852 ); 852 LogFlowFuncMarkRC(Status);853 VBoxLogFlowFuncMarkRC(Status); 853 854 if (EFI_ERROR (Status)) { 854 855 // … … 1388 1389 // Check "BootOrder" variable firstly, this variable hold the number of boot options 1389 1390 // 1390 LogFlowFuncEnter();1391 VBoxLogFlowFuncEnter(); 1391 1392 BootOrder = BdsLibGetVariableAndSize ( 1392 1393 L"BootOrder", … … 1395 1396 ); 1396 1397 if (NULL == BootOrder) { 1397 LogFlowFuncLeaveRC(EFI_NOT_FOUND);1398 VBoxLogFlowFuncLeaveRC(EFI_NOT_FOUND); 1398 1399 return EFI_NOT_FOUND; 1399 1400 } … … 1402 1403 while (Index < BootOrderSize / sizeof (UINT16)) { 1403 1404 UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", BootOrder[Index]); 1404 LogFlowFuncMarkVar(BootOption, "%s");1405 VBoxLogFlowFuncMarkVar(BootOption, "%s"); 1405 1406 BootOptionVar = BdsLibGetVariableAndSize ( 1406 1407 BootOption, … … 1410 1411 if (NULL == BootOptionVar) { 1411 1412 FreePool (BootOrder); 1412 LogFlowFuncLeaveRC(EFI_OUT_OF_RESOURCES);1413 VBoxLogFlowFuncLeaveRC(EFI_OUT_OF_RESOURCES); 1413 1414 return EFI_OUT_OF_RESOURCES; 1414 1415 } 1415 1416 1416 LogFlowFuncMarkVar(BootOption, "%s");1417 VBoxLogFlowFuncMarkVar(BootOption, "%s"); 1417 1418 if (!ValidateOption(BootOptionVar, BootOptionSize)) { 1418 1419 Corrupted = TRUE; … … 1439 1440 // Delete this invalid boot option "Boot####" 1440 1441 // 1441 LogFlowFuncMarkVar(BootOption, "DELETE %s");1442 VBoxLogFlowFuncMarkVar(BootOption, "DELETE %s"); 1442 1443 Status = gRT->SetVariable ( 1443 1444 BootOption, … … 1450 1451 // Mark this boot option in boot order as deleted 1451 1452 // 1452 LogFlowFuncMarkVar(BootOption, "%s");1453 LogFlowFuncMarkRC(Status);1453 VBoxLogFlowFuncMarkVar(BootOption, "%s"); 1454 VBoxLogFlowFuncMarkRC(Status); 1454 1455 BootOrder[Index] = 0xffff; 1455 1456 Corrupted = FALSE; … … 1477 1478 BootOrder 1478 1479 ); 1479 LogFlowFuncMarkRC(Status);1480 VBoxLogFlowFuncMarkRC(Status); 1480 1481 FreePool (BootOrder); 1481 1482 1482 LogFlowFuncLeaveRC(Status);1483 VBoxLogFlowFuncLeaveRC(Status); 1483 1484 return Status; 1484 1485 } … … 1568 1569 CHAR8 *LastLang; 1569 1570 EFI_IMAGE_OPTIONAL_HEADER_UNION HdrData; 1570 EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr = {0}; /* VBox: VS2010 thi s it may be used uninitialized. */1571 EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr = {0}; /* VBox: VS2010 thinks it may be used uninitialized. */ 1571 1572 1572 1573 FloppyNumber = 0; … … 1579 1580 LastLang = NULL; 1580 1581 ZeroMem (Buffer, sizeof (Buffer)); 1581 LogFlowFuncEnter(); 1582 VBoxLogFlowFuncEnter(); 1583 1582 1584 // 1583 1585 // If the boot device enumerate happened, just get the boot … … 1592 1594 FreePool (LastLang); 1593 1595 FreePool (PlatLang); 1594 LogFlowFuncLeaveRC(Status);1596 VBoxLogFlowFuncLeaveRC(Status); 1595 1597 return Status; 1596 1598 } else { … … 1742 1744 ); 1743 1745 for (Index = 0; Index < NumberFileSystemHandles; Index++) { 1746 #ifdef VBOX 1744 1747 BOOLEAN fLoaded = FALSE; 1748 #endif 1745 1749 Status = gBS->HandleProtocol ( 1746 1750 FileSystemHandles[Index], … … 1752 1756 // Skip if the file system handle supports a BlkIo protocol, 1753 1757 // 1754 #if 0 1758 #if 0 /* VBox */ 1755 1759 NeedDelete = TRUE; 1756 1760 Hdr.Union = &HdrData; … … 1776 1780 // machinename is ia32, ia64, x64, ... 1777 1781 // 1778 LogFlowFuncMark(); 1782 #ifdef VBOX 1783 VBoxLogFlowFuncMark(); 1779 1784 if (!fLoaded) 1785 #endif 1780 1786 { 1781 1787 Hdr.Union = &HdrData; … … 1788 1794 ); 1789 1795 } 1790 if ( !EFI_ERROR (Status) 1796 if ( !EFI_ERROR (Status) 1791 1797 && ( ( EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Hdr.Pe32->FileHeader.Machine) 1792 1798 && Hdr.Pe32->OptionalHeader.Subsystem == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION) 1793 || !fLoaded)) { 1799 || !fLoaded)) { /* VBox */ 1794 1800 NeedDelete = FALSE; 1795 1801 } … … 1891 1897 mEnumBootDevice = TRUE; 1892 1898 1893 LogFlowFuncLeaveRC(Status);1899 VBoxLogFlowFuncLeaveRC(Status); 1894 1900 return Status; 1895 1901 } … … 1914 1920 { 1915 1921 EFI_DEVICE_PATH_PROTOCOL *DevicePath; 1916 LogFlowFuncEnter();1917 LogFlowFuncMarkVar(String, "%s");1922 VBoxLogFlowFuncEnter(); 1923 VBoxLogFlowFuncMarkVar(String, "%s"); 1918 1924 1919 1925 DevicePath = DevicePathFromHandle (Handle); … … 1923 1929 // 1924 1930 BdsLibRegisterNewOption (BdsBootOptionList, DevicePath, String, L"BootOrder"); 1925 LogFlowFuncLeave();1931 VBoxLogFlowFuncLeave(); 1926 1932 } 1927 1933 … … 2053 2059 2054 2060 UpdatedDevicePath = DevicePath; 2055 LogFlowFuncEnter();2056 DEBUG((DEBUG_INFO, "%a:%d DevicePath:%s\n", __FUNCTION__, __LINE__, DevicePathToStr(DevicePath))); 2061 VBoxLogFlowFuncEnter(); 2062 DEBUG((DEBUG_INFO, "%a:%d DevicePath:%s\n", __FUNCTION__, __LINE__, DevicePathToStr(DevicePath))); /* VBox */ 2057 2063 2058 2064 // … … 2066 2072 // 2067 2073 Status = gBS->LocateDevicePath (&gEfiBlockIoProtocolGuid, &UpdatedDevicePath, &Handle); 2068 LogFlowFuncMarkRC(Status);2074 VBoxLogFlowFuncMarkRC(Status); 2069 2075 if (EFI_ERROR (Status)) { 2070 2076 // … … 2072 2078 // 2073 2079 Status = gBS->LocateDevicePath (&gEfiSimpleFileSystemProtocolGuid, &UpdatedDevicePath, &Handle); 2074 LogFlowFuncMarkRC(Status);2080 VBoxLogFlowFuncMarkRC(Status); 2075 2081 if (EFI_ERROR (Status)) { 2076 2082 // … … 2079 2085 UpdatedDevicePath = DevicePath; 2080 2086 Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &UpdatedDevicePath, &Handle); 2081 LogFlowFuncMarkRC(Status);2087 VBoxLogFlowFuncMarkRC(Status); 2082 2088 gBS->ConnectController (Handle, NULL, NULL, TRUE); 2083 2089 } … … 2127 2133 UpdatedDevicePath = DupDevicePath; 2128 2134 Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &UpdatedDevicePath, &Handle); 2129 LogFlowFuncMarkRC(Status);2135 VBoxLogFlowFuncMarkRC(Status); 2130 2136 // 2131 2137 // if the resulting device path point to a usb node, and the usb node is a dummy node, should only let device path only point to the previous Pci node … … 2155 2161 &SimpleFileSystemHandles 2156 2162 ); 2157 LogFlowFuncMarkVar(NumberSimpleFileSystemHandles, "%d");2163 VBoxLogFlowFuncMarkVar(NumberSimpleFileSystemHandles, "%d"); 2158 2164 for (Index = 0; Index < NumberSimpleFileSystemHandles; Index++) { 2159 2165 // … … 2161 2167 // 2162 2168 TempDevicePath = DevicePathFromHandle (SimpleFileSystemHandles[Index]); 2163 TempSize = GetDevicePathSize (TempDevicePath) 2164 DEBUG((DEBUG_INFO, "%a:%d TempDevicePath:%s\n", __FUNCTION__, __LINE__, DevicePathToStr(TempDevicePath))); 2169 TempSize = GetDevicePathSize (TempDevicePath)- sizeof (EFI_DEVICE_PATH_PROTOCOL); // minus the end node 2170 DEBUG((DEBUG_INFO, "%a:%d TempDevicePath:%s\n", __FUNCTION__, __LINE__, DevicePathToStr(TempDevicePath))); /* VBox */ 2165 2171 // 2166 2172 // Check whether the device path of boot option is part of the SimpleFileSystem handle's device path … … 2172 2178 // 2173 2179 Hdr.Union = &HdrData; 2174 LogFlowFuncMark();2180 VBoxLogFlowFuncMark(); 2175 2181 Status = BdsLibGetImageHeader ( 2176 2182 SimpleFileSystemHandles[Index], … … 2179 2185 Hdr 2180 2186 ); 2181 LogFlowFuncMarkRC(Status);2187 VBoxLogFlowFuncMarkRC(Status); 2182 2188 if (!EFI_ERROR (Status) && 2183 2189 EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Hdr.Pe32->FileHeader.Machine) && … … 2201 2207 pFs = pNode0; 2202 2208 pNode0 = NextDevicePathNode (pNode0); 2203 LogFlowFuncMarkVar(DevicePathToStr(pNode0), "%s");2204 LogFlowFuncMarkVar(DevicePathType(pNode0), "%x");2205 LogFlowFuncMarkVar(DevicePathSubType(pNode0), "%x");2209 VBoxLogFlowFuncMarkVar(DevicePathToStr(pNode0), "%s"); 2210 VBoxLogFlowFuncMarkVar(DevicePathType(pNode0), "%x"); 2211 VBoxLogFlowFuncMarkVar(DevicePathSubType(pNode0), "%x"); 2206 2212 } 2207 2213 … … 2210 2216 pTarget = pNode1; 2211 2217 pNode1 = NextDevicePathNode (pNode1); 2212 LogFlowFuncMarkVar(DevicePathToStr(pNode1), "%s");2213 LogFlowFuncMarkVar(DevicePathType(pNode1), "%x");2214 LogFlowFuncMarkVar(DevicePathSubType(pNode1), "%x");2218 VBoxLogFlowFuncMarkVar(DevicePathToStr(pNode1), "%s"); 2219 VBoxLogFlowFuncMarkVar(DevicePathType(pNode1), "%x"); 2220 VBoxLogFlowFuncMarkVar(DevicePathSubType(pNode1), "%x"); 2215 2221 } 2216 2222 if ( pTarget … … 2225 2231 HARDDRIVE_DEVICE_PATH *pFsHd = (HARDDRIVE_DEVICE_PATH *)pFs; 2226 2232 /* @todo: is it enough? */ 2227 LogFlowFuncMarkVar(pTargetHd->PartitionNumber, "%x");2228 LogFlowFuncMarkVar(pTargetHd->PartitionStart, "%lx");2229 LogFlowFuncMarkVar(pTargetHd->PartitionSize, "%lx");2230 LogFlowFuncMarkVar(pFsHd->PartitionNumber, "%x");2231 LogFlowFuncMarkVar(pFsHd->PartitionStart, "%lx");2232 LogFlowFuncMarkVar(pFsHd->PartitionSize, "%lx");2233 VBoxLogFlowFuncMarkVar(pTargetHd->PartitionNumber, "%x"); 2234 VBoxLogFlowFuncMarkVar(pTargetHd->PartitionStart, "%lx"); 2235 VBoxLogFlowFuncMarkVar(pTargetHd->PartitionSize, "%lx"); 2236 VBoxLogFlowFuncMarkVar(pFsHd->PartitionNumber, "%x"); 2237 VBoxLogFlowFuncMarkVar(pFsHd->PartitionStart, "%lx"); 2238 VBoxLogFlowFuncMarkVar(pFsHd->PartitionSize, "%lx"); 2233 2239 if (pTargetHd->PartitionNumber == pFsHd->PartitionNumber) 2234 2240 { … … 2255 2261 gBS->RestoreTPL (OldTpl); 2256 2262 2257 LogFlowFuncMarkVar(ReturnHandle, "%p");2258 LogFlowFuncLeave();2263 VBoxLogFlowFuncMarkVar(ReturnHandle, "%p"); 2264 VBoxLogFlowFuncLeave(); 2259 2265 return ReturnHandle; 2260 2266 } … … 2529 2535 // If yes, that means there is a boot option for network. 2530 2536 // 2531 LogFlowFuncEnter();2537 VBoxLogFlowFuncEnter(); 2532 2538 Status = gBS->LocateDevicePath ( 2533 2539 &gEfiLoadFileProtocolGuid, … … 2535 2541 &Handle 2536 2542 ); 2537 LogFlowFuncMarkRC(Status);2543 VBoxLogFlowFuncMarkRC(Status); 2538 2544 if (EFI_ERROR (Status)) { 2539 2545 // … … 2549 2555 } 2550 2556 2551 LogFlowFuncMarkRC(Status);2557 VBoxLogFlowFuncMarkRC(Status); 2552 2558 if (!EFI_ERROR (Status)) { 2553 2559 if (!IsDevicePathEnd (TempDevicePath)) { … … 2555 2561 // LoadFile protocol is not installed on handle with exactly the same DevPath 2556 2562 // 2557 LogFlowFuncLeave();2563 VBoxLogFlowFuncLeave(); 2558 2564 return FALSE; 2559 2565 } … … 2564 2570 // 2565 2571 if (BdsLibNetworkBootWithMediaPresent(DevPath)) { 2566 LogFlowFuncLeave();2572 VBoxLogFlowFuncLeave(); 2567 2573 return TRUE; 2568 2574 } 2569 2575 } else { 2570 LogFlowFuncLeave();2576 VBoxLogFlowFuncLeave(); 2571 2577 return TRUE; 2572 2578 } … … 2586 2592 ((DevicePathSubType (TempDevicePath) == MSG_USB_CLASS_DP) || 2587 2593 (DevicePathSubType (TempDevicePath) == MSG_USB_WWID_DP))) { 2588 LogFlowFuncLeave();2594 VBoxLogFlowFuncLeave(); 2589 2595 return TRUE; 2590 2596 } … … 2595 2601 if ((DevicePathType (LastDeviceNode) == MEDIA_DEVICE_PATH) && 2596 2602 (DevicePathSubType (LastDeviceNode) == MEDIA_FILEPATH_DP)) { 2597 LogFlowFuncLeave();2603 VBoxLogFlowFuncLeave(); 2598 2604 return TRUE; 2599 2605 } … … 2612 2618 ); 2613 2619 if (Status == EFI_ALREADY_STARTED) { 2614 LogFlowFuncLeave();2620 VBoxLogFlowFuncLeave(); 2615 2621 return TRUE; 2616 2622 } else { … … 2618 2624 FreePool (TempDevicePath); 2619 2625 } 2620 LogFlowFuncLeave();2626 VBoxLogFlowFuncLeave(); 2621 2627 return FALSE; 2622 2628 } … … 2630 2636 TempDevicePath = DevPath; 2631 2637 Status = gBS->LocateDevicePath (&gEfiBlockIoProtocolGuid, &TempDevicePath, &Handle); 2632 LogFlowFuncMarkRC(Status);2638 VBoxLogFlowFuncMarkRC(Status); 2633 2639 if (EFI_ERROR (Status)) { 2634 2640 // … … 2636 2642 // 2637 2643 Status = BdsLibConnectDevicePath (DevPath); 2638 LogFlowFuncMarkRC(Status);2644 VBoxLogFlowFuncMarkRC(Status); 2639 2645 if (!EFI_ERROR (Status)) { 2640 2646 // … … 2643 2649 TempDevicePath = DevPath; 2644 2650 Status = gBS->LocateDevicePath (&gEfiBlockIoProtocolGuid, &TempDevicePath, &Handle); 2645 LogFlowFuncMarkRC(Status); 2646 } 2647 } 2648 2649 2650 LogFlowFuncMarkRC(Status); 2651 VBoxLogFlowFuncMarkRC(Status); 2652 } 2653 } 2654 2655 VBoxLogFlowFuncMarkRC(Status); 2651 2656 if (!EFI_ERROR (Status)) { 2652 2657 Status = gBS->HandleProtocol (Handle, &gEfiBlockIoProtocolGuid, (VOID **)&BlockIo); 2653 LogFlowFuncMarkRC(Status);2658 VBoxLogFlowFuncMarkRC(Status); 2654 2659 if (!EFI_ERROR (Status)) { 2655 2660 if (CheckMedia) { … … 2658 2663 // 2659 2664 if (BdsLibGetBootableHandle (DevPath) != NULL) { 2660 LogFlowFuncLeave();2665 VBoxLogFlowFuncLeave(); 2661 2666 return TRUE; 2662 2667 } 2663 2668 } else { 2664 LogFlowFuncLeave();2669 VBoxLogFlowFuncLeave(); 2665 2670 return TRUE; 2666 2671 } … … 2671 2676 // 2672 2677 Status = gBS->LocateDevicePath (&gEfiSimpleFileSystemProtocolGuid, &TempDevicePath, &Handle); 2673 LogFlowFuncMarkRC(Status);2678 VBoxLogFlowFuncMarkRC(Status); 2674 2679 if (!EFI_ERROR (Status)) { 2675 2680 if (CheckMedia) { … … 2678 2683 // 2679 2684 if (BdsLibGetBootableHandle (DevPath) != NULL) { 2680 LogFlowFuncLeave();2685 VBoxLogFlowFuncLeave(); 2681 2686 return TRUE; 2682 2687 } 2683 2688 } else { 2684 LogFlowFuncLeave();2689 VBoxLogFlowFuncLeave(); 2685 2690 return TRUE; 2686 2691 } … … 2688 2693 } 2689 2694 2690 LogFlowFuncLeave();2691 2695 #ifndef VBOX 2692 2696 return FALSE; 2693 2697 #else 2698 VBoxLogFlowFuncLeave(); 2694 2699 return TRUE; 2695 2700 #endif -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
r48674 r48730 205 205 UINT32 Attributes; 206 206 207 LogFlowFuncEnter();208 LogFlowFuncMarkVar(ConVarName, "%s");209 LogFlowFuncMarkDP(CustomizedConDevicePath);210 LogFlowFuncMarkDP(ExclusiveDevicePath);207 VBoxLogFlowFuncEnter(); 208 VBoxLogFlowFuncMarkVar(ConVarName, "%s"); 209 VBoxLogFlowFuncMarkDP(CustomizedConDevicePath); 210 VBoxLogFlowFuncMarkDP(ExclusiveDevicePath); 211 211 VarConsole = NULL; 212 212 DevicePathSize = 0; … … 217 217 // 218 218 if (CustomizedConDevicePath == ExclusiveDevicePath) { 219 LogFlowFuncLeaveRC(EFI_UNSUPPORTED);219 VBoxLogFlowFuncLeaveRC(EFI_UNSUPPORTED); 220 220 return EFI_UNSUPPORTED; 221 221 } … … 223 223 // Delete the ExclusiveDevicePath from current default console 224 224 // 225 LogFlowFuncMark();225 VBoxLogFlowFuncMark(); 226 226 VarConsole = BdsLibGetVariableAndSize ( 227 227 ConVarName, … … 229 229 &DevicePathSize 230 230 ); 231 LogFlowFuncMark();231 VBoxLogFlowFuncMark(); 232 232 233 233 // … … 240 240 // In the end, NewDevicePath is the final device path. 241 241 // 242 LogFlowFuncMark();242 VBoxLogFlowFuncMark(); 243 243 if (ExclusiveDevicePath != NULL && VarConsole != NULL) { 244 244 NewDevicePath = BdsLibDelPartMatchInstance (VarConsole, ExclusiveDevicePath); … … 247 247 // Try to append customized device path to NewDevicePath. 248 248 // 249 LogFlowFuncMark();249 VBoxLogFlowFuncMark(); 250 250 if (CustomizedConDevicePath != NULL) { 251 LogFlowFuncMark();251 VBoxLogFlowFuncMark(); 252 252 if (!BdsLibMatchDevicePaths (NewDevicePath, CustomizedConDevicePath)) { 253 253 // 254 254 // Check if there is part of CustomizedConDevicePath in NewDevicePath, delete it. 255 255 // 256 LogFlowFuncMark();256 VBoxLogFlowFuncMark(); 257 257 NewDevicePath = BdsLibDelPartMatchInstance (NewDevicePath, CustomizedConDevicePath); 258 258 // … … 261 261 // 262 262 TempNewDevicePath = NewDevicePath; 263 LogFlowFuncMark();263 VBoxLogFlowFuncMark(); 264 264 NewDevicePath = AppendDevicePathInstance (NewDevicePath, CustomizedConDevicePath); 265 LogFlowFuncMark();265 VBoxLogFlowFuncMark(); 266 266 if (TempNewDevicePath != NULL) { 267 267 FreePool(TempNewDevicePath); … … 273 273 // The attribute for ConInDev, ConOutDev and ErrOutDev does not include NV. 274 274 // 275 LogFlowFuncMark();275 VBoxLogFlowFuncMark(); 276 276 if (IsNvNeed(ConVarName)) { 277 277 // 278 278 // ConVarName has NV attribute. 279 279 // 280 LogFlowFuncMark();280 VBoxLogFlowFuncMark(); 281 281 Attributes = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE; 282 282 } else { … … 284 284 // ConVarName does not have NV attribute. 285 285 // 286 LogFlowFuncMark();286 VBoxLogFlowFuncMark(); 287 287 Attributes = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS; 288 288 } … … 291 291 // Finally, Update the variable of the default console by NewDevicePath 292 292 // 293 LogFlowFuncMark();293 VBoxLogFlowFuncMark(); 294 294 DevicePathSize = GetDevicePathSize (NewDevicePath); 295 LogFlowFuncMark();295 VBoxLogFlowFuncMark(); 296 296 Status = gRT->SetVariable ( 297 297 ConVarName, … … 301 301 NewDevicePath 302 302 ); 303 LogFlowFuncMarkRC(Status);303 VBoxLogFlowFuncMarkRC(Status); 304 304 if ((DevicePathSize == 0) && (Status == EFI_NOT_FOUND)) { 305 305 Status = EFI_SUCCESS; … … 320 320 } 321 321 322 LogFlowFuncLeaveRC(Status);322 VBoxLogFlowFuncLeaveRC(Status); 323 323 return Status; 324 324 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c
r48674 r48730 228 228 Status = EFI_SUCCESS; 229 229 ZeroMem (OptionName, sizeof (OptionName)); 230 LogFlowFuncEnter();231 LogFlowFuncMarkVar(VariableName, "%s");232 LogFlowFuncMarkVar(String, "%s");230 VBoxLogFlowFuncEnter(); 231 VBoxLogFlowFuncMarkVar(VariableName, "%s"); 232 VBoxLogFlowFuncMarkVar(String, "%s"); 233 233 234 234 TempOptionSize = 0; … … 252 252 UnicodeSPrint (OptionName, sizeof (OptionName), L"Driver%04x", TempOptionPtr[Index]); 253 253 } 254 LogFlowFuncMarkVar(OptionName, "%s");254 VBoxLogFlowFuncMarkVar(OptionName, "%s"); 255 255 256 256 OptionPtr = BdsLibGetVariableAndSize ( … … 259 259 &OptionSize 260 260 ); 261 LogFlowFuncMarkVar(OptionPtr, "%p");261 VBoxLogFlowFuncMarkVar(OptionPtr, "%p"); 262 262 if (OptionPtr == NULL) { 263 263 continue; … … 287 287 FreePool (OptionPtr); 288 288 FreePool (TempOptionPtr); 289 LogFlowFuncLeaveRC(EFI_SUCCESS);289 VBoxLogFlowFuncLeaveRC(EFI_SUCCESS); 290 290 return EFI_SUCCESS; 291 291 } else { … … 351 351 FreePool (TempOptionPtr); 352 352 } 353 LogFlowFuncLeaveRC(Status);353 VBoxLogFlowFuncLeaveRC(Status); 354 354 return Status; 355 355 } … … 376 376 FreePool (TempOptionPtr); 377 377 } 378 LogFlowFuncLeaveRC(Status);378 VBoxLogFlowFuncLeaveRC(Status); 379 379 return Status; 380 380 } … … 404 404 FreePool (OptionOrderPtr); 405 405 406 LogFlowFuncLeaveRC(Status);406 VBoxLogFlowFuncLeaveRC(Status); 407 407 return Status; 408 408 } … … 520 520 UINTN TempSize; 521 521 522 LogFlowFuncEnter();523 LogFlowFuncMarkVar(Variable, "%s");524 LogFlowFuncMarkVar(VariableSize, "%d");522 VBoxLogFlowFuncEnter(); 523 VBoxLogFlowFuncMarkVar(Variable, "%s"); 524 VBoxLogFlowFuncMarkVar(VariableSize, "%d"); 525 525 // 526 526 // Skip the option attribute … … 551 551 // 552 552 if ((FilePathSize == 0) || (TempSize == 0)) { 553 LogFlowFuncLeave();553 VBoxLogFlowFuncLeave(); 554 554 return FALSE; 555 555 } 556 556 557 557 if (TempSize + FilePathSize + sizeof (UINT16) + sizeof (UINT16) > VariableSize) { 558 LogFlowFuncLeave();558 VBoxLogFlowFuncLeave(); 559 559 return FALSE; 560 560 } … … 564 564 TempSize = GetDevicePathSizeEx (TempPath, FilePathSize); 565 565 if (TempSize == 0) { 566 LogFlowFuncLeave();566 VBoxLogFlowFuncLeave(); 567 567 return FALSE; 568 568 } … … 571 571 } 572 572 573 LogFlowFuncLeave();573 VBoxLogFlowFuncLeave(); 574 574 return TRUE; 575 575 } … … 635 635 // Read the variable. We will never free this data. 636 636 // 637 LogFlowFuncEnter();638 LogFlowFuncMarkVar(VariableName, "%s");637 VBoxLogFlowFuncEnter(); 638 VBoxLogFlowFuncMarkVar(VariableName, "%s"); 639 639 Variable = BdsLibGetVariableAndSize ( 640 640 VariableName, … … 643 643 ); 644 644 if (Variable == NULL) { 645 LogFlowFuncMarkVar(Variable, "%p");646 LogFlowFuncLeave();645 VBoxLogFlowFuncMarkVar(Variable, "%p"); 646 VBoxLogFlowFuncLeave(); 647 647 return NULL; 648 648 } … … 652 652 // 653 653 if (!ValidateOption(Variable, VariableSize)) { 654 LogFlowFuncMarkVar(Variable, "%p");655 LogFlowFuncLeave();654 VBoxLogFlowFuncMarkVar(Variable, "%p"); 655 VBoxLogFlowFuncLeave(); 656 656 return NULL; 657 657 } … … 712 712 LoadOptions = TempPtr; 713 713 if (VariableSize < (UINTN)(TempPtr - Variable)) { 714 LogFlowFuncMarkVar(Variable, "%p");715 LogFlowFuncLeave();714 VBoxLogFlowFuncMarkVar(Variable, "%p"); 715 VBoxLogFlowFuncLeave(); 716 716 return NULL; 717 717 } … … 724 724 Option = AllocateZeroPool (sizeof (BDS_COMMON_OPTION)); 725 725 if (Option == NULL) { 726 LogFlowFuncMarkVar(Variable, "%p");727 LogFlowFuncLeave();726 VBoxLogFlowFuncMarkVar(Variable, "%p"); 727 VBoxLogFlowFuncLeave(); 728 728 return NULL; 729 729 } … … 762 762 InsertTailList (BdsCommonOptionList, &Option->Link); 763 763 FreePool (Variable); 764 LogFlowFuncMarkVar(Option, "%p");765 LogFlowFuncLeave();764 VBoxLogFlowFuncMarkVar(Option, "%p"); 765 VBoxLogFlowFuncLeave(); 766 766 return Option; 767 767 } … … 772 772 FreePool (Option->LoadOptions); 773 773 FreePool (Option); 774 LogFlowFuncLeave();774 VBoxLogFlowFuncLeave(); 775 775 return NULL; 776 776 } … … 888 888 // 889 889 BufferSize = 0; 890 LogFlowFuncEnter();891 LogFlowFuncMarkVar(Name, "%s");890 VBoxLogFlowFuncEnter(); 891 VBoxLogFlowFuncMarkVar(Name, "%s"); 892 892 Status = gRT->GetVariable (Name, VendorGuid, NULL, &BufferSize, Buffer); 893 LogFlowFuncMarkRC(Status);893 VBoxLogFlowFuncMarkRC(Status); 894 894 if (Status == EFI_BUFFER_TOO_SMALL) { 895 895 // … … 904 904 // 905 905 Status = gRT->GetVariable (Name, VendorGuid, NULL, &BufferSize, Buffer); 906 LogFlowFuncMarkRC(Status);906 VBoxLogFlowFuncMarkRC(Status); 907 907 if (EFI_ERROR (Status)) { 908 908 BufferSize = 0; … … 911 911 912 912 *VariableSize = BufferSize; 913 LogFlowFuncLeave();913 VBoxLogFlowFuncLeave(); 914 914 return Buffer; 915 915 } … … 1250 1250 Root = NULL; 1251 1251 ThisFile = NULL; 1252 LogFlowFuncEnter();1253 LogFlowFuncMarkVar(FileName, "%s");1252 VBoxLogFlowFuncEnter(); 1253 VBoxLogFlowFuncMarkVar(FileName, "%s"); 1254 1254 // 1255 1255 // Handle the file system interface to the device … … 1260 1260 (VOID *) &Volume 1261 1261 ); 1262 LogFlowFuncMarkRC(Status);1262 VBoxLogFlowFuncMarkRC(Status); 1263 1263 if (EFI_ERROR (Status)) { 1264 1264 goto Done; … … 1269 1269 &Root 1270 1270 ); 1271 LogFlowFuncMarkRC(Status);1271 VBoxLogFlowFuncMarkRC(Status); 1272 1272 if (EFI_ERROR (Status)) { 1273 1273 Root = NULL; … … 1276 1276 ASSERT (Root != NULL); 1277 1277 Status = Root->Open (Root, &ThisFile, FileName, EFI_FILE_MODE_READ, 0); 1278 LogFlowFuncMarkRC(Status);1278 VBoxLogFlowFuncMarkRC(Status); 1279 1279 if (EFI_ERROR (Status)) { 1280 1280 goto Done; … … 1289 1289 Info = NULL; 1290 1290 Status = gBS->AllocatePool (EfiBootServicesData, BufferSize, (VOID **) &Info); 1291 LogFlowFuncMarkRC(Status);1291 VBoxLogFlowFuncMarkRC(Status); 1292 1292 if (EFI_ERROR (Status)) { 1293 1293 goto Done; … … 1299 1299 Info 1300 1300 ); 1301 LogFlowFuncMarkRC(Status);1301 VBoxLogFlowFuncMarkRC(Status); 1302 1302 if (!EFI_ERROR (Status)) { 1303 1303 break; … … 1318 1318 BufferSize = sizeof (EFI_IMAGE_DOS_HEADER); 1319 1319 Status = ThisFile->Read (ThisFile, &BufferSize, DosHeader); 1320 LogFlowFuncMarkRC(Status);1320 VBoxLogFlowFuncMarkRC(Status); 1321 1321 if ( 1322 1322 #ifdef VBOX … … 1328 1328 || DosHeader->e_magic != EFI_IMAGE_DOS_SIGNATURE)) { 1329 1329 Status = EFI_LOAD_ERROR; 1330 LogFlowFuncMarkRC(Status);1330 VBoxLogFlowFuncMarkRC(Status); 1331 1331 goto Done; 1332 1332 } … … 1340 1340 // 1341 1341 Status = ThisFile->SetPosition (ThisFile, DosHeader->e_lfanew); 1342 LogFlowFuncMarkRC(Status);1342 VBoxLogFlowFuncMarkRC(Status); 1343 1343 if (EFI_ERROR (Status)) { 1344 1344 Status = EFI_LOAD_ERROR; 1345 LogFlowFuncMarkRC(Status);1345 VBoxLogFlowFuncMarkRC(Status); 1346 1346 goto Done; 1347 1347 } … … 1352 1352 BufferSize = sizeof (EFI_IMAGE_OPTIONAL_HEADER_UNION); 1353 1353 Status = ThisFile->Read (ThisFile, &BufferSize, Hdr.Pe32); 1354 LogFlowFuncMarkRC(Status);1354 VBoxLogFlowFuncMarkRC(Status); 1355 1355 if (EFI_ERROR (Status) || 1356 1356 BufferSize < sizeof (EFI_IMAGE_OPTIONAL_HEADER_UNION) || 1357 1357 Hdr.Pe32->Signature != EFI_IMAGE_NT_SIGNATURE) { 1358 1358 Status = EFI_LOAD_ERROR; 1359 LogFlowFuncMarkRC(Status);1359 VBoxLogFlowFuncMarkRC(Status); 1360 1360 goto Done; 1361 1361 } … … 1367 1367 Hdr.Pe32->OptionalHeader.Magic != EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) { 1368 1368 Status = EFI_LOAD_ERROR; 1369 LogFlowFuncMarkRC(Status);1369 VBoxLogFlowFuncMarkRC(Status); 1370 1370 goto Done; 1371 1371 } … … 1381 1381 Root->Close (Root); 1382 1382 } 1383 LogFlowFuncLeaveRC(Status);1383 VBoxLogFlowFuncLeaveRC(Status); 1384 1384 return Status; 1385 1385 } -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/DebugLib.h
r48674 r48730 478 478 # endif 479 479 # if defined(EFI_LOG_ENABLED) 480 # define LogFlowFuncEnter() DEBUG((DEBUG_INFO, "ENTER:%a:%d\n", __FUNCTION__, __LINE__))481 # define LogFlowFuncLeave() DEBUG((DEBUG_INFO, "LEAVE:%a:%d\n", __FUNCTION__, __LINE__))482 # define LogFlowFuncLeaveRC(rc) DEBUG((DEBUG_INFO, "LEAVE:%a:%d rc(%r)\n", __FUNCTION__, __LINE__, (rc)))483 # define LogFlowFuncMark() DEBUG((DEBUG_INFO, "%a:%d\n", __FUNCTION__, __LINE__))484 # define LogFlowFuncMarkRC(rc) DEBUG((DEBUG_INFO, "%a:%d " #rc ":%r \n", __FUNCTION__, __LINE__, (rc)))485 # define LogFlowFuncMarkVar(var, var_printf_glag) DEBUG((DEBUG_INFO, "%a:%d " #var ": " var_printf_glag " \n", __FUNCTION__, __LINE__, (var)))486 # define LogFlowFuncMarkDP(dp) DEBUG((DEBUG_INFO, "%a:%d " #dp ": \n", __FUNCTION__, __LINE__, VBoxDebugDevicePath2Str(dp)))487 # define LogFlowFuncMarkHandleDP(dp) DEBUG((DEBUG_INFO, "%a:%d " #dp ": \n", __FUNCTION__, __LINE__, VBoxDebugHandleDevicePath2Str(dp)))480 # define VBoxLogFlowFuncEnter() DEBUG((DEBUG_INFO, "ENTER:%a:%d\n", __FUNCTION__, __LINE__)) 481 # define VBoxLogFlowFuncLeave() DEBUG((DEBUG_INFO, "LEAVE:%a:%d\n", __FUNCTION__, __LINE__)) 482 # define VBoxLogFlowFuncLeaveRC(rc) DEBUG((DEBUG_INFO, "LEAVE:%a:%d rc(%r)\n", __FUNCTION__, __LINE__, (rc))) 483 # define VBoxLogFlowFuncMark() DEBUG((DEBUG_INFO, "%a:%d\n", __FUNCTION__, __LINE__)) 484 # define VBoxLogFlowFuncMarkRC(rc) DEBUG((DEBUG_INFO, "%a:%d " #rc ":%r \n", __FUNCTION__, __LINE__, (rc))) 485 # define VBoxLogFlowFuncMarkVar(var, var_printf_glag) DEBUG((DEBUG_INFO, "%a:%d " #var ": " var_printf_glag " \n", __FUNCTION__, __LINE__, (var))) 486 # define VBoxLogFlowFuncMarkDP(dp) DEBUG((DEBUG_INFO, "%a:%d " #dp ": \n", __FUNCTION__, __LINE__, VBoxDebugDevicePath2Str(dp))) 487 # define VBoxLogFlowFuncMarkHandleDP(dp) DEBUG((DEBUG_INFO, "%a:%d " #dp ": \n", __FUNCTION__, __LINE__, VBoxDebugHandleDevicePath2Str(dp))) 488 488 # else 489 # define LogFlowFuncEnter() do {} while (0)490 # define LogFlowFuncLeave() do {} while (0)491 # define LogFlowFuncLeaveRC(rc) do {} while (0)492 # define LogFlowFuncMark() do {} while (0)493 # define LogFlowFuncMarkRC(rc) do {} while (0)494 # define LogFlowFuncMarkVar(var, var_printf_flag) do {} while (0)495 # define LogFlowFuncMarkDP(dp) do {} while (0)496 # define LogFlowFuncMarkHandleDP(dp) do {} while (0)489 # define VBoxLogFlowFuncEnter() do {} while (0) 490 # define VBoxLogFlowFuncLeave() do {} while (0) 491 # define VBoxLogFlowFuncLeaveRC(rc) do {} while (0) 492 # define VBoxLogFlowFuncMark() do {} while (0) 493 # define VBoxLogFlowFuncMarkRC(rc) do {} while (0) 494 # define VBoxLogFlowFuncMarkVar(var, var_printf_flag) do {} while (0) 495 # define VBoxLogFlowFuncMarkDP(dp) do {} while (0) 496 # define VBoxLogLogFlowFuncMarkHandleDP(dp) do {} while (0) 497 497 # endif 498 498 #endif -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c
r48674 r48730 971 971 HandleCount = 0; 972 972 HandleBuffer = NULL; 973 LogFlowFuncEnter();973 VBoxLogFlowFuncEnter(); 974 974 975 975 VisitAllPciInstances (ConnectRecursivelyIfPciMassStorage); … … 989 989 &HandleBuffer 990 990 ); 991 LogFlowFuncMarkRC(Status);992 993 LogFlowFuncLeave();991 VBoxLogFlowFuncMarkRC(Status); 992 993 VBoxLogFlowFuncLeave(); 994 994 } 995 995 … … 1171 1171 EFI_BOOT_MODE BootMode; 1172 1172 1173 LogFlowFuncEnter();1173 VBoxLogFlowFuncEnter(); 1174 1174 1175 1175 ConnectRootBridge (); … … 1260 1260 &cFileSystem, 1261 1261 &phFileSystem); 1262 LogFlowFuncMarkRC(rc);1263 LogFlowFuncMarkVar(cFileSystem, "%d");1262 VBoxLogFlowFuncMarkRC(rc); 1263 VBoxLogFlowFuncMarkVar(cFileSystem, "%d"); 1264 1264 if ( rc == EFI_SUCCESS 1265 1265 && cFileSystem > 0) … … 1280 1280 &gEfiSimpleFileSystemProtocolGuid, 1281 1281 (VOID *) &pFSVolume); 1282 LogFlowFuncMarkVar(iFileSystem, "%d");1283 LogFlowFuncMarkRC(rc);1282 VBoxLogFlowFuncMarkVar(iFileSystem, "%d"); 1283 VBoxLogFlowFuncMarkRC(rc); 1284 1284 if (EFI_ERROR(rc)) 1285 1285 continue; 1286 1286 1287 1287 rc = pFSVolume->OpenVolume(pFSVolume, &hFSRoot); 1288 LogFlowFuncMarkRC(rc);1288 VBoxLogFlowFuncMarkRC(rc); 1289 1289 if (EFI_ERROR(rc)) 1290 1290 continue; 1291 1291 1292 1292 rc = hFSRoot->Open(hFSRoot, &hBootEfiFile, L"\\System\\Library\\CoreServices\\boot.efi", EFI_FILE_MODE_READ, 0); 1293 LogFlowFuncMarkRC(rc);1293 VBoxLogFlowFuncMarkRC(rc); 1294 1294 if (EFI_ERROR(rc)) 1295 1295 continue; 1296 1296 /* nice file is found and we have to register it */ 1297 1297 pDevicePath = FileDevicePath(phFileSystem[iFileSystem], L"\\System\\Library\\CoreServices\\boot.efi"); 1298 LogFlowFuncMarkVar(pDevicePath,"%p");1298 VBoxLogFlowFuncMarkVar(pDevicePath,"%p"); 1299 1299 if (!pDevicePath) 1300 1300 continue; 1301 1301 rc = BdsLibRegisterNewOption (BootOptionList, pDevicePath, L"Mac Boot", L"BootOrder"); 1302 LogFlowFuncMarkRC(rc);1302 VBoxLogFlowFuncMarkRC(rc); 1303 1303 } 1304 1304 } … … 1306 1306 else 1307 1307 { 1308 LogFlowFuncMarkVar(BootOption0080->LoadOptionsSize, "%d");1308 VBoxLogFlowFuncMarkVar(BootOption0080->LoadOptionsSize, "%d"); 1309 1309 if (BootOption0080->LoadOptionsSize) 1310 LogFlowFuncMarkVar(BootOption0080->LoadOptions, "%s");1310 VBoxLogFlowFuncMarkVar(BootOption0080->LoadOptions, "%s"); 1311 1311 #if 0 1312 1312 /* Boot0080 option is found */ … … 1352 1352 // 1353 1353 Status = BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder"); 1354 LogFlowFuncMarkRC(Status);1354 VBoxLogFlowFuncMarkRC(Status); 1355 1355 if (EFI_ERROR(Status)) { 1356 1356 // … … 1407 1407 } 1408 1408 1409 LogFlowFuncLeave();1409 VBoxLogFlowFuncLeave(); 1410 1410 return ; 1411 1411 } … … 1700 1700 UINT32 InitializationSize; 1701 1701 1702 LogFlowFuncEnter();1702 VBoxLogFlowFuncEnter(); 1703 1703 FileName = L"PciRomInMemory"; 1704 1704 … … 1841 1841 1842 1842 1843 LogFlowFuncLeaveRC(retStatus);1843 VBoxLogFlowFuncLeaveRC(retStatus); 1844 1844 return retStatus; 1845 1845 } -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.c
r48674 r48730 90 90 { 91 91 EFI_STATUS Status = EFI_INVALID_PARAMETER; 92 LogFlowFuncEnter();92 VBoxLogFlowFuncEnter(); 93 93 if (!ppPciIo) 94 94 { 95 LogFlowFuncLeaveRC(Status);95 VBoxLogFlowFuncLeaveRC(Status); 96 96 return Status; 97 97 } … … 104 104 EFI_OPEN_PROTOCOL_BY_DRIVER 105 105 ); 106 LogFlowFuncLeaveRC(Status);106 VBoxLogFlowFuncLeaveRC(Status); 107 107 return Status; 108 108 } … … 414 414 // Channel number (0 based, either 0 or 1) 415 415 // 416 LogFlowFuncEnter();417 LogFlowFuncMarkVar(Channel, "%d");416 VBoxLogFlowFuncEnter(); 417 VBoxLogFlowFuncMarkVar(Channel, "%d"); 418 418 *MaxDevices = 0; 419 419 *Enabled = FALSE; … … 430 430 UINT64 u8DH = 0; 431 431 ASSERT(pPciIo); 432 LogFlowFuncMarkVar(u8Device, "%d");432 VBoxLogFlowFuncMarkVar(u8Device, "%d"); 433 433 if (u8Device == 0) 434 434 u8DH = 0xa0; … … 437 437 else 438 438 { 439 LogFlowFuncLeaveRC(EFI_INVALID_PARAMETER);439 VBoxLogFlowFuncLeaveRC(EFI_INVALID_PARAMETER); 440 440 return EFI_INVALID_PARAMETER; 441 441 } … … 452 452 return EFI_INVALID_PARAMETER; 453 453 } 454 LogFlowFuncMarkVar(u8DH, "%x");455 LogFlowFuncMarkVar(u64IoBase, "%llx");454 VBoxLogFlowFuncMarkVar(u8DH, "%x"); 455 VBoxLogFlowFuncMarkVar(u64IoBase, "%llx"); 456 456 pPciIo->Io.Write(pPciIo, EfiPciIoWidthUint8, EFI_PCI_IO_PASS_THROUGH_BAR, u64IoBase + 6, 1, (void *)&u8DH); 457 457 … … 473 473 pPciIo->Io.Read(pPciIo, EfiPciIoWidthUint8, EFI_PCI_IO_PASS_THROUGH_BAR, u64IoBase + 3, 1, (void *)&u8SN); 474 474 475 LogFlowFuncMarkVar(u8CS, "%x");476 LogFlowFuncMarkVar(u8SN, "%x");475 VBoxLogFlowFuncMarkVar(u8CS, "%x"); 476 VBoxLogFlowFuncMarkVar(u8SN, "%x"); 477 477 478 478 fEnabled = (u8CS == 0xaa && u8SN == 0x55); … … 488 488 *MaxDevices = ICH_IDE_MAX_DEVICES; 489 489 #endif /* !VBOX */ 490 LogFlowFuncMarkVar(*MaxDevices, "%d");491 LogFlowFuncMarkVar(*Enabled, "%d");492 LogFlowFuncLeaveRC(EFI_SUCCESS);490 VBoxLogFlowFuncMarkVar(*MaxDevices, "%d"); 491 VBoxLogFlowFuncMarkVar(*Enabled, "%d"); 492 VBoxLogFlowFuncLeaveRC(EFI_SUCCESS); 493 493 return EFI_SUCCESS; 494 494 } -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/PartitionDxe/Apple.c
r48674 r48730 106 106 UINT32 BlkPerSec; 107 107 108 LogFlowFuncMarkDP(DevicePath);108 VBoxLogFlowFuncMarkDP(DevicePath); 109 109 Found = EFI_NOT_FOUND; 110 110 Media = BlockIo->Media; -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/PartitionDxe/ElTorito.c
r48674 r48730 86 86 UINT32 VolSpaceSize; 87 87 88 LogFlowFuncMarkDP(DevicePath);88 VBoxLogFlowFuncMarkDP(DevicePath); 89 89 Found = EFI_NOT_FOUND; 90 90 Media = BlockIo->Media; -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/PartitionDxe/Gpt.c
r48674 r48730 221 221 UINT32 MediaId; 222 222 223 LogFlowFuncMarkDP(DevicePath);223 VBoxLogFlowFuncMarkDP(DevicePath); 224 224 ProtectiveMbr = NULL; 225 225 PrimaryHeader = NULL; -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/PartitionDxe/Mbr.c
r48674 r48730 170 170 LastBlock = BlockIo->Media->LastBlock; 171 171 172 LogFlowFuncMarkDP(DevicePath);172 VBoxLogFlowFuncMarkDP(DevicePath); 173 173 Mbr = AllocatePool (BlockSize); 174 174 if (Mbr == NULL) { -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/PartitionDxe/Partition.c
r48674 r48730 103 103 EFI_DISK_IO_PROTOCOL *DiskIo; 104 104 EFI_DEV_PATH *Node; 105 LogFlowFuncEnter();105 VBoxLogFlowFuncEnter(); 106 106 107 107 // … … 113 113 // if yes, go on checking other conditions 114 114 // 115 LogFlowFuncMarkDP(RemainingDevicePath);115 VBoxLogFlowFuncMarkDP(RemainingDevicePath); 116 116 if (!IsDevicePathEnd (RemainingDevicePath)) { 117 117 // … … 125 125 || Node->DevPath.Type != MESSAGING_DEVICE_PATH 126 126 || Node->DevPath.SubType != MSG_SATA_DP) { 127 LogFlowFuncLeaveRC(EFI_UNSUPPORTED);127 VBoxLogFlowFuncLeaveRC(EFI_UNSUPPORTED); 128 128 return EFI_UNSUPPORTED; 129 129 } … … 143 143 ); 144 144 if (Status == EFI_ALREADY_STARTED) { 145 LogFlowFuncLeaveRC(EFI_SUCCESS);145 VBoxLogFlowFuncLeaveRC(EFI_SUCCESS); 146 146 return EFI_SUCCESS; 147 147 } 148 148 if (EFI_ERROR (Status)) { 149 LogFlowFuncLeaveRC(Status);149 VBoxLogFlowFuncLeaveRC(Status); 150 150 return Status; 151 151 } … … 171 171 EFI_OPEN_PROTOCOL_BY_DRIVER 172 172 ); 173 LogFlowFuncMarkDP(ParentDevicePath);173 VBoxLogFlowFuncMarkDP(ParentDevicePath); 174 174 if (Status == EFI_ALREADY_STARTED) { 175 LogFlowFuncLeaveRC(EFI_SUCCESS);175 VBoxLogFlowFuncLeaveRC(EFI_SUCCESS); 176 176 return EFI_SUCCESS; 177 177 } 178 178 179 179 if (EFI_ERROR (Status)) { 180 LogFlowFuncLeaveRC(Status);180 VBoxLogFlowFuncLeaveRC(Status); 181 181 return Status; 182 182 } … … 204 204 ); 205 205 if (EFI_ERROR (Status)) { 206 LogFlowFuncLeaveRC(Status);206 VBoxLogFlowFuncLeaveRC(Status); 207 207 return Status; 208 208 } 209 209 210 LogFlowFuncLeaveRC(EFI_SUCCESS);210 VBoxLogFlowFuncLeaveRC(EFI_SUCCESS); 211 211 return EFI_SUCCESS; 212 212 } … … 246 246 int idxRoutine = 0; 247 247 248 LogFlowFuncEnter();248 VBoxLogFlowFuncEnter(); 249 249 BlockIo2 = NULL; 250 250 OldTpl = gBS->RaiseTPL (TPL_CALLBACK); … … 276 276 ); 277 277 if (EFI_ERROR (Status)) { 278 LogFlowFuncMarkRC(Status);278 VBoxLogFlowFuncMarkRC(Status); 279 279 goto Exit; 280 280 } … … 301 301 ); 302 302 if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) { 303 LogFlowFuncMarkRC(Status);303 VBoxLogFlowFuncMarkRC(Status); 304 304 goto Exit; 305 305 } … … 320 320 ControllerHandle 321 321 ); 322 LogFlowFuncMarkRC(Status);322 VBoxLogFlowFuncMarkRC(Status); 323 323 goto Exit; 324 324 } … … 348 348 ParentDevicePath 349 349 ); 350 LogFlowFuncMarkRC(Status);350 VBoxLogFlowFuncMarkRC(Status); 351 351 if (!EFI_ERROR (Status) || Status == EFI_MEDIA_CHANGED || Status == EFI_NO_MEDIA) { 352 LogFlowFuncMarkVar(idxRoutine, "%d");352 VBoxLogFlowFuncMarkVar(idxRoutine, "%d"); 353 353 break; 354 354 } … … 399 399 Exit: 400 400 gBS->RestoreTPL (OldTpl); 401 LogFlowFuncLeaveRC(Status);401 VBoxLogFlowFuncLeaveRC(Status); 402 402 return Status; 403 403 } -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c
r48674 r48730 232 232 233 233 // first, open DiskIO 234 LogFlowFuncEnter();235 LogFlowFuncMarkDP(RemainingDevicePath);234 VBoxLogFlowFuncEnter(); 235 VBoxLogFlowFuncMarkDP(RemainingDevicePath); 236 236 237 237 Status = BS->OpenProtocol(ControllerHandle, … … 243 243 if (EFI_ERROR(Status)) 244 244 { 245 LogFlowFuncLeaveRC(Status);245 VBoxLogFlowFuncLeaveRC(Status); 246 246 return Status; 247 247 } … … 260 260 ControllerHandle, 261 261 EFI_OPEN_PROTOCOL_TEST_PROTOCOL); 262 LogFlowFuncLeaveRC(Status);262 VBoxLogFlowFuncLeaveRC(Status); 263 263 return Status; 264 264 } … … 270 270 { 271 271 EFI_STATUS Status; 272 LogFlowFuncEnter();272 VBoxLogFlowFuncEnter(); 273 273 pVolume->Signature = FSW_VOLUME_DATA_SIGNATURE; 274 274 pVolume->Handle = ControllerHandle; … … 282 282 pVolume); 283 283 284 LogFlowFuncMarkVar(Status, "%r");284 VBoxLogFlowFuncMarkVar(Status, "%r"); 285 285 if (!EFI_ERROR(Status)) { 286 286 // register the SimpleFileSystem protocol … … 293 293 Print(L"Fsw ERROR: InstallMultipleProtocolInterfaces returned %x\n", Status); 294 294 } 295 LogFlowFuncLeaveRC(Status);295 VBoxLogFlowFuncLeaveRC(Status); 296 296 return Status; 297 297 } … … 319 319 FSW_VOLUME_DATA *Volume; 320 320 321 LogFlowFuncEnter();321 VBoxLogFlowFuncEnter(); 322 322 // open consumed protocols 323 323 Status = BS->OpenProtocol(ControllerHandle, … … 328 328 EFI_OPEN_PROTOCOL_GET_PROTOCOL); // NOTE: we only want to look at the MediaId 329 329 if (EFI_ERROR(Status)) { 330 LogFlowFuncLeaveRC(Status);330 VBoxLogFlowFuncLeaveRC(Status); 331 331 return Status; 332 332 } … … 339 339 EFI_OPEN_PROTOCOL_BY_DRIVER); 340 340 if (EFI_ERROR(Status)) { 341 LogFlowFuncLeaveRC(Status);341 VBoxLogFlowFuncLeaveRC(Status); 342 342 return Status; 343 343 } … … 364 364 } 365 365 366 LogFlowFuncLeaveRC(Status);366 VBoxLogFlowFuncLeaveRC(Status); 367 367 return Status; 368 368 } -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVariable/InitVariable.c
r48727 r48730 95 95 { 96 96 UINT32 u32Rc; 97 LogFlowFuncEnter();98 LogFlowFuncMarkVar(u32Operation, "%x");97 VBoxLogFlowFuncEnter(); 98 VBoxLogFlowFuncMarkVar(u32Operation, "%x"); 99 99 VBoxWriteNVRAMU32Param(EFI_VM_VARIABLE_OP_START, u32Operation); 100 100 … … 106 106 /* @todo: sleep here. bird: won't ever happen, so don't bother. */ 107 107 } 108 LogFlowFuncMarkVar(u32Rc, "%x");109 LogFlowFuncLeave();108 VBoxLogFlowFuncMarkVar(u32Rc, "%x"); 109 VBoxLogFlowFuncLeave(); 110 110 return u32Rc; 111 111 } … … 152 152 UINT32 u32Rc; 153 153 154 LogFlowFuncEnter();154 VBoxLogFlowFuncEnter(); 155 155 156 156 /* … … 168 168 ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE_LENGTH); 169 169 VarLen = ASMInU32(EFI_PORT_VARIABLE_OP); 170 LogFlowFuncMarkVar(*DataSize, "%d");171 LogFlowFuncMarkVar(VarLen, "%d");170 VBoxLogFlowFuncMarkVar(*DataSize, "%d"); 171 VBoxLogFlowFuncMarkVar(VarLen, "%d"); 172 172 if ( VarLen <= *DataSize 173 173 && Data) … … 184 184 ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_ATTRIBUTE); 185 185 *Attributes = ASMInU32(EFI_PORT_VARIABLE_OP); 186 LogFlowFuncMarkVar(Attributes, "%x");186 VBoxLogFlowFuncMarkVar(Attributes, "%x"); 187 187 } 188 188 … … 200 200 } 201 201 202 LogFlowFuncLeaveRC(rc);202 VBoxLogFlowFuncLeaveRC(rc); 203 203 return rc; 204 204 #endif … … 237 237 uint32_t u32Rc; 238 238 EFI_STATUS rc; 239 LogFlowFuncEnter();239 VBoxLogFlowFuncEnter(); 240 240 241 241 /* … … 244 244 if (!VariableNameSize || !VariableName || !VendorGuid) 245 245 { 246 LogFlowFuncLeaveRC(EFI_INVALID_PARAMETER);246 VBoxLogFlowFuncLeaveRC(EFI_INVALID_PARAMETER); 247 247 return EFI_INVALID_PARAMETER; 248 248 } … … 297 297 rc = EFI_NOT_FOUND; /* whatever */ 298 298 299 LogFlowFuncLeaveRC(rc);299 VBoxLogFlowFuncLeaveRC(rc); 300 300 return rc; 301 301 #endif … … 343 343 #else 344 344 UINT32 u32Rc; 345 LogFlowFuncEnter();346 LogFlowFuncMarkVar(VendorGuid, "%g");347 LogFlowFuncMarkVar(VariableName, "%s");348 LogFlowFuncMarkVar(DataSize, "%d");345 VBoxLogFlowFuncEnter(); 346 VBoxLogFlowFuncMarkVar(VendorGuid, "%g"); 347 VBoxLogFlowFuncMarkVar(VariableName, "%s"); 348 VBoxLogFlowFuncMarkVar(DataSize, "%d"); 349 349 /* set guid */ 350 350 VBoxWriteNVRAMGuidParam(VendorGuid); … … 361 361 u32Rc = VBoxWriteNVRAMDoOp(EFI_VARIABLE_OP_ADD); 362 362 /* process errors */ 363 LogFlowFuncLeave();363 VBoxLogFlowFuncLeave(); 364 364 switch (u32Rc) 365 365 { … … 532 532 &size, 533 533 (void *)szTestVariable); 534 LogFlowFuncMarkVar(szTestVariable, "%a");534 VBoxLogFlowFuncMarkVar(szTestVariable, "%a"); 535 535 536 536 ASSERT(CompareMem(szTestVariable, pszVariable0, size) == 0); … … 551 551 &size, 552 552 (void *)szTestVariable); 553 LogFlowFuncMarkVar((CHAR16 *)szTestVariable, "%s");553 VBoxLogFlowFuncMarkVar((CHAR16 *)szTestVariable, "%s"); 554 554 ASSERT(CompareMem(szTestVariable, pszVariable1, size) == 0); 555 555 }
Note:
See TracChangeset
for help on using the changeset viewer.