[edk2] [PATCH v2 0/8] OvmfPkg: recognize an extended TSEG when QEMU offers it

Laszlo Ersek posted 8 patches 7 years, 5 months ago
Failed in applying to current master (apply log)
OvmfPkg/Include/IndustryStandard/Q35MchIch9.h |  4 ++
OvmfPkg/OvmfPkg.dec                           | 15 +++--
OvmfPkg/OvmfPkgIa32.dsc                       |  1 +
OvmfPkg/OvmfPkgIa32X64.dsc                    |  1 +
OvmfPkg/OvmfPkgX64.dsc                        |  1 +
OvmfPkg/PlatformPei/MemDetect.c               | 67 +++++++++++++++++++-
OvmfPkg/PlatformPei/Platform.c                | 14 ++--
OvmfPkg/PlatformPei/Platform.h                |  7 ++
OvmfPkg/SmmAccess/SmmAccess2Dxe.c             |  1 +
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf           |  3 +
OvmfPkg/SmmAccess/SmmAccessPei.c              | 10 +--
OvmfPkg/SmmAccess/SmmAccessPei.inf            |  4 +-
OvmfPkg/SmmAccess/SmramInternal.c             | 25 +++++++-
OvmfPkg/SmmAccess/SmramInternal.h             | 13 ++++
14 files changed, 142 insertions(+), 24 deletions(-)
[edk2] [PATCH v2 0/8] OvmfPkg: recognize an extended TSEG when QEMU offers it
Posted by Laszlo Ersek 7 years, 5 months ago
This is version 2 of the series posted previously at
<https://lists.01.org/pipermail/edk2-devel/2017-June/011452.html>.

Version 2 is a rewrite from scratch based on Jordan's feedback for v1
and the subsequent discussion.

Repo:   https://github.com/lersek/edk2.git
Branch: extended_tseg_bz1447027_v2

Cc: Jordan Justen <jordan.l.justen@intel.com>

Thanks
Laszlo

Laszlo Ersek (8):
  OvmfPkg: widen PcdQ35TsegMbytes to UINT16
  OvmfPkg/PlatformPei: prepare for PcdQ35TsegMbytes becoming dynamic
  OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamic
  OvmfPkg: make PcdQ35TsegMbytes dynamic
  OvmfPkg/IndustryStandard/Q35MchIch9.h: add extended TSEG size macros
  OvmfPkg/SmmAccess: support extended TSEG size
  OvmfPkg/PlatformPei: honor extended TSEG in PcdQ35TsegMbytes if
    available
  OvmfPkg: mention the extended TSEG near the PcdQ35TsegMbytes
    declaration

 OvmfPkg/Include/IndustryStandard/Q35MchIch9.h |  4 ++
 OvmfPkg/OvmfPkg.dec                           | 15 +++--
 OvmfPkg/OvmfPkgIa32.dsc                       |  1 +
 OvmfPkg/OvmfPkgIa32X64.dsc                    |  1 +
 OvmfPkg/OvmfPkgX64.dsc                        |  1 +
 OvmfPkg/PlatformPei/MemDetect.c               | 67 +++++++++++++++++++-
 OvmfPkg/PlatformPei/Platform.c                | 14 ++--
 OvmfPkg/PlatformPei/Platform.h                |  7 ++
 OvmfPkg/SmmAccess/SmmAccess2Dxe.c             |  1 +
 OvmfPkg/SmmAccess/SmmAccess2Dxe.inf           |  3 +
 OvmfPkg/SmmAccess/SmmAccessPei.c              | 10 +--
 OvmfPkg/SmmAccess/SmmAccessPei.inf            |  4 +-
 OvmfPkg/SmmAccess/SmramInternal.c             | 25 +++++++-
 OvmfPkg/SmmAccess/SmramInternal.h             | 13 ++++
 14 files changed, 142 insertions(+), 24 deletions(-)

-- 
2.13.1.3.g8be5a757fa67

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2 0/8] OvmfPkg: recognize an extended TSEG when QEMU offers it
Posted by Jordan Justen 7 years, 5 months ago
On 2017-07-04 09:56:21, Laszlo Ersek wrote:
> This is version 2 of the series posted previously at
> <https://lists.01.org/pipermail/edk2-devel/2017-June/011452.html>.
> 
> Version 2 is a rewrite from scratch based on Jordan's feedback for v1
> and the subsequent discussion.
> 
> Repo:   https://github.com/lersek/edk2.git
> Branch: extended_tseg_bz1447027_v2
> 
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> 
> Thanks
> Laszlo
> 
> Laszlo Ersek (8):
>   OvmfPkg: widen PcdQ35TsegMbytes to UINT16
>   OvmfPkg/PlatformPei: prepare for PcdQ35TsegMbytes becoming dynamic
>   OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamic

Maybe InitQ35TsegMbytes instead of FetchQ35TsegMbytes. I also thought
a GetQ35TsegMbytes function could just return the value rather than
adding an externally visible global. Not a big deal.

>   OvmfPkg: make PcdQ35TsegMbytes dynamic
>   OvmfPkg/IndustryStandard/Q35MchIch9.h: add extended TSEG size macros
>   OvmfPkg/SmmAccess: support extended TSEG size

Some indentation issues in SmramInternal.c.

>   OvmfPkg/PlatformPei: honor extended TSEG in PcdQ35TsegMbytes if
>     available
>   OvmfPkg: mention the extended TSEG near the PcdQ35TsegMbytes
>     declaration

Series Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

> 
>  OvmfPkg/Include/IndustryStandard/Q35MchIch9.h |  4 ++
>  OvmfPkg/OvmfPkg.dec                           | 15 +++--
>  OvmfPkg/OvmfPkgIa32.dsc                       |  1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc                    |  1 +
>  OvmfPkg/OvmfPkgX64.dsc                        |  1 +
>  OvmfPkg/PlatformPei/MemDetect.c               | 67 +++++++++++++++++++-
>  OvmfPkg/PlatformPei/Platform.c                | 14 ++--
>  OvmfPkg/PlatformPei/Platform.h                |  7 ++
>  OvmfPkg/SmmAccess/SmmAccess2Dxe.c             |  1 +
>  OvmfPkg/SmmAccess/SmmAccess2Dxe.inf           |  3 +
>  OvmfPkg/SmmAccess/SmmAccessPei.c              | 10 +--
>  OvmfPkg/SmmAccess/SmmAccessPei.inf            |  4 +-
>  OvmfPkg/SmmAccess/SmramInternal.c             | 25 +++++++-
>  OvmfPkg/SmmAccess/SmramInternal.h             | 13 ++++
>  14 files changed, 142 insertions(+), 24 deletions(-)
> 
> -- 
> 2.13.1.3.g8be5a757fa67
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2 0/8] OvmfPkg: recognize an extended TSEG when QEMU offers it
Posted by Laszlo Ersek 7 years, 5 months ago
On 07/05/17 19:31, Jordan Justen wrote:
> On 2017-07-04 09:56:21, Laszlo Ersek wrote:
>> This is version 2 of the series posted previously at
>> <https://lists.01.org/pipermail/edk2-devel/2017-June/011452.html>.
>>
>> Version 2 is a rewrite from scratch based on Jordan's feedback for v1
>> and the subsequent discussion.
>>
>> Repo:   https://github.com/lersek/edk2.git
>> Branch: extended_tseg_bz1447027_v2
>>
>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>
>> Thanks
>> Laszlo
>>
>> Laszlo Ersek (8):
>>   OvmfPkg: widen PcdQ35TsegMbytes to UINT16
>>   OvmfPkg/PlatformPei: prepare for PcdQ35TsegMbytes becoming dynamic
>>   OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamic
>
> Maybe InitQ35TsegMbytes instead of FetchQ35TsegMbytes.

OK, I'll do this rename before I push.

> I also thought
> a GetQ35TsegMbytes function could just return the value rather than
> adding an externally visible global. Not a big deal.
>
>>   OvmfPkg: make PcdQ35TsegMbytes dynamic
>>   OvmfPkg/IndustryStandard/Q35MchIch9.h: add extended TSEG size macros
>>   OvmfPkg/SmmAccess: support extended TSEG size
>
> Some indentation issues in SmramInternal.c.

Do you mean this hunk:

> diff --git a/OvmfPkg/SmmAccess/SmramInternal.c b/OvmfPkg/SmmAccess/SmramInternal.c
> index ae1e9069aca6..fa0efeda72b0 100644
> --- a/OvmfPkg/SmmAccess/SmramInternal.c
> +++ b/OvmfPkg/SmmAccess/SmramInternal.c
> @@ -196,9 +196,11 @@ SmramAccessGetCapabilities (
>      SmramMap[DescIdxSmmS3ResumeState].PhysicalSize;
>    SmramMap[DescIdxMain].CpuStart = SmramMap[DescIdxMain].PhysicalStart;
>    SmramMap[DescIdxMain].PhysicalSize =
> -    (TsegSizeBits == MCH_ESMRAMC_TSEG_8MB ? SIZE_8MB :
> -     TsegSizeBits == MCH_ESMRAMC_TSEG_2MB ? SIZE_2MB :
> -     SIZE_1MB) - SmramMap[DescIdxSmmS3ResumeState].PhysicalSize;
> +                             (TsegSizeBits == MCH_ESMRAMC_TSEG_8MB ? SIZE_8MB :
> +                              TsegSizeBits == MCH_ESMRAMC_TSEG_2MB ? SIZE_2MB :
> +                              TsegSizeBits == MCH_ESMRAMC_TSEG_1MB ? SIZE_1MB :
> +                              mQ35TsegMbytes * SIZE_1MB) -
> +                             SmramMap[DescIdxSmmS3ResumeState].PhysicalSize;

I'll align the added code with the removed code before I push.

>
>>   OvmfPkg/PlatformPei: honor extended TSEG in PcdQ35TsegMbytes if
>>     available
>>   OvmfPkg: mention the extended TSEG near the PcdQ35TsegMbytes
>>     declaration
>
> Series Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

Thanks!
Laszlo

>
>>
>>  OvmfPkg/Include/IndustryStandard/Q35MchIch9.h |  4 ++
>>  OvmfPkg/OvmfPkg.dec                           | 15 +++--
>>  OvmfPkg/OvmfPkgIa32.dsc                       |  1 +
>>  OvmfPkg/OvmfPkgIa32X64.dsc                    |  1 +
>>  OvmfPkg/OvmfPkgX64.dsc                        |  1 +
>>  OvmfPkg/PlatformPei/MemDetect.c               | 67 +++++++++++++++++++-
>>  OvmfPkg/PlatformPei/Platform.c                | 14 ++--
>>  OvmfPkg/PlatformPei/Platform.h                |  7 ++
>>  OvmfPkg/SmmAccess/SmmAccess2Dxe.c             |  1 +
>>  OvmfPkg/SmmAccess/SmmAccess2Dxe.inf           |  3 +
>>  OvmfPkg/SmmAccess/SmmAccessPei.c              | 10 +--
>>  OvmfPkg/SmmAccess/SmmAccessPei.inf            |  4 +-
>>  OvmfPkg/SmmAccess/SmramInternal.c             | 25 +++++++-
>>  OvmfPkg/SmmAccess/SmramInternal.h             | 13 ++++
>>  14 files changed, 142 insertions(+), 24 deletions(-)
>>
>> --
>> 2.13.1.3.g8be5a757fa67
>>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2 0/8] OvmfPkg: recognize an extended TSEG when QEMU offers it
Posted by Laszlo Ersek 7 years, 5 months ago
On 07/04/17 18:56, Laszlo Ersek wrote:
> This is version 2 of the series posted previously at
> <https://lists.01.org/pipermail/edk2-devel/2017-June/011452.html>.
> 
> Version 2 is a rewrite from scratch based on Jordan's feedback for v1
> and the subsequent discussion.
> 
> Repo:   https://github.com/lersek/edk2.git
> Branch: extended_tseg_bz1447027_v2
> 
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> 
> Thanks
> Laszlo
> 
> Laszlo Ersek (8):
>   OvmfPkg: widen PcdQ35TsegMbytes to UINT16
>   OvmfPkg/PlatformPei: prepare for PcdQ35TsegMbytes becoming dynamic
>   OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamic
>   OvmfPkg: make PcdQ35TsegMbytes dynamic
>   OvmfPkg/IndustryStandard/Q35MchIch9.h: add extended TSEG size macros
>   OvmfPkg/SmmAccess: support extended TSEG size
>   OvmfPkg/PlatformPei: honor extended TSEG in PcdQ35TsegMbytes if
>     available
>   OvmfPkg: mention the extended TSEG near the PcdQ35TsegMbytes
>     declaration
> 
>  OvmfPkg/Include/IndustryStandard/Q35MchIch9.h |  4 ++
>  OvmfPkg/OvmfPkg.dec                           | 15 +++--
>  OvmfPkg/OvmfPkgIa32.dsc                       |  1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc                    |  1 +
>  OvmfPkg/OvmfPkgX64.dsc                        |  1 +
>  OvmfPkg/PlatformPei/MemDetect.c               | 67 +++++++++++++++++++-
>  OvmfPkg/PlatformPei/Platform.c                | 14 ++--
>  OvmfPkg/PlatformPei/Platform.h                |  7 ++
>  OvmfPkg/SmmAccess/SmmAccess2Dxe.c             |  1 +
>  OvmfPkg/SmmAccess/SmmAccess2Dxe.inf           |  3 +
>  OvmfPkg/SmmAccess/SmmAccessPei.c              | 10 +--
>  OvmfPkg/SmmAccess/SmmAccessPei.inf            |  4 +-
>  OvmfPkg/SmmAccess/SmramInternal.c             | 25 +++++++-
>  OvmfPkg/SmmAccess/SmramInternal.h             | 13 ++++
>  14 files changed, 142 insertions(+), 24 deletions(-)
> 

Pushed: 253d81c71f67..d04b72c67097.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel