Changeset 80721 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/DxeReportStatusCodeLib
- Timestamp:
- Sep 11, 2019 8:46:37 AM (5 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-129237 /vendor/edk2/current 103735-103757,103769-103776,129194-133213
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
r58459 r80721 4 4 # Retrieve status code and report status code in DXE phase. 5 5 # 6 # Copyright (c) 2006 - 201 4, Intel Corporation. All rights reserved.<BR>6 # Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> 7 7 # 8 # This program and the accompanying materials 9 # are licensed and made available under the terms and conditions of the BSD License 10 # which accompanies this distribution. The full text of the license may be found at 11 # http://opensource.org/licenses/bsd-license.php 12 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 8 # SPDX-License-Identifier: BSD-2-Clause-Patent 14 9 # 15 10 # … … 23 18 MODULE_TYPE = DXE_DRIVER 24 19 VERSION_STRING = 1.0 25 LIBRARY_CLASS = ReportStatusCodeLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_S AL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER SMM_CORE20 LIBRARY_CLASS = ReportStatusCodeLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER SMM_CORE 26 21 27 22 # 28 23 # The following information is for reference only and not required by the build tools. 29 24 # 30 # VALID_ARCHITECTURES = IA32 X64 IPFEBC25 # VALID_ARCHITECTURES = IA32 X64 EBC 31 26 # 32 27 -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.uni
r77662 r80721 6 6 // Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 7 7 // 8 // This program and the accompanying materials 9 // are licensed and made available under the terms and conditions of the BSD License 10 // which accompanies this distribution. The full text of the license may be found at 11 // http://opensource.org/licenses/bsd-license.php 12 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 8 // SPDX-License-Identifier: BSD-2-Clause-Patent 14 9 // 15 10 // **/ -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c
r58466 r80721 2 2 Report Status Code Library for DXE Phase. 3 3 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> 5 SPDX-License-Identifier: BSD-2-Clause-Patent 12 6 13 7 **/ … … 497 491 ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0))); 498 492 499 if (gBS == NULL || gBS->AllocatePool == NULL || gBS->FreePool == NULL) { 500 return EFI_UNSUPPORTED; 501 } 502 503 // 504 // Retrieve the current TPL 505 // 506 Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL); 507 gBS->RestoreTPL (Tpl); 508 509 StatusCodeData = NULL; 510 if (Tpl <= TPL_NOTIFY) { 511 // 512 // Allocate space for the Status Code Header and its buffer 513 // 514 gBS->AllocatePool (EfiBootServicesData, sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize, (VOID **)&StatusCodeData); 515 } 516 517 if (StatusCodeData == NULL) { 518 // 519 // If a buffer could not be allocated, then see if the local variable Buffer can be used 520 // 521 if (ExtendedDataSize > (MAX_EXTENDED_DATA_SIZE - sizeof (EFI_STATUS_CODE_DATA))) { 522 // 523 // The local variable Buffer not large enough to hold the extended data associated 524 // with the status code being reported. 525 // 526 DEBUG ((EFI_D_ERROR, "Status code extended data is too large to be reported!\n")); 493 if (ExtendedDataSize <= (MAX_EXTENDED_DATA_SIZE - sizeof (EFI_STATUS_CODE_DATA))) { 494 // 495 // Use Buffer instead of allocating if possible. 496 // 497 StatusCodeData = (EFI_STATUS_CODE_DATA *)Buffer; 498 } else { 499 if (gBS == NULL || gBS->AllocatePool == NULL || gBS->FreePool == NULL) { 500 return EFI_UNSUPPORTED; 501 } 502 503 // 504 // Retrieve the current TPL 505 // 506 Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL); 507 gBS->RestoreTPL (Tpl); 508 509 if (Tpl > TPL_NOTIFY) { 527 510 return EFI_OUT_OF_RESOURCES; 528 511 } 529 StatusCodeData = (EFI_STATUS_CODE_DATA *)Buffer; 512 513 // 514 // Allocate space for the Status Code Header and its buffer 515 // 516 StatusCodeData = NULL; 517 gBS->AllocatePool (EfiBootServicesData, sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize, (VOID **)&StatusCodeData); 518 if (StatusCodeData == NULL) { 519 return EFI_OUT_OF_RESOURCES; 520 } 530 521 } 531 522
Note:
See TracChangeset
for help on using the changeset viewer.