From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Xu, Wei6" <wei6.xu@intel.com>
Cc: "Wang, Jian J" <jian.j.wang@intel.com>,
"Zhang, Chao B" <chao.b.zhang@intel.com>
Subject: Re: [edk2-devel][Patch v2 2/7] MdeModulePkg: Add Capsule On Disk related definition.
Date: Wed, 12 Jun 2019 07:48:22 +0000 [thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A093C8EDB9E@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190605154203.11012-3-wei6.xu@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Xu,
> Wei6
> Sent: Wednesday, June 05, 2019 11:42 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J; Wu, Hao A; Zhang, Chao B; Xu, Wei6
> Subject: [edk2-devel][Patch v2 2/7] MdeModulePkg: Add Capsule On Disk
> related definition.
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852
>
> This patch will add Capsule On Disk related definition, including
> GUID, PPI and PCDs:
> The Capsule On Disk Name GUID indicates the capsule is to store
> Capsule On Disk file names.
> The Pei Capsule On Disk PPI provides service to retrieve capsules
> from Capsule On Disk temp relocation file on mass storage devices
> and create capsule hob for these capsules.
> PcdCapsuleOnDiskSupport is used to enable/disable Capsule On Disk.
> PcdCapsuleInRamSupport is used to enabble/disable Capsule In Ram.
enabble -> enable
May I know the reason that PcdCapsuleOnDiskSupport is listed under section
'[PcdsFixedAtBuild, PcdsPatchableInModule]' while PcdCapsuleInRamSupport
is listed under
'[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]'?
Best Regards,
Hao Wu
> PcdCoDRelocationFileName specifies the Capsule On Disk temp
> relocation file name.
> PcdCodRelocationDevPath specifies platform specific device to store
> Capsule On Disk tem relocation file.
>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Chao B Zhang <chao.b.zhang@intel.com>
> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
> ---
> MdeModulePkg/Include/Ppi/CapsuleOnDisk.h | 48
> ++++++++++++++++++++++++++++++++
> MdeModulePkg/MdeModulePkg.dec | 43
> ++++++++++++++++++++++++++++
> MdeModulePkg/MdeModulePkg.uni | 32 +++++++++++++++++++++
> 3 files changed, 123 insertions(+)
> create mode 100644 MdeModulePkg/Include/Ppi/CapsuleOnDisk.h
>
> diff --git a/MdeModulePkg/Include/Ppi/CapsuleOnDisk.h
> b/MdeModulePkg/Include/Ppi/CapsuleOnDisk.h
> new file mode 100644
> index 0000000000..28be6e42be
> --- /dev/null
> +++ b/MdeModulePkg/Include/Ppi/CapsuleOnDisk.h
> @@ -0,0 +1,48 @@
> +/** @file
> + This file declares Capsule On Disk PPI. This PPI is used to find and load the
> + capsule on files that are relocated into a temp file under rootdir.
> +
> + Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef __PEI_CAPSULE_ON_DISK_PPI_H__
> +#define __PEI_CAPSULE_ON_DISK_PPI_H__
> +
> +#define EFI_PEI_CAPSULE_ON_DISK_PPI_GUID \
> + { \
> + 0x71a9ea61, 0x5a35, 0x4a5d, {0xac, 0xef, 0x9c, 0xf8, 0x6d, 0x6d, 0x67,
> 0xe0 } \
> + }
> +
> +typedef struct _EFI_PEI_CAPSULE_ON_DISK_PPI
> EFI_PEI_CAPSULE_ON_DISK_PPI;
> +
> +/**
> + Loads a DXE capsule from some media into memory and updates the HOB
> table
> + with the DXE firmware volume information.
> +
> + @param PeiServices General-purpose services that are available to every
> PEIM.
> + @param This Indicates the EFI_PEI_RECOVERY_MODULE_PPI instance.
> +
> + @retval EFI_SUCCESS The capsule was loaded correctly.
> + @retval EFI_DEVICE_ERROR A device error occurred.
> + @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EFI_PEI_LOAD_CAPSULE_ON_DISK)(
> + IN EFI_PEI_SERVICES **PeiServices,
> + IN EFI_PEI_CAPSULE_ON_DISK_PPI *This
> + );
> +
> +///
> +/// Finds and loads the recovery files.
> +///
> +struct _EFI_PEI_CAPSULE_ON_DISK_PPI {
> + EFI_PEI_LOAD_CAPSULE_ON_DISK LoadCapsuleOnDisk; ///< Loads a DXE
> binary capsule into memory.
> +};
> +
> +extern EFI_GUID gEdkiiPeiCapsuleOnDiskPpiGuid;
> +
> +#endif
> diff --git a/MdeModulePkg/MdeModulePkg.dec
> b/MdeModulePkg/MdeModulePkg.dec
> index 6cba729982..d80b728313 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -394,10 +394,13 @@
> gEdkiiS3SmmInitDoneGuid = { 0x8f9d4825, 0x797d, 0x48fc, { 0x84, 0x71,
> 0x84, 0x50, 0x25, 0x79, 0x2e, 0xf6 } }
>
> ## Include/Guid/S3StorageDeviceInitList.h
> gS3StorageDeviceInitListGuid = { 0x310e9b8c, 0xcf90, 0x421e, { 0x8e, 0x9b,
> 0x9e, 0xef, 0xb6, 0x17, 0xc8, 0xef } }
>
> + ## GUID indicates the capsule is to store Capsule On Disk file names.
> + gEdkiiCapsuleOnDiskNameGuid = { 0x98c80a4f, 0xe16b, 0x4d11, { 0x93,
> 0x9a, 0xab, 0xe5, 0x61, 0x26, 0x3, 0x30 } }
> +
> [Ppis]
> ## Include/Ppi/AtaController.h
> gPeiAtaControllerPpiGuid = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a,
> 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}
>
> ## Include/Ppi/UsbHostController.h
> @@ -464,10 +467,13 @@
> gEdkiiPeiAtaPassThruPpiGuid = { 0xa16473fd, 0xd474, 0x4c89, { 0xae,
> 0xc7, 0x90, 0xb8, 0x3c, 0x73, 0x86, 0x9 } }
>
> ## Include/Ppi/Debug.h
> gEdkiiDebugPpiGuid = { 0x999e699c, 0xb013, 0x475e, { 0xb1,
> 0x7b, 0xf3, 0xa8, 0xae, 0x5c, 0x48, 0x75 } }
>
> + ## Include/Ppi/CapsuleOnDisk.h
> + gEdkiiPeiCapsuleOnDiskPpiGuid = {0x71a9ea61, 0x5a35, 0x4a5d,
> {0xac, 0xef, 0x9c, 0xf8, 0x6d, 0x6d, 0x67, 0xe0}}
> +
> [Protocols]
> ## Load File protocol provides capability to load and unload EFI image into
> memory and execute it.
> # Include/Protocol/LoadPe32Image.h
> # This protocol is deprecated. Native EDKII module should NOT use this
> protocol to load/unload image.
> # If developer need implement such functionality, they should use
> BasePeCoffLib.
> @@ -1473,10 +1479,26 @@
>
> ## Indicates the allowable maximum number of Reset Filters, Reset
> Notifications or Reset Handlers in PEI phase.
> # @Prompt Maximum Number of PEI Reset Filters, Reset Notifications or
> Reset Handlers.
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdMaximumPeiResetNotifies|0x10|UI
> NT32|0x0000010A
>
> + ## Capsule On Disk is to deliver capsules via files on Mass Storage
> device.<BR><BR>
> + # This PCD indicates if the Capsule On Disk is supported.<BR>
> + # TRUE - Capsule On Disk is supported.<BR>
> + # FALSE - Capsule On Disk is not supported.<BR>
> + # If platform does not use this feature, this PCD should be set to
> FALSE.<BR><BR>
> + # Two sulotions to deliver Capsule On Disk:<BR>
> + # a) If PcdCapsuleInRamSupport = TRUE, Load Capsule On Disk image out
> of TCB, and reuse
> + # Capsule In Ram to deliver capsule.<BR>
> + # b) If PcdCapsuleInRamSupport = FALSE, Relocate Capsule On Disk image
> to RootDir out
> + # of TCB, and reuse FatPei to load capsules from external storage.<BR>
> + # Note:<BR>
> + # If Both Capsule In Ram and Capsule On Disk are provisioned at the same
> time, the Capsule
> + # On Disk will be bypassed.
> + # @Prompt Enable Capsule On Disk support.
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleOnDiskSupport|FALSE|BOO
> LEAN|0x0000002d
> +
> [PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> ## This PCD defines the Console output row. The default value is 25
> according to UEFI spec.
> # This PCD could be set to 0 then console output would be at max column
> and max row.
> # @Prompt Console output row.
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|25|UINT32|0x4000000
> 6
> @@ -1932,10 +1954,17 @@
> # The file name must be the 8.3 format.
> # The PCD data must be in UNICODE format.
> # @Prompt Recover file name in PEI phase
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"FVMAIN.FV"|
> VOID*|0x30001045
>
> + ## This is Capsule Temp Relocation file name in PEI phase.
> + # The file must be in the root directory.
> + # The file name must be the 8.3 format.
> + # The PCD data must be in UNICODE format.
> + # @Prompt Capsule On Disk Temp Relocation file name in PEI phase
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCoDRelocationFileName|L"TempCo
> d.tmp"|VOID*|0x30001048
> +
> ## This PCD hold a list GUIDs for the ImageTypeId to indicate the
> # FMP capsule is a system FMP.
> # @Prompt A list of system FMP ImageTypeId GUIDs
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGu
> id|{0x0}|VOID*|0x30001046
>
> @@ -1943,10 +1972,24 @@
> # enabled on AMD processors supporting the Secure Encrypted
> Virtualization (SEV) feature.
> # This mask should be applied when creating 1:1 virtual to physical mapping
> tables.
> # @Prompt The address mask when memory encryption is enabled.
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrM
> ask|0x0|UINT64|0x30001047
>
> + ## Capsule In Ram is to use memory to deliver the capsules that will be
> processed after system
> + # reset.<BR><BR>
> + # This PCD indicates if the Capsule In Ram is supported.<BR>
> + # TRUE - Capsule In Ram is supported.<BR>
> + # FALSE - Capsule In Ram is not supported.
> + # @Prompt Enable Capsule In Ram support.
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleInRamSupport|TRUE|BOOL
> EAN|0x0000002e
> +
> + ## Full device path of plaform specific device to store Capsule On Disk
> temp relocation file.<BR>
> + # If this PCD is set, Capsule On Disk temp relocation file will be stored in
> the device specified
> + # by this PCD, instead of the EFI System Partition that stores capsule image
> file.
> + # @Prompt Capsule On Disk relocation device path.
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdCodRelocationDevPath|{0xFF}|VOI
> D*|0x0000002f
> +
> [PcdsPatchableInModule]
> ## Specify memory size with page number for PEI code when
> # Loading Module at Fixed Address feature is enabled.
> # The value will be set by the build tool.
> # @Prompt LMFA PEI code page number.
> diff --git a/MdeModulePkg/MdeModulePkg.uni
> b/MdeModulePkg/MdeModulePkg.uni
> index ed8ac9eadc..85c6beae0d 100644
> --- a/MdeModulePkg/MdeModulePkg.uni
> +++ b/MdeModulePkg/MdeModulePkg.uni
> @@ -1064,10 +1064,17 @@
> #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdRecoveryFileName_HELP
> #language en-US "This is recover file name in PEI phase.\n"
> "The file must be in the root
> directory.\n"
> "The file name must be the 8.3
> format.\n"
> "The PCD data must be in
> UNICODE format."
>
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCoDRelocationFileName_PRO
> MPT #language en-US "Capsule On Disk Temp Relocation file name in PEI
> phase"
> +
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCoDRelocationFileName_HELP
> #language en-US "This is Capsule Temp Relocation file name in PEI phase.\n"
> + "The file must be in the root
> directory.\n"
> + "The file name must be the 8.3
> format.\n"
> + "The PCD data must be in
> UNICODE format."
> +
> #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSystemFmpCapsuleImageTyp
> eIdGuid_PROMPT #language en-US "A list of system FMP ImageTypeId
> GUIDs"
>
> #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSystemFmpCapsuleImageTyp
> eIdGuid_HELP #language en-US "This PCD hold a list GUIDs for the
> ImageTypeId to indicate the\n"
> "FMP capsule is a system
> FMP."
>
> @@ -1129,10 +1136,35 @@
>
> #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPteMemoryEncryptionAddres
> sOrMask_HELP #language en-US "This PCD holds the address mask for page
> table entries when memory encryption is\n"
> "enabled on AMD
> processors supporting the Secure Encrypted Virtualization (SEV) feature.\n"
> "This mask should be
> applied when creating 1:1 virtual to physical mapping tables."
>
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCapsuleOnDiskSupport_PRO
> MPT #language en-US "Enable Capsule On Disk support"
> +
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCapsuleOnDiskSupport_HELP
> #language en-US "Capsule On Disk is to deliver capsules via files on Mass
> Storage device.<BR><BR>"
> + "This PCD indicates if the
> Capsule On Disk is supported.<BR>"
> + " TRUE - Capsule On Disk is
> supported.<BR>"
> + " FALSE - Capsule On Disk is not
> supported.<BR>"
> + "If platform does not use this
> feature, this PCD should be set to FALSE.<BR><BR>"
> + "Two sulotions to deliver
> Capsule On Disk:<BR>"
> + " a) If
> PcdCapsuleInRamSupport = TRUE, Load Capsule On Disk image out of TCB,
> and reuse Capsule In Ram to deliver capsule.<BR>"
> + " b) If
> PcdCapsuleInRamSupport = FALSE, Relocate Capsule On Disk image to
> RootDir out of TCB, and reuse FatPei to load capsules from external
> storage.<BR>"
> + "Note:<BR>"
> + "If Both Capsule In Ram and
> Capsule On Disk are provisioned at the same time, the Capsule On Disk will
> be bypassed."
> +
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCapsuleInRamSupport_PROM
> PT #language en-US "Enable Capsule In Ram support"
> +
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCapsuleInRamSupport_HELP
> #language en-US "Capsule In Ram is to use memory to deliver the capsules
> that will be processed after system reset.<BR><BR>"
> + "This PCD indicates if the
> Capsule In Ram is supported.<BR>"
> + " TRUE - Capsule In Ram is
> supported.<BR>"
> + " FALSE - Capsule In Ram is not
> supported."
> +
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCodRelocationDevPath_PRO
> MPT #language en-US "Capsule On Disk relacation device path."
> +
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdCodRelocationDevPath_HELP
> #language en-US "Full device path of plaform specific device to store
> Capsule On Disk temp relocation file.<BR>"
> + "If this PCD is set, Capsule On
> Disk temp relocation file will be stored in the device specified by this PCD,
> instead of the EFI System Partition that stores capsule image file."
> +
> #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdNullPointerDetectionProperty
> Mask_PROMPT #language en-US "Enable NULL pointer detection"
>
> #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdNullPointerDetectionProperty
> Mask_HELP #language en-US "Mask to control the NULL address detection
> in code for different phases.\n"
> " If enabled, accessing
> NULL address in UEFI or SMM code can be caught.\n\n"
> " BIT0 - Enable NULL
> pointer detection for UEFI.\n"
> --
> 2.16.2.windows.1
>
>
>
next prev parent reply other threads:[~2019-06-12 7:49 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 15:41 [edk2-devel][Patch v2 0/7] Implement Capsule On Disk Xu, Wei6
2019-06-05 15:41 ` [edk2-devel][Patch v2 1/7] MdePkg: Add Pei Boot In CapsuleOnDisk Mode Ppi definition Xu, Wei6
2019-06-05 21:42 ` Felix Polyudov
2019-06-12 7:48 ` Wu, Hao A
2019-06-12 8:28 ` Liming Gao
2019-06-05 15:41 ` [edk2-devel][Patch v2 2/7] MdeModulePkg: Add Capsule On Disk related definition Xu, Wei6
2019-06-12 7:48 ` Wu, Hao A [this message]
2019-06-12 8:43 ` Xu, Wei6
2019-06-05 15:41 ` [edk2-devel][Patch v2 3/7] MdeModulePkg: Add CapsuleOnDiskLoadPei PEIM Xu, Wei6
2019-06-12 7:49 ` Wu, Hao A
2019-06-19 8:40 ` Xu, Wei6
2019-06-19 8:59 ` Ni, Ray
2019-06-20 0:59 ` Wu, Hao A
2019-06-05 15:42 ` [edk2-devel][Patch v2 4/7] MdeModulePkg/BdsDxe: Support Capsule On Disk Xu, Wei6
2019-06-05 15:42 ` [edk2-devel][Patch v2 5/7] MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature Xu, Wei6
2019-06-12 7:49 ` Wu, Hao A
2019-06-19 0:41 ` Zhang, Chao B
2019-06-19 0:59 ` Wu, Hao A
2019-06-19 1:13 ` Zhang, Chao B
2019-06-19 2:22 ` Wu, Hao A
2019-06-05 15:42 ` [edk2-devel][Patch v2 6/7] MdeModulePkg/DxeIpl: Support Capsule On Disk Xu, Wei6
2019-06-12 7:49 ` Wu, Hao A
2019-06-05 15:42 ` [edk2-devel][Patch v2 7/7] MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib Xu, Wei6
2019-06-12 7:49 ` Wu, Hao A
2019-06-19 7:55 ` Xu, Wei6
2019-06-19 8:16 ` Wu, Hao A
2019-06-19 8:19 ` Wu, Hao A
2019-06-19 8:23 ` Xu, Wei6
2019-06-05 21:53 ` [edk2-devel][Patch v2 0/7] Implement Capsule On Disk Felix Polyudov
2019-06-05 22:36 ` Michael D Kinney
2019-06-06 1:23 ` Zhang, Chao B
2019-06-12 7:47 ` Wu, Hao A
2019-06-12 8:13 ` Zhang, Chao B
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B80AF82E9BFB8E4FBD8C89DA810C6A093C8EDB9E@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox