Re: [edk2-devel] [PATCH v2 2/5] MdeMoudlePkg: introduce new PCD for Acpi/rsdp

2021-05-26 Thread Jianyong Wu
Hi Laszlo,

> -Original Message-
> From: Laszlo Ersek 
> Sent: Wednesday, May 19, 2021 2:17 PM
> To: devel@edk2.groups.io; Jianyong Wu ;
> ardb+tianoc...@kernel.org; Sami Mujawar 
> Cc: hao.a...@intel.com; Justin He ; Jian J Wang
> 
> Subject: Re: [edk2-devel] [PATCH v2 2/5] MdeMoudlePkg: introduce new
> PCD for Acpi/rsdp
>
> On 05/17/21 08:50, Jianyong Wu wrote:
> > As there is lack of a machnism in Cloud Hypervisor to pass the base
> > address of Rsdp in Acpi, so a PCD varialbe is introduced here to feed
> > it.
> >
> > Cc: Hao A Wu 
> > Cc: Jian J Wang 
> > Signed-off-by: Jianyong Wu 
> > ---
> >  MdeModulePkg/MdeModulePkg.dec | 7 +++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/MdeModulePkg/MdeModulePkg.dec
> > b/MdeModulePkg/MdeModulePkg.dec index
> 148395511034..4c8baac35a9e
> > 100644
> > --- a/MdeModulePkg/MdeModulePkg.dec
> > +++ b/MdeModulePkg/MdeModulePkg.dec
> > @@ -910,6 +910,13 @@ [PcdsFixedAtBuild]
> ># @Expression 0x8001 |
> (gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable
> == 0x ||
> gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable <=
> 0x0FFF)
> >
> >
> gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable|0|
> UINT6
> > 4|0x30001015
> >
> > +  ##
> > +  # This is the physical address of rsdp which is the core struct of Acpi.
> > +  # Some hypervisor may has no way to pass rsdp address to the guest,
> > + so a PCD  # is worth for those.
> > +  #
> > +
> > +
> gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiRsdpBaseAddress|0x0|UINT64
> |0x3
> > + 0001056
> > +
> >## Progress Code for OS Loader LoadImage start.
> >#  PROGRESS_CODE_OS_LOADER_LOAD   =
> (EFI_SOFTWARE_DXE_BS_DRIVER | (EFI_OEM_SPECIFIC | 0x)) =
> 0x03058000
> ># @Prompt Progress Code for OS Loader LoadImage start.
> >
>
> This PCD is not useful enough to be placed in MdeModulePkg -- it is only
> used in the next two patches, which are for ArmVirtPkg.
>
> (1) Therefore, please add the PCD to the "ArmVirtPkg.dec" file.
>
> (2) The PCD should arguably refer to "CloudHv" in the name.
>
> (3) In my opinion, this patch (once reimplemented for ArmVirtPkg.dec)
> should be squashed into the CloudHvAcpiPlatformDxe patch. The PCD is
> being introduced *for* CloudHvAcpiPlatformDxe, and *only* for that driver.
> In such cases, we usually keep the DEC modifications in the same patch as
> the driver addition, assuming the PCD goes in the same package as the driver.
>
> (4) "some hypervisor" in the DEC comment is bogus. Please be as explicit
> about the use case as possible.

OK,  that's better.

Thanks
Jianyong

>
> Thanks
> Laszlo

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75744): https://edk2.groups.io/g/devel/message/75744
Mute This Topic: https://groups.io/mt/82880900/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 2/5] MdeMoudlePkg: introduce new PCD for Acpi/rsdp

2021-05-26 Thread Jianyong Wu
Hi Sami,

> -Original Message-
> From: Sami Mujawar 
> Sent: Wednesday, May 19, 2021 4:26 AM
> To: Jianyong Wu ; devel@edk2.groups.io;
> ler...@redhat.com; ardb+tianoc...@kernel.org
> Cc: hao.a...@intel.com; Justin He ; Jian J Wang
> ; nd 
> Subject: Re: [PATCH v2 2/5] MdeMoudlePkg: introduce new PCD for
> Acpi/rsdp
> 
> Hi Jianyon,
> 
> Thank you for this patch.
> 
> Please find my response inline marked [SAMI].
> 
> Regards,
> 
> Sami Mujawar
> 
> 
> On 17/05/2021 07:50 AM, Jianyong Wu wrote:
> > As there is lack of a machnism in Cloud Hypervisor to pass the base
> > address of Rsdp in Acpi, so a PCD varialbe is introduced here to
> [SAMI] Please fix the following typos: 'machnism' & 'varialbe'
> > feed it.
> >
> > Cc: Hao A Wu 
> > Cc: Jian J Wang 
> > Signed-off-by: Jianyong Wu 
> > ---
> >   MdeModulePkg/MdeModulePkg.dec | 7 +++
> >   1 file changed, 7 insertions(+)
> >
> > diff --git a/MdeModulePkg/MdeModulePkg.dec
> > b/MdeModulePkg/MdeModulePkg.dec index
> 148395511034..4c8baac35a9e
> > 100644
> > --- a/MdeModulePkg/MdeModulePkg.dec
> > +++ b/MdeModulePkg/MdeModulePkg.dec
> > @@ -910,6 +910,13 @@ [PcdsFixedAtBuild]
> > # @Expression 0x8001 |
> (gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable
> == 0x ||
> gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable <=
> 0x0FFF)
> >
> >
> gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable|0|
> UINT6
> > 4|0x30001015
> >
> > +  ##
> > +  # This is the physical address of rsdp which is the core struct of Acpi.
> > +  # Some hypervisor may has no way to pass rsdp address to the guest,
> > + so a PCD  # is worth for those.
> > +  #
> > +
> > +
> gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiRsdpBaseAddress|0x0|UINT64
> |0x3
> > + 0001056
> [SAMI] Can this PCD be defined in ArmVirtPkg\ArmVirtPkg.dec ?

Ok, It's better to do this change.

Thanks
Jianyong 
> > +
> > ## Progress Code for OS Loader LoadImage start.
> > #  PROGRESS_CODE_OS_LOADER_LOAD   =
> (EFI_SOFTWARE_DXE_BS_DRIVER | (EFI_OEM_SPECIFIC | 0x)) =
> 0x03058000
> > # @Prompt Progress Code for OS Loader LoadImage start.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75742): https://edk2.groups.io/g/devel/message/75742
Mute This Topic: https://groups.io/mt/82880900/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 2/5] MdeMoudlePkg: introduce new PCD for Acpi/rsdp

2021-05-19 Thread Laszlo Ersek
On 05/17/21 08:50, Jianyong Wu wrote:
> As there is lack of a machnism in Cloud Hypervisor to pass the base
> address of Rsdp in Acpi, so a PCD varialbe is introduced here to
> feed it.
> 
> Cc: Hao A Wu 
> Cc: Jian J Wang 
> Signed-off-by: Jianyong Wu 
> ---
>  MdeModulePkg/MdeModulePkg.dec | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
> index 148395511034..4c8baac35a9e 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -910,6 +910,13 @@ [PcdsFixedAtBuild]
># @Expression 0x8001 | 
> (gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable == 
> 0x || 
> gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable <= 
> 0x0FFF)
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable|0|UINT64|0x30001015
>  
> +  ##
> +  # This is the physical address of rsdp which is the core struct of Acpi.
> +  # Some hypervisor may has no way to pass rsdp address to the guest, so a 
> PCD
> +  # is worth for those.
> +  #
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiRsdpBaseAddress|0x0|UINT64|0x30001056
> +
>## Progress Code for OS Loader LoadImage start.
>#  PROGRESS_CODE_OS_LOADER_LOAD   = (EFI_SOFTWARE_DXE_BS_DRIVER | 
> (EFI_OEM_SPECIFIC | 0x)) = 0x03058000
># @Prompt Progress Code for OS Loader LoadImage start.
> 

This PCD is not useful enough to be placed in MdeModulePkg -- it is only
used in the next two patches, which are for ArmVirtPkg.

(1) Therefore, please add the PCD to the "ArmVirtPkg.dec" file.

(2) The PCD should arguably refer to "CloudHv" in the name.

(3) In my opinion, this patch (once reimplemented for ArmVirtPkg.dec)
should be squashed into the CloudHvAcpiPlatformDxe patch. The PCD is
being introduced *for* CloudHvAcpiPlatformDxe, and *only* for that
driver. In such cases, we usually keep the DEC modifications in the same
patch as the driver addition, assuming the PCD goes in the same package
as the driver.

(4) "some hypervisor" in the DEC comment is bogus. Please be as explicit
about the use case as possible.

Thanks
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75346): https://edk2.groups.io/g/devel/message/75346
Mute This Topic: https://groups.io/mt/82880900/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 2/5] MdeMoudlePkg: introduce new PCD for Acpi/rsdp

2021-05-18 Thread Sami Mujawar

Hi Jianyon,

Thank you for this patch.

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar


On 17/05/2021 07:50 AM, Jianyong Wu wrote:

As there is lack of a machnism in Cloud Hypervisor to pass the base
address of Rsdp in Acpi, so a PCD varialbe is introduced here to

[SAMI] Please fix the following typos: 'machnism' & 'varialbe'

feed it.

Cc: Hao A Wu 
Cc: Jian J Wang 
Signed-off-by: Jianyong Wu 
---
  MdeModulePkg/MdeModulePkg.dec | 7 +++
  1 file changed, 7 insertions(+)

diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 148395511034..4c8baac35a9e 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -910,6 +910,13 @@ [PcdsFixedAtBuild]
# @Expression 0x8001 | 
(gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable == 
0x || 
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable <= 
0x0FFF)

gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable|0|UINT64|0x30001015
  
+  ##

+  # This is the physical address of rsdp which is the core struct of Acpi.
+  # Some hypervisor may has no way to pass rsdp address to the guest, so a PCD
+  # is worth for those.
+  #
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiRsdpBaseAddress|0x0|UINT64|0x30001056

[SAMI] Can this PCD be defined in ArmVirtPkg\ArmVirtPkg.dec ?

+
## Progress Code for OS Loader LoadImage start.
#  PROGRESS_CODE_OS_LOADER_LOAD   = (EFI_SOFTWARE_DXE_BS_DRIVER | 
(EFI_OEM_SPECIFIC | 0x)) = 0x03058000
# @Prompt Progress Code for OS Loader LoadImage start.




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75286): https://edk2.groups.io/g/devel/message/75286
Mute This Topic: https://groups.io/mt/82880900/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v2 2/5] MdeMoudlePkg: introduce new PCD for Acpi/rsdp

2021-05-17 Thread Jianyong Wu
As there is lack of a machnism in Cloud Hypervisor to pass the base
address of Rsdp in Acpi, so a PCD varialbe is introduced here to
feed it.

Cc: Hao A Wu 
Cc: Jian J Wang 
Signed-off-by: Jianyong Wu 
---
 MdeModulePkg/MdeModulePkg.dec | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 148395511034..4c8baac35a9e 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -910,6 +910,13 @@ [PcdsFixedAtBuild]
   # @Expression 0x8001 | 
(gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable == 
0x || 
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable <= 
0x0FFF)
   
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable|0|UINT64|0x30001015
 
+  ##
+  # This is the physical address of rsdp which is the core struct of Acpi.
+  # Some hypervisor may has no way to pass rsdp address to the guest, so a PCD
+  # is worth for those.
+  #
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiRsdpBaseAddress|0x0|UINT64|0x30001056
+
   ## Progress Code for OS Loader LoadImage start.
   #  PROGRESS_CODE_OS_LOADER_LOAD   = (EFI_SOFTWARE_DXE_BS_DRIVER | 
(EFI_OEM_SPECIFIC | 0x)) = 0x03058000
   # @Prompt Progress Code for OS Loader LoadImage start.
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75185): https://edk2.groups.io/g/devel/message/75185
Mute This Topic: https://groups.io/mt/82880900/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-