SF.net SVN: edk2:[15668] trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c
Revision: 15668 http://sourceforge.net/p/edk2/code/15668 Author: jljusten Date: 2014-07-22 08:19:43 + (Tue, 22 Jul 2014) Log Message: --- EmulatorPkg/MpService: modify AP state should hold a mutex Add mutex when change AP state. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan Reviewed-by: Jordan Justen Modified Paths: -- trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c Modified: trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c === --- trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c2014-07-22 03:06:43 UTC (rev 15667) +++ trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c2014-07-22 08:19:43 UTC (rev 15668) @@ -512,11 +512,16 @@ if (SingleThread) { Status = GetNextBlockedNumber (&NextNumber); if (!EFI_ERROR (Status)) { +gThread->MutexLock (&gMPSystem.ProcessorData[NextNumber].StateLock); gMPSystem.ProcessorData[NextNumber].State = CPU_STATE_READY; +gThread->MutexUnlock (&gMPSystem.ProcessorData[NextNumber].StateLock); } } +gThread->MutexLock (ProcessorData->StateLock); ProcessorData->State = CPU_STATE_IDLE; +gThread->MutexUnlock (ProcessorData->StateLock); + break; default: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits
SF.net SVN: edk2:[15669] trunk/edk2/OvmfPkg
Revision: 15669 http://sourceforge.net/p/edk2/code/15669 Author: jljusten Date: 2014-07-22 21:56:53 + (Tue, 22 Jul 2014) Log Message: --- OvmfPkg: extract varstore-related FD Layout Regions to an include file This saves code duplication between the Ia32, Ia32X64, and X64 flavors, and enables the next patch to include the varstore in new FD files by reference. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen Modified Paths: -- trunk/edk2/OvmfPkg/OvmfPkgIa32.fdf trunk/edk2/OvmfPkg/OvmfPkgIa32X64.fdf trunk/edk2/OvmfPkg/OvmfPkgX64.fdf Added Paths: --- trunk/edk2/OvmfPkg/VarStore.fdf.inc Modified: trunk/edk2/OvmfPkg/OvmfPkgIa32.fdf === --- trunk/edk2/OvmfPkg/OvmfPkgIa32.fdf 2014-07-22 08:19:43 UTC (rev 15668) +++ trunk/edk2/OvmfPkg/OvmfPkgIa32.fdf 2014-07-22 21:56:53 UTC (rev 15669) @@ -44,73 +44,8 @@ NumBlocks = 0x200 !endif -0x|0xe000 -gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize -#NV_VARIABLE_STORE -DATA = { - ## This is the EFI_FIRMWARE_VOLUME_HEADER - # ZeroVector [] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - # FileSystemGuid: gEfiSystemNvDataFvGuid = - # { 0xFFF12B8D, 0x7696, 0x4C8B, - # { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }} - 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C, - 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50, - # FvLength: 0x2 - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - # Signature "_FVH" # Attributes - 0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00, - # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision - 0x48, 0x00, 0x19, 0xF9, 0x00, 0x00, 0x00, 0x02, - # Blockmap[0]: 0x20 Blocks * 0x1000 Bytes / Block - 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - # Blockmap[1]: End - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - ## This is the VARIABLE_STORE_HEADER -!if $(SECURE_BOOT_ENABLE) == TRUE - # Signature: gEfiAuthenticatedVariableGuid = - # { 0xaaf32c78, 0x947b, 0x439a, - # { 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92 }} - 0x78, 0x2c, 0xf3, 0xaa, 0x7b, 0x94, 0x9a, 0x43, - 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92, -!else - # Signature: gEfiVariableGuid = - # { 0xddcf3616, 0x3275, 0x4164, - # { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }} - 0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41, - 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d, -!endif - # Size: 0xe000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - - # 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0xdfb8 - # This can speed up the Variable Dispatch a bit. - 0xB8, 0xDF, 0x00, 0x00, - # FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32 - 0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -} +!include VarStore.fdf.inc -0xe000|0x1000 -#NV_EVENT_LOG -gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize - -0xf000|0x1000 -gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize -#NV_FTW_WORKING -DATA = { - # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid = - # { 0x9e58292b, 0x7c68, 0x497d, { 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95 }} - 0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49, - 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95, - # Crc:UINT32#WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved - 0x2c, 0xaf, 0x2c, 0x64, 0xFE, 0xFF, 0xFF, 0xFF, - # WriteQueueSize: UINT64 - 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -} - -0x0001|0x0001 -#NV_FTW_SPARE -gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize - !ifdef $(FD_SIZE_1MB) 0x0002|0x000CC000 FV = FVMAIN_COMPACT Modified: trunk/edk2/OvmfPkg/OvmfPkgIa32X64.fdf === --- trunk/edk2/OvmfPkg/OvmfPkgIa32X64.fdf 2014-07-22 08:19:43 UTC (rev 15668) +++ trunk/edk2/OvmfPkg/OvmfPkgIa32X64.fdf 2014-07-22 21:56:53 UTC (rev 15669) @@ -44,73 +44,8 @@ NumBlocks = 0x200 !endif -0x|0xe000 -gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize -#NV_VARIABLE_STORE -DATA = { - ## This is the EFI_FIRMWARE_VOLUME_HEADER - # ZeroVector [] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - # FileSystemGuid: gEfiSystemNvDataFvGuid = - # { 0xFFF12B8D, 0x7696, 0x4C8B, - # { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }} - 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76
SF.net SVN: edk2:[15670] trunk/edk2/OvmfPkg
Revision: 15670 http://sourceforge.net/p/edk2/code/15670 Author: jljusten Date: 2014-07-22 21:57:01 + (Tue, 22 Jul 2014) Log Message: --- OvmfPkg: build OVMF_VARS.fd, OVMF_CODE.fd, OVMF.fd OVMF_VARS.fd and OVMF_CODE.fd split the variable store and the firmware code in separate files. The PCDs' values continue to depend only on FD_SIZE_1MB vs. FD_SIZE_2MB. With the split files, it must be ensured on the QEMU command line that OVMF_VARS.fd and OVMF_CODE.fd be contiguously mapped so that they end exactly at 4GB. See QEMU commit 637a5acb (first released in v2.0.0). In this patch we must take care to assign each PCD only once. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen Modified Paths: -- trunk/edk2/OvmfPkg/OvmfPkgIa32.fdf trunk/edk2/OvmfPkg/OvmfPkgIa32X64.fdf trunk/edk2/OvmfPkg/OvmfPkgX64.fdf trunk/edk2/OvmfPkg/VarStore.fdf.inc Added Paths: --- trunk/edk2/OvmfPkg/OvmfPkg.fdf.inc Added: trunk/edk2/OvmfPkg/OvmfPkg.fdf.inc === --- trunk/edk2/OvmfPkg/OvmfPkg.fdf.inc (rev 0) +++ trunk/edk2/OvmfPkg/OvmfPkg.fdf.inc 2014-07-22 21:57:01 UTC (rev 15670) @@ -0,0 +1,62 @@ +## @file +# FDF include file that defines the main macros and sets the dependent PCDs. +# +# Copyright (C) 2014, Red Hat, Inc. +# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. +# +# 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. +# +## + +DEFINE BLOCK_SIZE= 0x1000 +DEFINE VARS_SIZE = 0x2 +DEFINE VARS_BLOCKS = 0x20 + +!ifdef $(FD_SIZE_1MB) + +DEFINE FW_BASE_ADDRESS = 0xFFF0 +DEFINE FW_SIZE = 0x0010 +DEFINE FW_BLOCKS = 0x100 +DEFINE CODE_BASE_ADDRESS = 0xFFF2 +DEFINE CODE_SIZE = 0x000E +DEFINE CODE_BLOCKS = 0xE0 +DEFINE FVMAIN_SIZE = 0x000CC000 +DEFINE SECFV_OFFSET = 0x000EC000 +DEFINE SECFV_SIZE= 0x14000 + +!else + +DEFINE FW_BASE_ADDRESS = 0xFFE0 +DEFINE FW_SIZE = 0x0020 +DEFINE FW_BLOCKS = 0x200 +DEFINE CODE_BASE_ADDRESS = 0xFFE2 +DEFINE CODE_SIZE = 0x001E +DEFINE CODE_BLOCKS = 0x1E0 +DEFINE FVMAIN_SIZE = 0x001AC000 +DEFINE SECFV_OFFSET = 0x001CC000 +DEFINE SECFV_SIZE= 0x34000 + +!endif + +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress = $(FW_BASE_ADDRESS) +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize= $(FW_SIZE) +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE) + +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase = $(FW_BASE_ADDRESS) +SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize = 0xE000 + +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize = $(BLOCK_SIZE) + +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize +SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZE) + +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize +SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = 0x1 Modified: trunk/edk2/OvmfPkg/OvmfPkgIa32.fdf === --- trunk/edk2/OvmfPkg/OvmfPkgIa32.fdf 2014-07-22 21:56:53 UTC (rev 15669) +++ trunk/edk2/OvmfPkg/OvmfPkgIa32.fdf 2014-07-22 21:57:01 UTC (rev 15670) @@ -28,38 +28,52 @@ !endif !endif -!ifdef $(FD_SIZE_1MB) +!include OvmfPkg.fdf.inc + +# +# Build the variable store and the firmware code as one unified flash device +# image. +# [FD.OVMF] -BaseAddress = 0xFFF0|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress -Size = 0x0010|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize +BaseAddress = $(FW_BASE_ADDRESS) +Size = $(FW_SIZE) ErasePolarity = 1 -BlockSize = 0x1000|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize -NumBlocks = 0x100 -!else -[FD.OVMF] -BaseAddress = 0xFFE0|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress -Size = 0x0020|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize -ErasePolarity = 1 -BlockS
SF.net SVN: edk2:[15671] trunk/edk2/IntelFrameworkModulePkg/Csm/BiosThunk/ Snp16Dxe
Revision: 15671 http://sourceforge.net/p/edk2/code/15671 Author: li-elvin Date: 2014-07-23 02:12:37 + (Wed, 23 Jul 2014) Log Message: --- Fix memory leak issues in BiosSnp module. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Elvin Li Reviewed-by: Jeff Fan Modified Paths: -- trunk/edk2/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.c trunk/edk2/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Misc.c Modified: trunk/edk2/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.c === --- trunk/edk2/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.c 2014-07-22 21:57:01 UTC (rev 15670) +++ trunk/edk2/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.c 2014-07-23 02:12:37 UTC (rev 15671) @@ -1,6 +1,6 @@ /** @file -Copyright (c) 1999 - 2012, Intel Corporation. All rights reserved. +Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions @@ -1260,6 +1260,11 @@ if (!EFI_ERROR (Status)) { return EFI_SUCCESS; } + +// +// Free resources allocated in LaunchBaseCode +// +Undi16SimpleNetworkUnloadUndi (SimpleNetworkDevice); } return EFI_NOT_FOUND; Modified: trunk/edk2/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Misc.c === --- trunk/edk2/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Misc.c 2014-07-22 21:57:01 UTC (rev 15670) +++ trunk/edk2/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Misc.c 2014-07-23 02:12:37 UTC (rev 15671) @@ -1,7 +1,7 @@ /** @file Helper Routines that use a PXE-enabled NIC option ROM. -Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved. +Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions @@ -743,6 +743,11 @@ InOutRegs.X.AX) ); + if ((UndiLoaderTable->Status != 0) || (InOutRegs.X.AX != PXENV_EXIT_SUCCESS)) { +DEBUG ((DEBUG_NET, "LaunchBaseCode exits with error, RomAddress = 0x%X\n\r", RomAddress)); +return EFI_ABORTED; + } + DEBUG ((DEBUG_NET, "Now returned from the UNDI code\n\r")); DEBUG ((DEBUG_NET, "After the call, we have...\n\r")); @@ -755,8 +760,9 @@ Pxe = (PXE_T *)(UINTN)((UndiLoaderTable->PXEptr.Segment << 4) + UndiLoaderTable->PXEptr.Offset); SimpleNetworkDevice->Nii.Id = (UINT64)(UINTN) Pxe; + gBS->FreePool (Buffer); + // - // FreePool (Buffer); // paranoia - make sure a valid !PXE structure // if (CompareMem (Pxe->Signature, PXE_SIG, sizeof Pxe->Signature) != 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits
SF.net SVN: edk2:[15672] trunk/edk2/OptionRomPkg/CirrusLogic5430Dxe/Edid.c
Revision: 15672 http://sourceforge.net/p/edk2/code/15672 Author: vanjeff Date: 2014-07-23 02:13:14 + (Wed, 23 Jul 2014) Log Message: --- Fix wrong usage sizeof(SIZE). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sergey Isakov Signed-off-by: Jeff Fan Reviewed-by: Sergey Isakov Reviewed-by: Jeff Fan Reviewed-by: Ruiyu Ni Modified Paths: -- trunk/edk2/OptionRomPkg/CirrusLogic5430Dxe/Edid.c Modified: trunk/edk2/OptionRomPkg/CirrusLogic5430Dxe/Edid.c === --- trunk/edk2/OptionRomPkg/CirrusLogic5430Dxe/Edid.c 2014-07-23 02:12:37 UTC (rev 15671) +++ trunk/edk2/OptionRomPkg/CirrusLogic5430Dxe/Edid.c 2014-07-23 02:13:14 UTC (rev 15672) @@ -1,7 +1,7 @@ /** @file Read EDID information and parse EDID information. - Copyright (c) 2008, Intel Corporation. All rights reserved. + Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved. 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 @@ -141,7 +141,7 @@ } *EdidDataBlock = AllocateCopyPool ( - sizeof (EDID_BLOCK_SIZE), + EDID_BLOCK_SIZE, ValidEdid ); if (*EdidDataBlock == NULL) { @@ -370,7 +370,7 @@ // // Allocate double size of VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE to avoid overflow // -EdidOverrideDataBlock = AllocatePool (sizeof (EDID_BLOCK_SIZE * 2)); +EdidOverrideDataBlock = AllocatePool (EDID_BLOCK_SIZE * 2); if (NULL == EdidOverrideDataBlock) { Status = EFI_OUT_OF_RESOURCES; goto Done; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits