[PATCH v2 12/19] Vlv2TbltDevicePkg/FvbRuntimeDxe: Remove unused variables
Gary Lin
Fix the following errors from gcc:
Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c: In function ‘FvbWriteBlock’: Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c:368:44: error: variable ‘FwhInstance’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c: In function ‘FvbEraseBlock’: Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c:448:44: error: variable ‘FwhInstance’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c: In function ‘FvbInitialize’: Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c:1028:41: error: variable ‘FvHeaderValid’ set but not used [-Werror=unused-but-set-variable] Cc: David Wei <david.wei@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@...> --- Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c index 5c3d6dc..1cb5e9b 100644 --- a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c +++ b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c @@ -356,12 +356,9 @@ FvbWriteBlock ( EFI_FVB_ATTRIBUTES_2 Attributes; UINTN LbaAddress; UINTN LbaLength; - EFI_FW_VOL_INSTANCE *FwhInstance; EFI_STATUS Status; EFI_STATUS Status1; - FwhInstance = GetFvbInstance (Instance); - if ( (NumBytes == NULL) || (Buffer == NULL)) { return (EFI_INVALID_PARAMETER); } @@ -436,16 +433,10 @@ FvbEraseBlock ( { EFI_FVB_ATTRIBUTES_2 Attributes; UINTN LbaAddress; - EFI_FW_VOL_INSTANCE *FwhInstance; UINTN LbaLength; EFI_STATUS Status; // - // Find the right instance of the FVB private data. - // - FwhInstance = GetFvbInstance (Instance); - - // // Check if the FV is write enabled. // Attributes = FvbGetVolumeAttributes (Instance); @@ -1016,7 +1007,6 @@ FvbInitialize ( UINTN TmpHeaderLength; UINTN Idx; UINT32 MaxLbaSize; - BOOLEAN FvHeaderValid; EFI_BOOT_MODE BootMode; UINT32 PlatformFvBaseAddress[3]; UINT32 PlatformFvBaseAddressCount; @@ -1072,7 +1062,6 @@ FvbInitialize ( FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) BaseAddress; if (!IsFvHeaderValid (BaseAddress, FwVolHeader)) { - FvHeaderValid = FALSE; // // If not valid, get FvbInfo from the information carried in // FVB driver. -- 2.9.2 |
|
[PATCH v2 13/19] Vlv2TbltDevicePkg/PlatformSetupDxe: Remove the unused variables
Gary Lin
Fix the following errors from gcc:
Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c: In function ‘PrepareSetupInformation’: Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:540:31: error: variable ‘EeState’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:532:31: error: variable ‘SrcDataSize’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c: In function ‘UpdateAdditionalInformation’: Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:818:35: error: variable ‘Size’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:817:36: error: variable ‘SystemManufacturer’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c: In function ‘JudgeHandleIsPCIDevice’: Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:1094:22: error: variable ‘DevicePath’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c: In function ‘GetChipsetSataPortSpeed’: Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:1470:31: error: variable ‘DwordReg’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:1469:31: error: variable ‘Status’ set but not used [-Werror=unused-but-set-variable] Cc: David Wei <david.wei@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@...> --- .../PlatformSetupDxe/SetupInfoRecords.c | 41 +++++++--------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c index c7f85b9..8979b41 100644 --- a/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c @@ -521,7 +521,6 @@ PrepareSetupInformation ( EFI_DATA_HUB_PROTOCOL *DataHub; EFI_DATA_RECORD_HEADER *Record; UINT8 *SrcData; - UINT32 SrcDataSize; EFI_SUBCLASS_TYPE1_HEADER *DataHeader; CHAR16 *NewString; CHAR16 *NewString2; @@ -529,7 +528,6 @@ PrepareSetupInformation ( STRING_REF TokenToUpdate; EFI_PROCESSOR_VERSION_DATA *ProcessorVersion; UINTN Index; - UINT16 EeState; UINTN DataOutput; EFI_PROCESSOR_MICROCODE_REVISION_DATA *CpuUcodeRevisionData; @@ -548,11 +546,6 @@ PrepareSetupInformation ( SetMem(ReleaseTime, sizeof(ReleaseTime), 0); // - // Initialize EE state for not to show EE related setup options - // - EeState = 0; - - // // Get the Data Hub Protocol. Assume only one instance // Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (void **)&DataHub); @@ -570,7 +563,6 @@ PrepareSetupInformation ( if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) { DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); SrcData = (UINT8 *)(DataHeader + 1); - SrcDataSize = Record->RecordSize - Record->HeaderSize - sizeof (EFI_SUBCLASS_TYPE1_HEADER); // // Processor @@ -806,8 +798,6 @@ UpdateAdditionalInformation ( EFI_DATA_HUB_PROTOCOL *DataHub; EFI_DATA_RECORD_HEADER *Record; EFI_SUBCLASS_TYPE1_HEADER *DataHeader; - EFI_MISC_SYSTEM_MANUFACTURER *SystemManufacturer; - UINTN Size; EFI_SMBIOS_PROTOCOL *Smbios; EFI_SMBIOS_HANDLE SmbiosHandle; EFI_SMBIOS_TABLE_HEADER *SmbiosRecord; @@ -817,6 +807,9 @@ UpdateAdditionalInformation ( CHAR16 *IfwiVersion = NULL; UINT16 SearchIndex; EFI_STRING_ID TokenToUpdate; +#if defined( RVP_SUPPORT ) && RVP_SUPPORT + EFI_MISC_SYSTEM_MANUFACTURER *SystemManufacturer; +#endif Status = gBS->LocateProtocol ( &gEfiDataHubProtocolGuid, @@ -826,8 +819,6 @@ UpdateAdditionalInformation ( ASSERT_EFI_ERROR(Status); - Size = 3; - MonotonicCount = 0; Record = NULL; do { @@ -842,12 +833,12 @@ UpdateAdditionalInformation ( if (CompareGuid(&Record->DataRecordGuid, &gEfiMiscSubClassGuid) && (DataHeader->RecordType == EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER)) { +#if defined( RVP_SUPPORT ) && RVP_SUPPORT // // System Information // SystemManufacturer = (EFI_MISC_SYSTEM_MANUFACTURER *)(DataHeader + 1); -#if defined( RVP_SUPPORT ) && RVP_SUPPORT // // UUID (System Information) // @@ -1083,7 +1074,6 @@ JudgeHandleIsPCIDevice( { EFI_STATUS Status; EFI_DEVICE_PATH *DPath; - EFI_DEVICE_PATH *DevicePath; Status = gBS->HandleProtocol ( Handle, @@ -1092,7 +1082,6 @@ JudgeHandleIsPCIDevice( ); if(!EFI_ERROR(Status)) { - DevicePath = DPath; while(!IsDevicePathEnd(DPath)) { if((DPath->Type == HARDWARE_DEVICE_PATH) && (DPath->SubType == HW_PCI_DP)) @@ -1458,9 +1447,6 @@ GetChipsetSataPortSpeed ( UINT32 IdeAhciBar; EFI_PHYSICAL_ADDRESS MemBaseAddress = 0; UINT8 FunNum; - EFI_STATUS Status; - UINT32 DwordReg; - DeviceSpeed = 0x01; // generation 1 @@ -1470,15 +1456,15 @@ GetChipsetSataPortSpeed ( // FunNum = PCI_FUNCTION_NUMBER_PCH_SATA; MemBaseAddress = 0x0ffffffff; - Status = gDS->AllocateMemorySpace ( - EfiGcdAllocateMaxAddressSearchBottomUp, - EfiGcdMemoryTypeMemoryMappedIo, - N_PCH_SATA_ABAR_ALIGNMENT, // 2^11: 2K Alignment - V_PCH_SATA_ABAR_LENGTH, // 2K Length - &MemBaseAddress, - mImageHandle, - NULL - ); + gDS->AllocateMemorySpace ( + EfiGcdAllocateMaxAddressSearchBottomUp, + EfiGcdMemoryTypeMemoryMappedIo, + N_PCH_SATA_ABAR_ALIGNMENT, // 2^11: 2K Alignment + V_PCH_SATA_ABAR_LENGTH, // 2K Length + &MemBaseAddress, + mImageHandle, + NULL + ); IdeAhciBar = MmioRead32 ( MmPciAddress ( 0, @@ -1508,7 +1494,6 @@ GetChipsetSataPortSpeed ( // Program the "Ports Implemented Register" // MmioAndThenOr32 (IdeAhciBar + R_PCH_SATA_AHCI_PI, (UINT32)~(B_PCH_SATA_PORT0_IMPLEMENTED + B_PCH_SATA_PORT1_IMPLEMENTED), (UINT32)(B_PCH_SATA_PORT0_IMPLEMENTED + B_PCH_SATA_PORT1_IMPLEMENTED)); - DwordReg = MmioRead32 (IdeAhciBar + R_PCH_SATA_AHCI_PI); } switch (PortNum) -- 2.9.2 |
|
[PATCH v2 14/19] Vlv2TbltDevicePkg/VlvPlatformInitDxe: Remove unused variables
Gary Lin
Fix the following errors from gcc:
Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c: In function ‘GetIntegratedIntelVbtPtr’: Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c:145:33: error: variable ‘VbtSize’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c: In function ‘JudgeHandleIsPCIDevice’: Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c:418:22: error: variable ‘DevicePath’ set but not used [-Werror=unused-but-set-variable] Cc: David Wei <david.wei@...> Cc: "Wu, Hao A" <hao.a.wu@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@...> Reviewed-by: David Wei <david.wei@...> --- Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c b/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c index 2200e6c..f8dc3f1 100644 --- a/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c +++ b/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c @@ -133,7 +133,6 @@ GetIntegratedIntelVbtPtr ( { EFI_STATUS Status; EFI_PHYSICAL_ADDRESS VbtAddress = 0; - UINT32 VbtSize = 0; UINTN FvProtocolCount; EFI_HANDLE *FvHandles; EFI_FIRMWARE_VOLUME_PROTOCOL *Fv; @@ -174,7 +173,6 @@ GetIntegratedIntelVbtPtr ( if (!EFI_ERROR (Status)) { VbtAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)Buffer; - VbtSize = (UINT32)VbtBufferSize; Status = EFI_SUCCESS; break; } @@ -406,7 +404,6 @@ JudgeHandleIsPCIDevice( { EFI_STATUS Status; EFI_DEVICE_PATH *DPath; - EFI_DEVICE_PATH *DevicePath; Status = gBS->HandleProtocol ( Handle, @@ -414,7 +411,6 @@ JudgeHandleIsPCIDevice( (VOID **) &DPath ); if(!EFI_ERROR(Status)) { - DevicePath = DPath; while(!IsDevicePathEnd(DPath)) { if((DPath->Type == HARDWARE_DEVICE_PATH) && (DPath->SubType == HW_PCI_DP)) { PCI_DEVICE_PATH *PCIPath; -- 2.9.2 |
|
[PATCH v2 15/19] Vlv2TbltDevicePkg/PlatformDxe: Remove the unused variables
Gary Lin
Fix the following errors from gcc:
Vlv2TbltDevicePkg/PlatformDxe/Platform.c: In function ‘InitPciDevPME’: Vlv2TbltDevicePkg/PlatformDxe/Platform.c:516:26: error: variable ‘Status’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformDxe/Platform.c: In function ‘InitThermalZone’: Vlv2TbltDevicePkg/PlatformDxe/Platform.c:575:26: error: variable ‘Status’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c: In function ‘InitializeSubsystemIds’: Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c:111:10: error: variable ‘SubsystemAudioVidDid’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c: In function ‘InitBadBars’: Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c:115:40: error: variable ‘PciIoDevice’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c:114:39: error: variable ‘Status’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c: In function ‘ProgramPciLatency’: Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c:320:39: error: variable ‘Status’ set but not used [-Werror=unused-but-set-variable] Cc: David Wei <david.wei@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@...> Reviewed-by: David Wei <david.wei@...> --- Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c | 2 - Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c | 214 ++++++++++++++-------------- Vlv2TbltDevicePkg/PlatformDxe/Platform.c | 40 +++--- 3 files changed, 123 insertions(+), 133 deletions(-) diff --git a/Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c b/Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c index 06d325c..4569ce5 100644 --- a/Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c +++ b/Vlv2TbltDevicePkg/PlatformDxe/IchRegTable.c @@ -99,10 +99,8 @@ InitializeSubsystemIds ( EFI_REG_TABLE *RegTablePtr; UINT32 SubsystemVidDid; - UINT32 SubsystemAudioVidDid; SubsystemVidDid = mPlatformInfo.SsidSvid; - SubsystemAudioVidDid = mPlatformInfo.SsidSvid; RegTablePtr = mSubsystemIdRegs; diff --git a/Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c b/Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c index 16aaa18..8c2bfff 100644 --- a/Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c +++ b/Vlv2TbltDevicePkg/PlatformDxe/PciDevice.c @@ -102,8 +102,6 @@ InitBadBars( ) { - EFI_STATUS Status; - PCI_IO_DEVICE *PciIoDevice; UINT64 BaseAddress = 0; UINT64 TempBaseAddress = 0; UINT8 RevId = 0; @@ -112,8 +110,6 @@ InitBadBars( UINT64 MemSize; UINTN MemSizeBits; - - PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (PciIo); switch ( VendorId) { case ATI_VENDOR_ID: // @@ -124,31 +120,31 @@ InitBadBars( // // Get original BAR address // - Status = PciIo->Pci.Read ( - PciIo, - EfiPciIoWidthUint32, - Bar, - 1, - (VOID *) &BaseAddress - ); + PciIo->Pci.Read ( + PciIo, + EfiPciIoWidthUint32, + Bar, + 1, + (VOID *) &BaseAddress + ); // // Find BAR size // TempBaseAddress = 0xffffffff; - Status = PciIo->Pci.Write ( - PciIo, - EfiPciIoWidthUint32, - Bar, - 1, - (VOID *) &TempBaseAddress - ); - Status = PciIo->Pci.Read ( - PciIo, - EfiPciIoWidthUint32, - Bar, - 1, - (VOID *) &TempBaseAddress - ); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint32, + Bar, + 1, + (VOID *) &TempBaseAddress + ); + PciIo->Pci.Read ( + PciIo, + EfiPciIoWidthUint32, + Bar, + 1, + (VOID *) &TempBaseAddress + ); TempBaseAddress &= 0xfffffffe; MemSize = 1; while ((TempBaseAddress & 0x01) == 0) { @@ -159,32 +155,32 @@ InitBadBars( // // Free up allocated memory memory and re-allocate with increased size. // - Status = gDS->FreeMemorySpace ( - BaseAddress, - MemSize - ); + gDS->FreeMemorySpace ( + BaseAddress, + MemSize + ); // // Force new alignment // MemSize = 0x8000000; MemSizeBits = 28; - Status = gDS->AllocateMemorySpace ( - EfiGcdAllocateAnySearchBottomUp, - EfiGcdMemoryTypeMemoryMappedIo, - MemSizeBits, // Alignment - MemSize, - &BaseAddress, - mImageHandle, - NULL - ); - Status = PciIo->Pci.Write ( - PciIo, - EfiPciIoWidthUint32, - Bar, - 1, - (VOID *) &BaseAddress - ); + gDS->AllocateMemorySpace ( + EfiGcdAllocateAnySearchBottomUp, + EfiGcdMemoryTypeMemoryMappedIo, + MemSizeBits, // Alignment + MemSize, + &BaseAddress, + mImageHandle, + NULL + ); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint32, + Bar, + 1, + (VOID *) &BaseAddress + ); break; case NCR_VENDOR_ID: @@ -195,22 +191,22 @@ InitBadBars( // for (Bar = 0x10; Bar < 0x28; Bar+= 4) { - Status = PciIo->Pci.Read ( - PciIo, - EfiPciIoWidthUint32, - Bar, - 1, - (VOID *) &BaseAddress - ); + PciIo->Pci.Read ( + PciIo, + EfiPciIoWidthUint32, + Bar, + 1, + (VOID *) &BaseAddress + ); if (BaseAddress && 0x01) { TempBaseAddress = 0xffffffff; - Status = PciIo->Pci.Write ( - PciIo, - EfiPciIoWidthUint32, - Bar, - 1, - (VOID *) &TempBaseAddress - ); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint32, + Bar, + 1, + (VOID *) &TempBaseAddress + ); TempBaseAddress &= 0xfffffffc; IoSize = 1; while ((TempBaseAddress & 0x01) == 0) { @@ -218,28 +214,28 @@ InitBadBars( IoSize = IoSize << 1; } if (IoSize < MIN_NCR_IO_SIZE) { - Status = gDS->FreeIoSpace ( - BaseAddress, - IoSize - ); - - Status = gDS->AllocateIoSpace ( - EfiGcdAllocateAnySearchTopDown, - EfiGcdIoTypeIo, - NCR_GRAN, // Alignment - MIN_NCR_IO_SIZE, - &BaseAddress, - mImageHandle, - NULL - ); + gDS->FreeIoSpace ( + BaseAddress, + IoSize + ); + + gDS->AllocateIoSpace ( + EfiGcdAllocateAnySearchTopDown, + EfiGcdIoTypeIo, + NCR_GRAN, // Alignment + MIN_NCR_IO_SIZE, + &BaseAddress, + mImageHandle, + NULL + ); TempBaseAddress = BaseAddress + 1; - Status = PciIo->Pci.Write ( - PciIo, - EfiPciIoWidthUint32, - Bar, - 1, - (VOID *) &TempBaseAddress - ); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint32, + Bar, + 1, + (VOID *) &TempBaseAddress + ); } } } @@ -255,13 +251,13 @@ InitBadBars( // Controller. // All Tekoa A2 or earlier step chips for now. // - Status = PciIo->Pci.Read ( - PciIo, - EfiPciIoWidthUint8, - PCI_REVISION_ID_OFFSET, - 1, - &RevId - ); + PciIo->Pci.Read ( + PciIo, + EfiPciIoWidthUint8, + PCI_REVISION_ID_OFFSET, + 1, + &RevId + ); if (RevId <= 0x02) { for (Bar = 0x14; Bar < 0x24; Bar+= 4) { // @@ -269,13 +265,13 @@ InitBadBars( // Bars don't worry aboyut freeing up thge allocs. // TempBaseAddress = 0x0; - Status = PciIo->Pci.Write ( - PciIo, - EfiPciIoWidthUint32, - Bar, - 1, - (VOID *) &TempBaseAddress - ); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint32, + Bar, + 1, + (VOID *) &TempBaseAddress + ); } // end for } else @@ -286,13 +282,13 @@ InitBadBars( //since Tekoa does not fully support IDE Bus Mastering // TempBaseAddress = 0x0; - Status = PciIo->Pci.Write ( - PciIo, - EfiPciIoWidthUint32, - 0x20, - 1, - (VOID *) &TempBaseAddress - ); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint32, + 0x20, + 1, + (VOID *) &TempBaseAddress + ); } } break; @@ -308,19 +304,17 @@ ProgramPciLatency( IN EFI_PCI_IO_PROTOCOL *PciIo ) { - EFI_STATUS Status; - // // Program Master Latency Timer // if (mSystemConfiguration.PciLatency != 0) { - Status = PciIo->Pci.Write ( - PciIo, - EfiPciIoWidthUint8, - PCI_LATENCY_TIMER_OFFSET, - 1, - &mSystemConfiguration.PciLatency - ); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint8, + PCI_LATENCY_TIMER_OFFSET, + 1, + &mSystemConfiguration.PciLatency + ); } return; } diff --git a/Vlv2TbltDevicePkg/PlatformDxe/Platform.c b/Vlv2TbltDevicePkg/PlatformDxe/Platform.c index 439b6d9..3d8cbe0 100644 --- a/Vlv2TbltDevicePkg/PlatformDxe/Platform.c +++ b/Vlv2TbltDevicePkg/PlatformDxe/Platform.c @@ -518,16 +518,15 @@ InitPciDevPME ( ) { UINTN VarSize; - EFI_STATUS Status; VarSize = sizeof(SYSTEM_CONFIGURATION); - Status = gRT->GetVariable( - NORMAL_SETUP_NAME, - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &mSystemConfiguration - ); + gRT->GetVariable( + NORMAL_SETUP_NAME, + &gEfiNormalSetupGuid, + NULL, + &VarSize, + &mSystemConfiguration + ); // //Program HDA PME_EN @@ -577,21 +576,20 @@ InitThermalZone ( ) { UINTN VarSize; - EFI_STATUS Status; EFI_GLOBAL_NVS_AREA_PROTOCOL *GlobalNvsArea; VarSize = sizeof(SYSTEM_CONFIGURATION); - Status = gRT->GetVariable( - NORMAL_SETUP_NAME, - &gEfiNormalSetupGuid, - NULL, - &VarSize, - &mSystemConfiguration - ); - Status = gBS->LocateProtocol ( - &gEfiGlobalNvsAreaProtocolGuid, - NULL, - (void **)&GlobalNvsArea - ); + gRT->GetVariable( + NORMAL_SETUP_NAME, + &gEfiNormalSetupGuid, + NULL, + &VarSize, + &mSystemConfiguration + ); + gBS->LocateProtocol ( + &gEfiGlobalNvsAreaProtocolGuid, + NULL, + (void **)&GlobalNvsArea + ); GlobalNvsArea->Area->CriticalThermalTripPoint = mSystemConfiguration.CriticalThermalTripPoint; GlobalNvsArea->Area->PassiveThermalTripPoint = mSystemConfiguration.PassiveThermalTripPoint; } -- 2.9.2 |
|
[PATCH v2 16/19] Vlv2TbltDevicePkg/Wpce791: Remove the unused variable
Gary Lin
Fix the following error from gcc:
Vlv2TbltDevicePkg/Wpce791/LpcDriver.c: In function ‘LpcDriverStart’: Vlv2TbltDevicePkg/Wpce791/LpcDriver.c:239:27: error: variable ‘LpcDev’ set but not used [-Werror=unused-but-set-variable] Cc: David Wei <david.wei@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@...> --- Vlv2TbltDevicePkg/Wpce791/LpcDriver.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Vlv2TbltDevicePkg/Wpce791/LpcDriver.c b/Vlv2TbltDevicePkg/Wpce791/LpcDriver.c index be99b4c..5b0c25c 100644 --- a/Vlv2TbltDevicePkg/Wpce791/LpcDriver.c +++ b/Vlv2TbltDevicePkg/Wpce791/LpcDriver.c @@ -227,10 +227,6 @@ LpcDriverStart ( { EFI_STATUS Status; EFI_PCI_IO_PROTOCOL *PciIo; - LPC_DEV *LpcDev; - - - LpcDev = NULL; // // Get Pci IO -- 2.9.2 |
|
[PATCH v2 17/19] Vlv2TbltDevicePkg/SmBiosMiscDxe: Remove unused variables
Gary Lin
Fix the following errors from gcc:
Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Function.c: In function ‘JudgeHandleIsPCIDevice’: Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Function.c:164:22: error: variable ‘DevicePath’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Function.c: In function ‘AddSmbiosT0x90Callback’: Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Function.c:292:28: error: variable ‘ForType90InputData’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformationFunction.c: In function ‘MiscProcessorInformationFunction’: Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformationFunction.c:191:37: error: variable ‘SrcDataSize’ set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c: In function ‘MiscProcessorCacheFunction’: Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c:78:34: error: variable ‘SrcDataSize’ set but not used [-Werror=unused-but-set-variable] Cc: David Wei <david.wei@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@...> Reviewed-by: David Wei <david.wei@...> --- Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Function.c | 5 ----- Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c | 2 -- Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformationFunction.c | 2 -- 3 files changed, 9 deletions(-) diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Function.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Function.c index 2d0bf8b..9e04907 100644 --- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Function.c +++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Function.c @@ -152,7 +152,6 @@ JudgeHandleIsPCIDevice( { EFI_STATUS Status; EFI_DEVICE_PATH *DPath; - EFI_DEVICE_PATH *DevicePath; Status = gBS->HandleProtocol ( Handle, @@ -160,7 +159,6 @@ JudgeHandleIsPCIDevice( (VOID **) &DPath ); if(!EFI_ERROR(Status)) { - DevicePath = DPath; while(!IsDevicePathEnd(DPath)) { if((DPath->Type == HARDWARE_DEVICE_PATH) && (DPath->SubType == HW_PCI_DP)) { PCI_DEVICE_PATH *PCIPath; @@ -280,7 +278,6 @@ AddSmbiosT0x90Callback ( UINTN SteppingStrLen = 0; SMBIOS_TABLE_TYPE90 *SmbiosRecord; EFI_SMBIOS_HANDLE SmbiosHandle; - EFI_MISC_OEM_TYPE_0x90 *ForType90InputData; CHAR16 *SECVer; CHAR16 *uCodeVer; CHAR16 *GOPVer; @@ -289,8 +286,6 @@ AddSmbiosT0x90Callback ( CHAR8 *OptionalStrStart; EFI_SMBIOS_PROTOCOL *SmbiosProtocol; - ForType90InputData = (EFI_MISC_OEM_TYPE_0x90 *)Context; - DEBUG ((EFI_D_INFO, "Executing SMBIOS T0x90 callback.\n")); gBS->CloseEvent (Event); // Unload this event. diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c index cbed988..b18a6aa 100644 --- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c +++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunction.c @@ -66,7 +66,6 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscProcessorCache) EFI_DATA_RECORD_HEADER *Record; EFI_SUBCLASS_TYPE1_HEADER *DataHeader; UINT8 *SrcData; - UINT32 SrcDataSize; EFI_STATUS Status; // @@ -113,7 +112,6 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscProcessorCache) if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) { DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); SrcData = (UINT8 *)(DataHeader + 1); - SrcDataSize = Record->RecordSize - Record->HeaderSize - sizeof (EFI_SUBCLASS_TYPE1_HEADER); if (CompareGuid(&Record->DataRecordGuid, &gEfiCacheSubClassGuid) && (DataHeader->RecordType == CacheSizeRecordType)) { if (DataHeader->SubInstance == EFI_CACHE_L1) { SmbiosRecordL1->InstalledSize += (UINT16) (ConvertBase2ToRaw((EFI_EXP_BASE2_DATA *)SrcData) >> 10); diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformationFunction.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformationFunction.c index 005b43c..bd988db 100644 --- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformationFunction.c +++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformationFunction.c @@ -179,7 +179,6 @@ MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) EFI_DATA_RECORD_HEADER *Record; EFI_SUBCLASS_TYPE1_HEADER *DataHeader; UINT8 *SrcData; - UINT32 SrcDataSize; EFI_PROCESSOR_VERSION_DATA *ProcessorVersion; CHAR16 *NewStringToken; STRING_REF TokenToUpdate; @@ -225,7 +224,6 @@ MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1); SrcData = (UINT8 *)(DataHeader + 1); - SrcDataSize = Record->RecordSize - Record->HeaderSize - sizeof (EFI_SUBCLASS_TYPE1_HEADER); // // Processor -- 2.9.2 |
|
[PATCH v2 18/19] Vlv2TbltDevicePkg/PpmPolicy: Remove the usage of global variables
Gary Lin
gcc issued the error of "multiple deifintion" since gBS was also defined
in MdePkg/Library/UefiBootServicesTableLib. Actually those global variables, gBS, pBS, and pRS, in PpmPolicy.h were only used in one function. Besides, gBS and pRS were not really used. Remove gBS and pRS and declare pBS in PpmPolicyEntry() to satisfy gcc. Cc: David Wei <david.wei@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@...> Reviewed-by: David Wei <david.wei@...> --- Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c | 10 +++------- Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.h | 6 +----- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c index 2f8996b..fb4e7fc 100644 --- a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c +++ b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c @@ -33,8 +33,6 @@ Abstract: #define EFI_CPUID_MODEL 0x00F0 #define EFI_CPUID_STEPPING 0x000F - - EFI_STATUS EFIAPI PpmPolicyEntry( @@ -42,6 +40,7 @@ PpmPolicyEntry( IN EFI_SYSTEM_TABLE *SystemTable ) { + EFI_BOOT_SERVICES *pBS; EFI_MP_SERVICES_PROTOCOL *MpService; EFI_CPUID_REGISTER Cpuid01 = { 0, 0, 0, 0}; EFI_HANDLE Handle; @@ -52,15 +51,12 @@ PpmPolicyEntry( PCH_STEPPING Stepping; - - gBS = SystemTable->BootServices; pBS = SystemTable->BootServices; - pRS = SystemTable->RuntimeServices; // // Set PPM policy structure to known value // - gBS->SetMem (&mDxePlatformPpmPolicy, sizeof(PPM_PLATFORM_POLICY_PROTOCOL), 0); + pBS->SetMem (&mDxePlatformPpmPolicy, sizeof(PPM_PLATFORM_POLICY_PROTOCOL), 0); // // Find the MpService Protocol @@ -147,7 +143,7 @@ PpmPolicyEntry( mDxePlatformPpmPolicy.S3RestoreMsrSwSmiNumber = S3_RESTORE_MSR_SW_SMI; Handle = NULL; - Status = gBS->InstallMultipleProtocolInterfaces ( + Status = pBS->InstallMultipleProtocolInterfaces ( &Handle, &gPpmPlatformPolicyProtocolGuid, &mDxePlatformPpmPolicy, diff --git a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.h b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.h index cd3676b..cc7bed7 100644 --- a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.h +++ b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.h @@ -31,10 +31,6 @@ PPM_PLATFORM_POLICY_PROTOCOL mDxePlatformPpmPolicy; #define ICH_DEVICE_ENABLE 1 #define ICH_DEVICE_DISABLE 0 -EFI_BOOT_SERVICES *gBS; -EFI_BOOT_SERVICES *pBS; -EFI_RUNTIME_SERVICES *pRS; - #define POWER_STATE_SWITCH_SMI 43 #define ENABLE_C_STATE_IO_REDIRECTION_SMI 70 #define DISABLE_C_STATE_IO_REDIRECTION_SMI 71 @@ -43,4 +39,4 @@ EFI_RUNTIME_SERVICES *pRS; #define ENABLE_P_STATE_HARDWARE_COORDINATION_SMI 74 #define DISABLE_P_STATE_HARDWARE_COORDINATION_SMI 75 #define S3_RESTORE_MSR_SW_SMI 48 -#define ENABLE_C6_RESIDENCY_SMI 76 \ No newline at end of file +#define ENABLE_C6_RESIDENCY_SMI 76 -- 2.9.2 |
|
[PATCH v2 19/19] Vlv2TbltDevicePkg/PpmPolicy: Remove the unused variable
Gary Lin
Fix the following error from gcc:
Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c: In function ‘PpmPolicyEntry’: Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c:50:29: error: variable ‘MaxRatio’ set but not used [-Werror=unused-but-set-variable] Cc: David Wei <david.wei@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@...> Reviewed-by: David Wei <david.wei@...> --- Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c index fb4e7fc..ec0c0f5 100644 --- a/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c +++ b/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c @@ -46,7 +46,6 @@ PpmPolicyEntry( EFI_HANDLE Handle; EFI_STATUS Status; UINTN CpuCount; - UINT64 MaxRatio; UINT8 CPUMobileFeature; PCH_STEPPING Stepping; @@ -77,8 +76,6 @@ PpmPolicyEntry( // Store the CPUID for use by SETUP items. // AsmCpuid (EFI_CPUID_VERSION_INFO, &Cpuid01.RegEax, &Cpuid01.RegEbx, &Cpuid01.RegEcx, &Cpuid01.RegEdx); - MaxRatio = ((RShiftU64 (AsmReadMsr64(EFI_MSR_IA32_PLATFORM_ID), 8)) & 0x1F); - mDxePlatformPpmPolicy.Revision = PPM_PLATFORM_POLICY_PROTOCOL_REVISION_4; -- 2.9.2 |
|
Re: Ingebrigtsen: The End of Gmane?
Bruce Cran <bruce@...>
On 7/28/16 6:46 PM, Kinney, Michael D wrote:
Built-in archives for edk2-devel and edk2-bugs and now enabled.Thanks! -- Bruce |
|
Re: [PATCH v4 0/7] BaseTools: add support for GCC5 in LTO mode
Liming Gao
Ard:
toggle quoted message
Show quoted text
Thanks for your update. I have some comments for them. 1) It uses GCC as Link for GCC44-GCC49. Have you done verification on them? I verify GCC49 in OVMFIa32X64 platform. It works. 2) After this change, how to append new link option in platform DSC? Use style -Wl, ? 3) I see GCC5 uses gcc-ar as its SLINK, and GCC49 uses ar as its SLINK. Is gcc-ar required only by LTO? 4) Before GCC49 optimization, GCC49 means GCC49 or later, GCC5 can work with GCC49 tool chain configuration. But now, I configure gcc to point to GCC5, and build OVMF with GCC49 tool chain, it reports GenFw failure. I expect GCC5 work with GCC49 and GCC5 tool chain both. GCC49 for no lto, GCC5 for lto. I know Steven has provided the patch to fix this GenFw issue. GenFw: ERROR 3000: Invalid /home/hwu/work/lgao4/AllPkg/Build/Ovmf3264/DEBUG_GCC49/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll unsupported ELF EM_X86_64 relocation 0x9. GenFw: ERROR 3000: Invalid /home/hwu/work/lgao4/AllPkg/Build/Ovmf3264/DEBUG_GCC49/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll unsupported ELF EM_X86_64 relocation 0x9. GenFw: ERROR 3000: Invalid Thanks Liming -----Original Message----- |
|
Re: [Patch 1/3] BaseTools: Correct ReadMe.txt file with CRLF line ending
Zhu, Yonghong <yonghong.zhu@...>
Reviewed-by: Yonghong Zhu <yonghong.zhu@...>
toggle quoted message
Show quoted text
Best Regards, Zhu Yonghong -----Original Message-----
From: Gao, Liming Sent: Thursday, July 28, 2016 4:46 PM To: edk2-devel@... Cc: Zhu, Yonghong <yonghong.zhu@...> Subject: [Patch 1/3] BaseTools: Correct ReadMe.txt file with CRLF line ending Cc: Yonghong Zhu <yonghong.zhu@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@...> --- BaseTools/ReadMe.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/ReadMe.txt b/BaseTools/ReadMe.txt index 6330b14..be9ff2a 100644 --- a/BaseTools/ReadMe.txt +++ b/BaseTools/ReadMe.txt @@ -7,9 +7,9 @@ directory contatins tools source. === Windows/Visual Studio Notes === -To build the BaseTools, you should run the standard vsvars32.bat script -from your preferred Visual Studio installation or you can run get_vsvars.bat -to use latest automatically detected version. +To build the BaseTools, you should run the standard vsvars32.bat script +from your preferred Visual Studio installation or you can run +get_vsvars.bat to use latest automatically detected version. In addition to this, you should set the following environment variables: -- 2.8.0.windows.1 |
|
[patch] BaseTool/Upt: Avoid UNI file name conflict
hesschen <hesheng.chen@...>
When creating a UNI file if there is a name conflict, add an index from 0 to the file name
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: hesschen <hesheng.chen@...> --- .../Source/Python/UPT/GenMetaFile/GenDecFile.py | 5 +++-- .../Source/Python/UPT/GenMetaFile/GenInfFile.py | 7 +++--- BaseTools/Source/Python/UPT/Library/String.py | 26 +++++++++++++++++++++- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py index 31abd23..d39c182 100644 --- a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py +++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py @@ -65,6 +65,7 @@ from Library.DataType import TAB_SECTION_END from Library.DataType import TAB_SPLIT import Library.DataType as DT from Library.UniClassObject import FormatUniEntry +from Library.String import GetUniFileName def GenPcd(Package, Content): # @@ -586,9 +587,9 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO if not os.path.exists(os.path.dirname(PackageObject.GetFullPath())): os.makedirs(os.path.dirname(PackageObject.GetFullPath())) - ContainerFile = os.path.normpath(os.path.join(os.path.dirname(PackageObject.GetFullPath()), - (PackageObject.GetBaseName() + '.uni'))) + ContainerFile = GetUniFileName(os.path.dirname(PackageObject.GetFullPath()), PackageObject.GetBaseName()) + Content = UniFileHeader + '\r\n' Content += '\r\n' diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py index a131f98..c1362e6 100644 --- a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py +++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py @@ -2,7 +2,7 @@ # # This file contained the logical of transfer package object to INF files. # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this @@ -41,6 +41,7 @@ import Logger.Log as Logger from Library import DataType as DT from GenMetaFile import GenMetaFileMisc from Library.UniClassObject import FormatUniEntry +from Library.String import GetUniFileName ## Transfer Module Object to Inf files @@ -225,8 +226,8 @@ def GenModuleUNIEncodeFile(ModuleObject, UniFileHeader='', Encoding=DT.TAB_ENCOD return else: ModuleObject.UNIFlag = True - ContainerFile = os.path.normpath(os.path.join(os.path.dirname(ModuleObject.GetFullPath()), - (ModuleObject.GetBaseName() + '.uni'))) + ContainerFile = GetUniFileName(os.path.dirname(ModuleObject.GetFullPath()), ModuleObject.GetBaseName()) + if not os.path.exists(os.path.dirname(ModuleObject.GetFullPath())): os.makedirs(os.path.dirname(ModuleObject.GetFullPath())) diff --git a/BaseTools/Source/Python/UPT/Library/String.py b/BaseTools/Source/Python/UPT/Library/String.py index 37ce141..05b5fb1 100644 --- a/BaseTools/Source/Python/UPT/Library/String.py +++ b/BaseTools/Source/Python/UPT/Library/String.py @@ -2,7 +2,7 @@ # This file is used to define common string related functions used in parsing # process # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this @@ -957,3 +957,27 @@ def IsMatchArch(Arch1, Arch2): return True return False + +# Search all files in FilePath to find the FileName with the largest index +# Return the FileName with index +1 under the FilePath +# +def GetUniFileName(FilePath, FileName): + Files = os.listdir(FilePath) + LargestIndex = -1 + for File in Files: + if File.upper().startswith(FileName.upper()) and File.upper().endswith('.UNI'): + Index = File.upper().replace(FileName.upper(), '').replace('.UNI', '') + if Index: + try: + Index = int(Index) + except Exception: + Index = -1 + else: + Index = 0 + if Index > LargestIndex: + LargestIndex = Index + 1 + + if LargestIndex > -1: + return os.path.normpath(os.path.join(FilePath, FileName + str(LargestIndex) + '.uni')) + else: + return os.path.normpath(os.path.join(FilePath, FileName + '.uni')) -- 2.7.2.windows.1 |
|
Re: [PATCH v4 0/7] BaseTools: add support for GCC5 in LTO mode
Ard Biesheuvel
On 29 July 2016 at 06:47, Gao, Liming <liming.gao@...> wrote:
Ard:Yes, I tested all of them. 2) After this change, how to append new link option in platform DSC? Use style -Wl, ?It depends. Some options (like -z) don't need it, but others do. 3) I see GCC5 uses gcc-ar as its SLINK, and GCC49 uses ar as its SLINK. Is gcc-ar required only by LTO?Yes 4) Before GCC49 optimization, GCC49 means GCC49 or later, GCC5 can work with GCC49 tool chain configuration. But now, I configure gcc to point to GCC5, and build OVMF with GCC49 tool chain, it reports GenFw failure. I expect GCC5 work with GCC49 and GCC5 tool chain both. GCC49 for no lto, GCC5 for lto. I know Steven has provided the patch to fix this GenFw issue.Which GCC version are you using? -----Original Message----- |
|
Re: [PATCH v4 0/7] BaseTools: add support for GCC5 in LTO mode
Ard Biesheuvel
On 29 July 2016 at 08:09, Ard Biesheuvel <ard.biesheuvel@...> wrote:
On 29 July 2016 at 06:47, Gao, Liming <liming.gao@...> wrote:I cannot reproduce this with gcc version 5.4.0 20160609 (UbuntuArd:Yes, I tested all of them. 5.4.0-6ubuntu1~16.04.1) In any case, I think we should merge Steven's patch that adds handling to the relocation types to GenFw. The issue is only that having a GOT does not make a lot of sense for UEFI executables, since it forces a symbol reference to be absolute, which uses more space in the code, but also in the .reloc section. The visibility pragma I introduced for GCC4x was intended to prevent GOT based relocations from being emitted. |
|
bugzilla whining
Laszlo Ersek
Hello Mike,
I got my first ever bugzilla whine today. It says "All of these bugs are in the CONFIRMED state, and have not been touched in 7 days or more." I'm not amused. :) I keep a very close eye on my BZs and I don't welcome automated whines. I checked the Bugzilla 5 documentation about whines: http://bugzilla.readthedocs.io/en/5.0/administering/whining.html#whining http://bugzilla.readthedocs.io/en/5.0/using/preferences.html?highlight=whine#permissions http://bugzilla.readthedocs.io/en/5.0/administering/parameters.html?highlight=whine#email I confirmed on my account (under Preferences | Permissions) that I have the "bz_canusewhines" permission (--> "User can configure whine reports for self"). However, when I go to Administration | Whining, it seems that I can only create new whines -- I don't seem to have any personal whines set up at the moment. Which makes me think that this is a central default. Can we please make it a personal setting instead? Thank you, Laszlo |
|
Re: [PATCH v2 02/19] Vlv2TbltDevicePkg: Only define MDEPKG_NDEBUG for gcc release build
Laszlo Ersek
On 07/29/16 05:25, Gary Lin wrote:
We only enable "-Wno-unused-but-set-variable" for the release buildAcked-by: Laszlo Ersek <lersek@...> |
|
Re: Ingebrigtsen: The End of Gmane?
Laszlo Ersek
On 07/29/16 06:07, Bruce Cran wrote:
On 7/28/16 6:46 PM, Kinney, Michael D wrote:Thanks!Built-in archives for edk2-devel and edk2-bugs and now enabled.Thanks! Laszlo |
|
Re: [Patch] Vlv2TbltDevicePkg:Signal EndOfDxe Event.
Laszlo Ersek
On 07/29/16 04:31, Wei, David wrote:
Reviewed-by: David Wei <david.wei@...>I recommend using the new EfiEventGroupSignal() function from UefiLib instead. Please refer to the following commits: ca8f50e88e03 MdePkg/UefiLib: move InternalEmptyFunction to UefiLib.c 772fb7cb13de MdePkg/UefiLib: introduce EfiEventGroupSignal ff55dd3befb4 IntelFrameworkPkg/FrameworkUefiLib: move InternalEmptyFunction to UefiLib.c 6212b9481d82 IntelFrameworkPkg/FrameworkUefiLib: implement EfiEventGroupSignal dfc9514794fc ArmVirtPkg/PlatformIntelBdsLib: rebase to EfiEventGroupSignal 36e8e6992d0c OvmfPkg/PlatformBdsLib: rebase to EfiEventGroupSignal Thanks Laszlo -----Original Message----- |
|
[patch] BaseTool/UPT: Add Test Install
hesschen <hesheng.chen@...>
Add a new function to test if a DIST file list
one by one to see if they can meet the requirement of Dependency. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: hesschen <hesheng.chen@...> --- .../Source/Python/UPT/Core/DependencyRules.py | 21 ++++- BaseTools/Source/Python/UPT/Logger/StringTable.py | 5 ++ BaseTools/Source/Python/UPT/TestInstall.py | 100 +++++++++++++++++++++ BaseTools/Source/Python/UPT/UPT.py | 16 ++++ 4 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 BaseTools/Source/Python/UPT/TestInstall.py diff --git a/BaseTools/Source/Python/UPT/Core/DependencyRules.py b/BaseTools/Source/Python/UPT/Core/DependencyRules.py index 4608ed6..ee06c53 100644 --- a/BaseTools/Source/Python/UPT/Core/DependencyRules.py +++ b/BaseTools/Source/Python/UPT/Core/DependencyRules.py @@ -1,7 +1,7 @@ ## @file # This file is for installed package information database operations # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this @@ -183,6 +183,25 @@ class DependencyRules(object): def CheckInstallDpDepexSatisfied(self, DpObj): self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList] return self.CheckDpDepexSatisfied(DpObj) + + # # Check whether multiple DP depex satisfied by current workspace for Install + # + # @param DpObjList: A distribution object list + # @return: True if distribution depex satisfied + # False else + # + def CheckTestInstallPdDepexSatisfied(self, DpObjList): + self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList] + for DpObj in DpObjList: + if self.CheckDpDepexSatisfied(DpObj): + for PkgKey in DpObj.PackageSurfaceArea.keys(): + PkgObj = DpObj.PackageSurfaceArea[PkgKey] + self.PkgsToBeDepend.append((PkgObj.Guid, PkgObj.Version)) + else: + return False, DpObj + + return True, DpObj + ## Check whether a DP depex satisfied by current workspace # (excluding the original distribution's packages to be replaced) for Replace diff --git a/BaseTools/Source/Python/UPT/Logger/StringTable.py b/BaseTools/Source/Python/UPT/Logger/StringTable.py index 96f0e1c..4c42661 100644 --- a/BaseTools/Source/Python/UPT/Logger/StringTable.py +++ b/BaseTools/Source/Python/UPT/Logger/StringTable.py @@ -858,3 +858,8 @@ HLP_SPECIFY_PACKAGE_NAME_TO_BE_REPLACED = _( "Specify the UEFI Distribution Package file name to be replaced") HLP_USE_GUIDED_PATHS = _( "Install packages to the following directory path by default: <PackageName>_<PACKAGE_GUID>_<PACKAGE_VERSION>") +HLP_TEST_INSTALL = _( + "Specify the UEFI Distribution Package filenames to install") + +MSG_TEST_INSTALL_PASS = _("All distribution package file are satisfied for dependence check.") +MSG_TEST_INSTALL_FAIL = _("NOT all distribution package file are satisfied for dependence check.") diff --git a/BaseTools/Source/Python/UPT/TestInstall.py b/BaseTools/Source/Python/UPT/TestInstall.py new file mode 100644 index 0000000..71fe928 --- /dev/null +++ b/BaseTools/Source/Python/UPT/TestInstall.py @@ -0,0 +1,100 @@ +# # @file +# Test Install distribution package +# +# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> +# +# This program and the accompanying materials are licensed and made available +# under the terms and conditions of the BSD License which accompanies this +# distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +""" +Test Install multiple distribution package +""" +# # +# Import Modules +# +from Library import GlobalData +import Logger.Log as Logger +from Logger import StringTable as ST +import Logger.ToolError as TE +from Core.DependencyRules import DependencyRules +from InstallPkg import UnZipDp + +import shutil +from traceback import format_exc +from platform import python_version +from sys import platform + +# # Tool entrance method +# +# This method mainly dispatch specific methods per the command line options. +# If no error found, return zero value so the caller of this tool can know +# if it's executed successfully or not. +# +# @param Options: command Options +# +def Main(Options=None): + ContentZipFile, DistFile = None, None + ReturnCode = 0 + + try: + DataBase = GlobalData.gDB + WorkspaceDir = GlobalData.gWORKSPACE + if not Options.DistFiles: + Logger.Error("TestInstallPkg", TE.OPTION_MISSING, ExtraData=ST.ERR_SPECIFY_PACKAGE) + + DistPkgList = [] + for DistFile in Options.DistFiles: + DistPkg, ContentZipFile, __, DistFile = UnZipDp(WorkspaceDir, DistFile) + DistPkgList.append(DistPkg) + + # + # check dependency + # + Dep = DependencyRules(DataBase) + Result = True + DpObj = None + try: + Result, DpObj = Dep.CheckTestInstallPdDepexSatisfied(DistPkgList) + except: + Result = False + + if Result: + Logger.Quiet(ST.MSG_TEST_INSTALL_PASS) + else: + Logger.Quiet(ST.MSG_TEST_INSTALL_FAIL) + + except TE.FatalError, XExcept: + ReturnCode = XExcept.args[0] + if Logger.GetLevel() <= Logger.DEBUG_9: + Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc()) + + except Exception, x: + ReturnCode = TE.CODE_ERROR + Logger.Error( + "\nTestInstallPkg", + TE.CODE_ERROR, + ST.ERR_UNKNOWN_FATAL_INSTALL_ERR % Options.DistFiles, + ExtraData=ST.MSG_SEARCH_FOR_HELP, + RaiseError=False + ) + Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc()) + + finally: + Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_STARTED) + if DistFile: + DistFile.Close() + if ContentZipFile: + ContentZipFile.Close() + if GlobalData.gUNPACK_DIR: + shutil.rmtree(GlobalData.gUNPACK_DIR) + GlobalData.gUNPACK_DIR = None + Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE) + if ReturnCode == 0: + Logger.Quiet(ST.MSG_FINISH) + return ReturnCode + diff --git a/BaseTools/Source/Python/UPT/UPT.py b/BaseTools/Source/Python/UPT/UPT.py index 59c4a88..8dd949a 100644 --- a/BaseTools/Source/Python/UPT/UPT.py +++ b/BaseTools/Source/Python/UPT/UPT.py @@ -46,6 +46,7 @@ import InstallPkg import RmPkg import InventoryWs import ReplacePkg +import TestInstall from Library.Misc import GetWorkspace from Library import GlobalData from Core.IpiDb import IpiDatabase @@ -69,6 +70,9 @@ def CheckConflictOption(Opt): Logger.Error("UPT", OPTION_CONFLICT, ExtraData=ST.ERR_I_R_EXCLUSIVE) elif Opt.PackFileToCreate and Opt.PackFileToRemove: Logger.Error("UPT", OPTION_CONFLICT, ExtraData=ST.ERR_C_R_EXCLUSIVE) + elif Opt.TestDistFiles and (Opt.PackFileToCreate or Opt.PackFileToInstall \ + or Opt.PackFileToRemove or Opt.PackFileToReplace): + Logger.Error("UPT", OPTION_CONFLICT, ExtraData=ST.ERR_C_R_EXCLUSIVE) if Opt.CustomPath and Opt.UseGuidedPkgPath: Logger.Warn("UPT", ST.WARN_CUSTOMPATH_OVERRIDE_USEGUIDEDPATH) @@ -146,6 +150,9 @@ def Main(): Parser.add_option("--use-guided-paths", action="store_true", dest="Use_Guided_Paths", help=ST.HLP_USE_GUIDED_PATHS) + Parser.add_option("-j", "--test-install", action="append", type="string", + dest="Test_Install_Distribution_Package_Files", help=ST.HLP_TEST_INSTALL) + Opt = Parser.parse_args()[0] Var2Var = [ @@ -159,6 +166,7 @@ def Main(): ("PackFileToReplace", Opt.Replace_Distribution_Package_File), ("PackFileToBeReplaced", Opt.Original_Distribution_Package_File), ("UseGuidedPkgPath", Opt.Use_Guided_Paths), + ("TestDistFiles", Opt.Test_Install_Distribution_Package_Files) ] for Var in Var2Var: @@ -265,6 +273,14 @@ def Main(): Opt.PackFileToReplace = AbsPath RunModule = ReplacePkg.Main + elif Opt.Test_Install_Distribution_Package_Files: + for Dist in Opt.Test_Install_Distribution_Package_Files: + if not Dist.endswith('.dist'): + Logger.Error("TestInstall", FILE_TYPE_MISMATCH, ExtraData=ST.ERR_DIST_EXT_ERROR % Dist) + + setattr(Opt, 'DistFiles', Opt.Test_Install_Distribution_Package_Files) + RunModule = TestInstall.Main + else: Parser.print_usage() return OPTION_MISSING -- 2.7.2.windows.1 |
|
Re: OVMF and passed usb 3. controller
Eugene Chekanskiy <echekanskiy@...>
Thanks a lot for reply, guys. Bios form https://www.kraxel.org rly helped
toggle quoted message
Show quoted text
and my keyboard working fine. Thanks, Eugene. 2016-07-26 4:36 GMT+03:00 Tian, Feng <feng.tian@...>: If the renesas usb 3.0 host controller follows XHCI spec, then EDKII XHCI |
|