public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Huangming (Mark)" <huangming23@huawei.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ming Huang <heyi.guo@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	linaro-uefi <linaro-uefi@lists.linaro.org>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Graeme Gregory <graeme.gregory@linaro.org>, <guoheyi@huawei.com>,
	wanghuiqiang <wanghuiqiang@huawei.com>,
	Jason Zhang <zhangjinsong2@huawei.com>,
	Mengfanrong <mengfanrong@huawei.com>, <waip23@126.com>
Subject: Re: [PATCH edk2-platforms v1 04/14] Hisilicon D03/D05: Add capsule upgrade support
Date: Thu, 25 Jan 2018 08:53:00 +0800	[thread overview]
Message-ID: <7d865fe4-9fc3-9869-9496-9a94e96813c9@huawei.com> (raw)
In-Reply-To: <CAKv+Gu9AU231KMyjytS_0NDH+aByLJd5Zy6LCiYq5RrbUMHvuQ@mail.gmail.com>



On 2018/1/24 19:21, Ard Biesheuvel wrote:
> On 24 January 2018 at 11:10, Huangming (Mark) <huangming23@huawei.com> wrote:
>>
>>
>> On 2018/1/20 18:50, Ard Biesheuvel wrote:
>>> On 18 January 2018 at 15:01, Ming Huang <heyi.guo@linaro.org> wrote:
>>>> From: Jason Zhang <zhangjinsong2@huawei.com>
>>>>
>>>> Contributed-under: TianoCore Contribution Agreement 1.1
>>>> Signed-off-by: Jason Zhang <zhangjinsong2@huawei.com>
>>>> Signed-off-by: Ming Huang <huangming23@huawei.com>
>>>> Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
>>>> ---
>>>>  Platform/Hisilicon/D03/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini |  45 +++++++++
>>>>  Platform/Hisilicon/D03/D03.dsc                                                           |  17 +++-
>>>>  Platform/Hisilicon/D03/D03.fdf                                                           |  70 +++++++++++++
>>>>  Platform/Hisilicon/D05/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini |  45 +++++++++
>>>>  Platform/Hisilicon/D05/D05.dsc                                                           |  19 +++-
>>>>  Platform/Hisilicon/D05/D05.fdf                                                           |  70 +++++++++++++
>>>>  Silicon/Hisilicon/Drivers/SystemFirmwareDescriptor/SystemFirmwareDescriptor.aslc         |  81 +++++++++++++++
>>>>  Silicon/Hisilicon/Drivers/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf          |  50 +++++++++
>>>>  Silicon/Hisilicon/Drivers/SystemFirmwareDescriptor/SystemFirmwareDescriptorPei.c         |  70 +++++++++++++
>>>>  Silicon/Hisilicon/Hisilicon.dsc.inc                                                      |  11 +-
>>>>  Silicon/Hisilicon/Hisilicon.fdf.inc                                                      |   9 ++
>>>>  Silicon/Hisilicon/Library/PlatformFlashAccessLib/PlatformFlashAccessLibDxe.c             | 106 ++++++++++++++++++++
>>>>  Silicon/Hisilicon/Library/PlatformFlashAccessLib/PlatformFlashAccessLibDxe.inf           |  51 ++++++++++
>>>>  13 files changed, 641 insertions(+), 3 deletions(-)
>>>>
>>>
>>> Excellent!! Very happy to see this added.
>>>
>>>> diff --git a/Platform/Hisilicon/D03/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini b/Platform/Hisilicon/D03/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
>>>> new file mode 100644
>>>> index 0000000..fc834d9
>>>> --- /dev/null
>>>> +++ b/Platform/Hisilicon/D03/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
>>>> @@ -0,0 +1,45 @@
>>>> +#
>>>> +#  Copyright (c) 2018, Hisilicon Limited. All rights reserved.
>>>> +#  Copyright (c) 2018, Linaro Limited. All rights reserved.
>>>> +#  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.
>>>> +#
>>>> +##
>>>> +
>>>> +[Head]
>>>> +NumOfUpdate = 3
>>>> +NumOfRecovery = 0
>>>> +Update0 = SysFvMain
>>>> +Update1 = SysCustom
>>>> +Update2 = SysNvRam
>>>> +
>>>> +[SysFvMain]
>>>> +FirmwareType  = 0             # 0 - SystemFirmware, 1 - NvRam
>>>> +AddressType   = 0             # 0 - relative address, 1 - absolute address.
>>>> +BaseAddress   = 0x00000000    # Base address offset on flash
>>>> +Length        = 0x002D0000    # Length
>>>> +ImageOffset   = 0x00000000    # Image offset of this SystemFirmware image
>>>> +FileGuid      = 642e4fcf-2df7-4415-8b70-a03909c57b55  # PcdEdkiiSystemFirmwareFileGuid
>>>> +
>>>> +[SysCustom]
>>>> +FirmwareType  = 0             # 0 - SystemFirmware, 1 - NvRam
>>>> +AddressType   = 0             # 0 - relative address, 1 - absolute address.
>>>> +BaseAddress   = 0x002F0000    # Base address offset on flash
>>>> +Length        = 0x00010000    # Length
>>>> +ImageOffset   = 0x002F0000    # Image offset of this SystemFirmware image
>>>> +FileGuid      = 642e4fcf-2df7-4415-8b70-a03909c57b55  # PcdEdkiiSystemFirmwareFileGuid
>>>> +
>>>> +[SysNvRam]
>>>> +FirmwareType  = 1             # 0 - SystemFirmware, 1 - NvRam
>>>> +AddressType   = 0             # 0 - relative address, 1 - absolute address.
>>>> +BaseAddress   = 0x002D0000    # Base address offset on flash
>>>> +Length        = 0x00020000    # Length
>>>> +ImageOffset   = 0x002D0000    # Image offset of this SystemFirmware image
>>>> +FileGuid      = 642e4fcf-2df7-4415-8b70-a03909c57b55  # PcdEdkiiSystemFirmwareFileGuid
>>>> diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
>>>> index b2eae7d..69bc7b4 100644
>>>> --- a/Platform/Hisilicon/D03/D03.dsc
>>>> +++ b/Platform/Hisilicon/D03/D03.dsc
>>>> @@ -66,7 +66,6 @@
>>>>    OemAddressMapLib|Platform/Hisilicon/D03/Library/OemAddressMap2P/OemAddressMap2PHi1610.inf
>>>>    PlatformSysCtrlLib|Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf
>>>>
>>>> -  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
>>>>    GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
>>>>    PlatformBdsLib|Silicon/Hisilicon/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
>>>>  !if $(GENERIC_BDS) == TRUE
>>>> @@ -117,6 +116,11 @@
>>>>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
>>>>    gHisiTokenSpaceGuid.PcdIsItsSupported|TRUE
>>>>
>>>> +[PcdsDynamicExDefault.common.DEFAULT]
>>>> +  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor|{0x0}|VOID*|0x100
>>>> +  gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{0x29, 0x3d, 0x4b, 0xd3, 0x85, 0x00, 0xb3, 0x4a, 0x8b, 0xe8, 0x84, 0x18, 0x8c, 0xc5, 0x04, 0x89}
>>>> +  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{0xcf, 0x4f, 0x2e, 0x64, 0xf7, 0x2d, 0x15, 0x44, 0x8b, 0x70, 0xa0, 0x39, 0x09, 0xc5, 0x7b, 0x55}
>>>> +
>>>>  [PcdsFixedAtBuild.common]
>>>>    gArmPlatformTokenSpaceGuid.PcdCoreCount|8
>>>>
>>>> @@ -310,6 +314,8 @@
>>>>    Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.inf
>>>>    Silicon/Hisilicon/Drivers/VersionInfoPeim/VersionInfoPeim.inf
>>>>
>>>> +  Silicon/Hisilicon/Drivers/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>>>> +
>>>>    MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {
>>>>      <LibraryClasses>
>>>>        NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
>>>> @@ -410,6 +416,9 @@
>>>>
>>>>    Platform/Hisilicon/D03/Drivers/Sas/SasDxeDriver.inf
>>>>
>>>> +  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf
>>>> +  MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf
>>>> +
>>>>    #
>>>>    # FAT filesystem + GPT/MBR partitioning
>>>>    #
>>>> @@ -483,6 +492,12 @@
>>>>  !else
>>>>    IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
>>>>  !endif
>>>> +  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf {
>>>> +    <LibraryClasses>
>>>> +      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
>>>> +  }
>>>> +
>>>> +  MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf
>>>>
>>>>    #
>>>>    # UEFI application (Shell Embedded Boot Loader)
>>>> diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf
>>>> index 0d704b5..ffddd2d 100644
>>>> --- a/Platform/Hisilicon/D03/D03.fdf
>>>> +++ b/Platform/Hisilicon/D03/D03.fdf
>>>> @@ -275,6 +275,8 @@ READ_LOCK_STATUS   = TRUE
>>>>    INF Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.inf
>>>>    INF Platform/Hisilicon/D03/Drivers/Sas/SasDxeDriver.inf
>>>>
>>>> +  INF SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf
>>>> +  INF MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf
>>>>    #
>>>>    # Build Shell from latest source code instead of prebuilt binary
>>>>    #
>>>> @@ -336,12 +338,80 @@ READ_LOCK_STATUS   = TRUE
>>>>
>>>>    INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
>>>>
>>>> +  INF RuleOverride = FMP_IMAGE_DESC Silicon/Hisilicon/Drivers/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
>>>> +
>>>>    FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
>>>>      SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
>>>>        SECTION FV_IMAGE = FVMAIN
>>>>      }
>>>>    }
>>>>
>>>> +[FV.CapsuleDispatchFv]
>>>> +FvAlignment        = 16
>>>> +ERASE_POLARITY     = 1
>>>> +MEMORY_MAPPED      = TRUE
>>>> +STICKY_WRITE       = TRUE
>>>> +LOCK_CAP           = TRUE
>>>> +LOCK_STATUS        = TRUE
>>>> +WRITE_DISABLED_CAP = TRUE
>>>> +WRITE_ENABLED_CAP  = TRUE
>>>> +WRITE_STATUS       = TRUE
>>>> +WRITE_LOCK_CAP     = TRUE
>>>> +WRITE_LOCK_STATUS  = TRUE
>>>> +READ_DISABLED_CAP  = TRUE
>>>> +READ_ENABLED_CAP   = TRUE
>>>> +READ_STATUS        = TRUE
>>>> +READ_LOCK_CAP      = TRUE
>>>> +READ_LOCK_STATUS   = TRUE
>>>> +
>>>> +  INF SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf
>>>> +
>>>> +[FV.SystemFirmwareUpdateCargo]
>>>> +FvAlignment        = 16
>>>> +ERASE_POLARITY     = 1
>>>> +MEMORY_MAPPED      = TRUE
>>>> +STICKY_WRITE       = TRUE
>>>> +LOCK_CAP           = TRUE
>>>> +LOCK_STATUS        = TRUE
>>>> +WRITE_DISABLED_CAP = TRUE
>>>> +WRITE_ENABLED_CAP  = TRUE
>>>> +WRITE_STATUS       = TRUE
>>>> +WRITE_LOCK_CAP     = TRUE
>>>> +WRITE_LOCK_STATUS  = TRUE
>>>> +READ_DISABLED_CAP  = TRUE
>>>> +READ_ENABLED_CAP   = TRUE
>>>> +READ_STATUS        = TRUE
>>>> +READ_LOCK_CAP      = TRUE
>>>> +READ_LOCK_STATUS   = TRUE
>>>> +
>>>> +  FILE RAW = 642e4fcf-2df7-4415-8b70-a03909c57b55 { # PcdEdkiiSystemFirmwareFileGuid
>>>> +    FD = D03
>>>> +  }
>>>> +
>>>> +  FILE RAW = ce57b167-b0e4-41e8-a897-5f4feb781d40 { # gEdkiiSystemFmpCapsuleDriverFvFileGuid
>>>> +    FV = CapsuleDispatchFv
>>>> +  }
>>>> +
>>>> +  FILE RAW = 812136D3-4D3A-433A-9418-29BB9BF78F6E { # gEdkiiSystemFmpCapsuleConfigFileGuid
>>>> +    Platform/Hisilicon/D03/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
>>>> +  }
>>>> +
>>>> +[FmpPayload.FmpPayloadSystemFirmwarePkcs7]
>>>> +IMAGE_HEADER_INIT_VERSION = 0x02
>>>> +IMAGE_TYPE_ID             = d34b3d29-0085-4ab3-8be8-84188cc50489 # PcdSystemFmpCapsuleImageTypeIdGuid
>>>
>>> Use a fresh GUID here, and make sure you use a different one for D03/D05 etc.
>>>
>>> This is what identifies the platform when using fwupdmgr etc.
>>>
>>>
>>
>> IMAGE_TYPE_ID in D0x.fdf is need to equal to IMAGE_TYPE_ID_GUID in
>> Silicon/Hisilicon/Drivers/SystemFirmwareDescriptor/SystemFirmwareDescriptor.aslc,
>> so D0x is used the same guid.
> 
> No. Instead, you need a different version of
> SystemFirmwareDescriptor.aslc for D03 and D05, and use different GUIDs
> for each.
> 
> .
> 

OK,I will move the SystemFirmwareDescriptor from Silicon/Hisilicon/Drivers/ to
Platform/Hisilicon/D03/Drivers/and Platform/Hisilicon/D05/Drivers/.
and use different guids for each.

Thanks.

-- 
Best Regards,

Ming



  reply	other threads:[~2018-01-25  0:47 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 15:01 [PATCH edk2-platforms v1 00/14] Improve D0x platforms and bug fix Ming Huang
2018-01-18 15:01 ` [PATCH edk2-platforms v1 01/14] Hisilicon/D05: Add PPTT support Ming Huang
2018-01-20 10:16   ` Ard Biesheuvel
2018-01-22  9:16     ` Huangming (Mark)
2018-01-23  6:00     ` Huangming (Mark)
2018-01-22 13:53   ` Leif Lindholm
2018-01-22 14:15     ` Leif Lindholm
2018-01-24 13:49     ` graeme.gregory
2018-01-23 21:29   ` Jeremy Linton
2018-01-24  7:57     ` Huangming (Mark)
2018-01-25  5:56     ` Huangming (Mark)
2018-01-25 15:27       ` Jeremy Linton
2018-01-18 15:01 ` [PATCH edk2-platforms v1 02/14] Hisilicon D03/D05:Switch to Generic BDS driver Ming Huang
2018-01-20 10:27   ` Ard Biesheuvel
2018-01-22 18:38   ` Leif Lindholm
2018-01-23  6:03     ` Huangming (Mark)
2018-01-18 15:01 ` [PATCH edk2-platforms v1 03/14] Hisilicon D03/D05: Optimize the feature of BMC set boot option Ming Huang
2018-01-20 10:41   ` Ard Biesheuvel
2018-01-23  8:28     ` Huangming (Mark)
2018-01-23 10:28   ` Leif Lindholm
2018-01-23 10:51     ` Huangming (Mark)
2018-01-18 15:01 ` [PATCH edk2-platforms v1 04/14] Hisilicon D03/D05: Add capsule upgrade support Ming Huang
2018-01-20 10:50   ` Ard Biesheuvel
2018-01-23  8:53     ` Huangming (Mark)
2018-01-23  9:33       ` Ard Biesheuvel
2018-01-24 11:10     ` Huangming (Mark)
2018-01-24 11:21       ` Ard Biesheuvel
2018-01-25  0:53         ` Huangming (Mark) [this message]
2018-01-23 14:06   ` Leif Lindholm
2018-01-18 15:01 ` [PATCH edk2-platforms v1 05/14] Hisilicon D03/D05: Open SasPlatform source code Ming Huang
2018-01-20 10:57   ` Ard Biesheuvel
2018-01-23 11:01     ` Huangming (Mark)
2018-01-23 14:04   ` Leif Lindholm
2018-01-18 15:01 ` [PATCH edk2-platforms v1 06/14] Hisilicon D03/D05: Open SnpPlatform " Ming Huang
2018-01-20 11:00   ` Ard Biesheuvel
2018-01-23 11:01     ` Huangming (Mark)
2018-01-23 14:07   ` Leif Lindholm
2018-01-24 12:31     ` Huangming (Mark)
2018-01-24 13:47       ` Leif Lindholm
2018-01-18 15:01 ` [PATCH edk2-platforms v1 07/14] Hisilicon/Smbios: modify type 4 Ming Huang
2018-01-20 11:01   ` Ard Biesheuvel
2018-01-23 14:15   ` Leif Lindholm
2018-01-18 15:01 ` [PATCH edk2-platforms v1 08/14] Hisilicon/PCIe: Disable PCIe ASPM Ming Huang
2018-01-20 11:04   ` Ard Biesheuvel
2018-01-18 15:01 ` [PATCH edk2-platforms v1 09/14] Hisilicon/D05: Replace SP805Watchdog by WatchdogTimer driver Ming Huang
2018-01-20 11:05   ` Ard Biesheuvel
2018-01-23 14:21   ` Leif Lindholm
2018-01-18 15:01 ` [PATCH edk2-platforms v1 10/14] Hisilicon/D03: " Ming Huang
2018-01-20 11:05   ` Ard Biesheuvel
2018-01-23 14:21   ` Leif Lindholm
2018-01-18 15:01 ` [PATCH edk2-platforms v1 11/14] Hisilicon/D05/ACPI: Add ITS PXM Ming Huang
2018-01-20 11:06   ` Ard Biesheuvel
2018-01-18 15:01 ` [PATCH edk2-platforms v1 12/14] Hisilicon/D05/ACPI: Add Pcie, HNS and SAS PXM Ming Huang
2018-01-20 11:08   ` Ard Biesheuvel
2018-01-18 15:01 ` [PATCH edk2-platforms v1 13/14] Hisilicon/Library: Add OsBootLib Ming Huang
2018-01-20 11:11   ` Ard Biesheuvel
2018-01-23 10:23   ` Leif Lindholm
2018-01-27  1:47     ` Huangming (Mark)
2018-01-27 10:37       ` Ard Biesheuvel
2018-01-29  8:55         ` Huangming (Mark)
2018-01-29 10:19           ` Ard Biesheuvel
2018-01-29 11:16       ` Leif Lindholm
2018-02-07 21:16         ` Peter Jones
2018-02-11  6:03           ` Huangming (Mark)
2018-02-26  1:12           ` Guo Heyi
2018-01-18 15:01 ` [PATCH edk2-platforms v1 14/14] Hisilicon D03/D05: Update firmware version to 18.02 Ming Huang
2018-01-20 11:11   ` Ard Biesheuvel
2018-01-23 10:18   ` Leif Lindholm
2018-01-24  1:17     ` Huangming (Mark)
2018-01-24  7:54       ` Leif Lindholm
2018-01-22 13:26 ` [PATCH edk2-platforms v1 00/14] Improve D0x platforms and bug fix Leif Lindholm
2018-01-23 14:24 ` Leif Lindholm

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=7d865fe4-9fc3-9869-9496-9a94e96813c9@huawei.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