Date   

[PATCH 0/9] Create multiple Hobs for Universal Payload

Zhiguang Liu
 

This patch set is based on Universal Payload on
https://universalpayload.github.io/documentation/payload-interfaces/index.html

This patch set introduce one general header, three different hob types
and how Universal Payload consume these hobs.


Zhiguang Liu (9):
MdePkg: Add Universal Payload general defination header file
MdePkg: Add new structure for the PCI Root Bridge Info Hob
UefiPayloadPkg: UefiPayload retrieve PCI root bridge from Guid Hob
MdePkg: Add new structure for the Universal Payload SMBios Table Info
Hob
MdeModulePkg/Universal/SmbiosDxe: Scan for existing tables
UefiPayloadPkg: Creat gPldSmbiosTableGuid Hob
MdePkg: Add new structure for the Universal Payload ACPI Table Info
Hob
MdeModulePkg/ACPI: Install ACPI table from HOB.
UefiPayloadPkg: Creat gPldAcpiTableGuid Hob

MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h | 4 +++-
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf | 4 +++-
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 299 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h | 4 +++-
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf | 5 ++++-
MdePkg/Include/UniversalPayload/AcpiTable.h | 28 ++++++++++++++++++++++++++++
MdePkg/Include/UniversalPayload/PciRootBridges.h | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MdePkg/Include/UniversalPayload/SmbiosTable.h | 28 ++++++++++++++++++++++++++++
MdePkg/Include/UniversalPayload/UniversalPayload.h | 33 +++++++++++++++++++++++++++++++++
MdePkg/MdePkg.dec | 15 +++++++++++++++
UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 28 +---------------------------
UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h | 5 +----
UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf | 4 +---
UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h | 40 ++++++++++++++++++++++++++++++++++++++--
UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 47 ++++++++++++++++++++++++++++++++++++++++++++---
UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 8 +++++++-
UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 23 ++++++++++++++++++++++-
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 5 +++--
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 4 +++-
UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
22 files changed, 832 insertions(+), 60 deletions(-)
create mode 100644 MdePkg/Include/UniversalPayload/AcpiTable.h
create mode 100644 MdePkg/Include/UniversalPayload/PciRootBridges.h
create mode 100644 MdePkg/Include/UniversalPayload/SmbiosTable.h
create mode 100644 MdePkg/Include/UniversalPayload/UniversalPayload.h

--
2.30.0.windows.2


Re: [PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime

Sunny Wang
 

Looks good to me. Good catch!
Reviewed-by: Sunny Wang <sunny.wang@arm.com>

By the way, just FYI, I still run into the same problem (line-ending problem) with Windows Outlook and EDK2 email archive https://edk2.groups.io/g/devel/topic/patch/83043513?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,83043513. Moreover, Gmail works well, so I used it to review this patch.

Best Regards,
Sunny Wang

-----Original Message-----
From: Marcin Wojtas <mw@semihalf.com>
Sent: Monday, May 24, 2021 11:55 AM
To: devel@edk2.groups.io
Cc: michael.d.kinney@intel.com; leif@nuviainc.com; ardb+tianocore@kernel.org; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Sunny Wang <Sunny.Wang@arm.com>; gjb@semihalf.com; upstream@semihalf.com; Marcin Wojtas <mw@semihalf.com>
Subject: [PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime

GetWakeupTime should return full time information, including the daylight/timezone. Make use of the existing non-volatile variables for that purpose. Moreover add an error checking of possibly invalid parameters.
This partially fixes FWTS and SCT Set/GetWakeupTime tests on Marvell platforms.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
index e59036badc..85650a6ede 100644
--- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
+++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
@@ -143,6 +143,17 @@ GetWakeupTime (
OUT EFI_TIME *Time ) {+ if (Time == NULL || Enabled == NULL || Pending == NULL) {+ return EFI_INVALID_PARAMETER;+ }++ //+ // Set these first so the RealTimeClockLib implementation+ // can override them based on its own settings.+ //+ Time->TimeZone = mTimeSettings.TimeZone;+ Time->Daylight = mTimeSettings.Daylight;+ return LibGetWakeupTime (Enabled, Pending, Time); } --
2.29.0

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.


[edk2-platforms PATCH 6/6] Marvell: RealTimeClockLib: Rework LibGetWakeupTime/LibSetWakeupTime

Marcin Wojtas
 

Apply multiple fixes to the Marvell RealTimeClockLib wakeup
library callbacks.

LibGetWakeupTime:
* Add input parameters validation
* Fix 'Pending' value check

LibSetWakeupTime:
* Allow disabling the wakeup timer regardless the input 'Time' value
* Use more generic 'Time' value verification, which is more strict
than the replaced custom one.
* Use proper alarm mask for 'Pending' signalling

With above the ACS3.0 FWTS and SCT timer tests pass cleanly.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.h | =
2 +-
Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c | 2=
9 ++++++++++----------
2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeCl=
ockLib.h b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeCloc=
kLib.h
index 7fa1d092e4..c33e63d107 100644
--- a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.h
+++ b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.h
@@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define RTC_BRIDGE_TIMING_CTRL0_REG_OFFS 0x80=0D
#define RTC_BRIDGE_TIMING_CTRL1_REG_OFFS 0x84=0D
#define RTC_IRQ_STATUS_REG 0x90=0D
-#define RTC_IRQ_ALARM_MASK 0x1=0D
+#define RTC_IRQ_ALARM_MASK 0x2=0D
#define RTC_WRITE_PERIOD_DELAY_MASK 0xFFFF=0D
#define RTC_WRITE_PERIOD_DELAY_DEFAULT 0x3FF=0D
#define RTC_WRITE_SETUP_DELAY_MASK (0xFFFF << 16)=0D
diff --git a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeCl=
ockLib.c b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeCloc=
kLib.c
index a48d44ed83..49c9385d53 100644
--- a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
+++ b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
@@ -140,11 +140,15 @@ LibGetWakeupTime (
{=0D
UINT32 WakeupSeconds;=0D
=0D
+ if (Time =3D=3D NULL || Enabled =3D=3D NULL || Pending =3D=3D NULL) {=0D
+ return EFI_INVALID_PARAMETER;=0D
+ }=0D
+=0D
*Enabled =3D MmioRead32 (mArmadaRtcBase + RTC_IRQ_2_CONFIG_REG) & RTC_IR=
Q_ALARM_EN;=0D
=0D
*Pending =3D MmioRead32 (mArmadaRtcBase + RTC_IRQ_STATUS_REG) & RTC_IRQ_=
ALARM_MASK;=0D
// Ack pending alarm=0D
- if (Pending) {=0D
+ if (*Pending) {=0D
MmioWrite32 (mArmadaRtcBase + RTC_IRQ_STATUS_REG, RTC_IRQ_ALARM_MASK);=
=0D
}=0D
=0D
@@ -176,14 +180,14 @@ LibSetWakeupTime (
{=0D
UINTN WakeupSeconds;=0D
=0D
- //=0D
- // Because the Armada RTC uses a 32-bit counter for seconds,=0D
- // the maximum time span is just over 136 years.=0D
- // Time is stored in Unix Epoch format, so it starts in 1970,=0D
- // Therefore it can not exceed the year 2106.=0D
- //=0D
- if ((Time->Year < 1970) || (Time->Year >=3D 2106)) {=0D
- return EFI_UNSUPPORTED;=0D
+ // Handle timer disabling case=0D
+ if (!Enabled) {=0D
+ RtcDelayedWrite (RTC_IRQ_2_CONFIG_REG, 0);=0D
+ return EFI_SUCCESS;=0D
+ }=0D
+=0D
+ if (Time =3D=3D NULL || !IsTimeValid (Time)) {=0D
+ return EFI_INVALID_PARAMETER;=0D
}=0D
=0D
// Convert time to raw seconds=0D
@@ -195,11 +199,8 @@ LibSetWakeupTime (
// Issue delayed write to alarm register=0D
RtcDelayedWrite (RTC_ALARM_2_REG, (UINT32)WakeupSeconds);=0D
=0D
- if (Enabled) {=0D
- MmioWrite32 (mArmadaRtcBase + RTC_IRQ_2_CONFIG_REG, RTC_IRQ_ALARM_EN);=
=0D
- } else {=0D
- MmioWrite32 (mArmadaRtcBase + RTC_IRQ_2_CONFIG_REG, 0);=0D
- }=0D
+ // Enable wakeup timer=0D
+ RtcDelayedWrite (RTC_IRQ_2_CONFIG_REG, RTC_IRQ_ALARM_EN);=0D
=0D
return EFI_SUCCESS;=0D
}=0D
--=20
2.29.0


[edk2-platforms PATCH 5/6] Marvell: RealTimeClockLib: Fix daylight and timezone handling

Marcin Wojtas
 

The Marvell implementation of the RealTimeClockLib was unnecessarily
overriding the daylight and timezone values, which are handled
by non-volatile variables in the generic code. Fix that.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c | 3=
---
1 file changed, 3 deletions(-)

diff --git a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeCl=
ockLib.c b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeCloc=
kLib.c
index 40ab01ed41..a48d44ed83 100644
--- a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
+++ b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
@@ -79,9 +79,6 @@ LibGetTime (
// Convert from internal 32-bit time to UEFI time=0D
EpochToEfiTime (RegVal, Time);=0D
=0D
- Time->TimeZone =3D EFI_UNSPECIFIED_TIMEZONE;=0D
- Time->Daylight =3D 0;=0D
-=0D
return Status;=0D
}=0D
=0D
--=20
2.29.0


[edk2-platforms PATCH 4/6] Marvell/Cn913xDbA: AcpiTables: Use unique UID's

Marcin Wojtas
 

The CN9131 variant's SSDT comprised UID's, whose values
overlapped the ones used in the main DSDT file. Fix that.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn9131DbA/Ssdt.asl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn9131DbA/Ssdt.asl b/S=
ilicon/Marvell/OcteonTx/AcpiTables/T91/Cn9131DbA/Ssdt.asl
index dc32fe836a..691a709c18 100644
--- a/Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn9131DbA/Ssdt.asl
+++ b/Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn9131DbA/Ssdt.asl
@@ -18,7 +18,7 @@ DefinitionBlock ("Cn9131DbASsdt.aml", "SSDT", 2, "MVEBU "=
, "CN9131", 3)
Device (AHC1)=0D
{=0D
Name (_HID, "LNRO001E") // _HID: Hardware ID=0D
- Name (_UID, 0x00) // _UID: Unique ID=0D
+ Name (_UID, 0x01) // _UID: Unique ID=0D
Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute=
=0D
Name (_CLS, Package (0x03) // _CLS: Class Code=0D
{=0D
@@ -43,7 +43,7 @@ DefinitionBlock ("Cn9131DbASsdt.aml", "SSDT", 2, "MVEBU "=
, "CN9131", 3)
Device (XHC2)=0D
{=0D
Name (_HID, "PNP0D10") // _HID: Hardware ID=0D
- Name (_UID, 0x01) // _UID: Unique ID=0D
+ Name (_UID, 0x02) // _UID: Unique ID=0D
Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute=
=0D
=0D
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Set=
tings=0D
@@ -62,7 +62,7 @@ DefinitionBlock ("Cn9131DbASsdt.aml", "SSDT", 2, "MVEBU "=
, "CN9131", 3)
{=0D
Name (_HID, "MRVL0110") // _HID: H=
ardware ID=0D
Name (_CCA, 0x01) // Cache-c=
oherent controller=0D
- Name (_UID, 0x00) // _UID: U=
nique ID=0D
+ Name (_UID, 0x01) // _UID: U=
nique ID=0D
Name (_CRS, ResourceTemplate ()=0D
{=0D
Memory32Fixed (ReadWrite, 0xf4000000 , 0x100000)=0D
--=20
2.29.0


[edk2-platforms PATCH 3/6] Marvell: Armada7k8k/OcteonTx: Switch SPCR UART subtype to 0x1

Marcin Wojtas
 

DBG2 ACPI table description [1] specifies three subtypes
related to 16550 UART:
0x0 - 16550 compatible
0x1 - 16550 subset
0x12 - 16550 compatible with parameters defined in
Generic Address Structure (GAS)

It turned out however, that the Windows OS treats 0x0 subtype as
legacy x86 UART with 8-bit access. ARM SoCs can use types 0x1 (16550 with
fixed mmio32 access) or 0x12 (16550 with fully respected GAS contents).

Switch Marvell SoCs ACPI UART subtype to 0x1 - thanks to that the
same firmware can run properly with UART output in Windows 10, Linux
and ESXI hypervisor.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-=
debug-port-table

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Armada7k8k/AcpiTables/Spcr.aslc | 2 +-
Silicon/Marvell/OcteonTx/AcpiTables/T91/Spcr.aslc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Silicon/Marvell/Armada7k8k/AcpiTables/Spcr.aslc b/Silicon/Marv=
ell/Armada7k8k/AcpiTables/Spcr.aslc
index 438cf7880e..6efc175bdf 100644
--- a/Silicon/Marvell/Armada7k8k/AcpiTables/Spcr.aslc
+++ b/Silicon/Marvell/Armada7k8k/AcpiTables/Spcr.aslc
@@ -22,7 +22,7 @@ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE Spcr =3D {
EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE,=0D
EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION=0D
),=0D
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550, //=
InterfaceType=0D
+ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16450, //=
InterfaceType=0D
{ EFI_ACPI_RESERVED_BYTE,=0D
EFI_ACPI_RESERVED_BYTE,=0D
EFI_ACPI_RESERVED_BYTE }, //=
Reserved1[3]=0D
diff --git a/Silicon/Marvell/OcteonTx/AcpiTables/T91/Spcr.aslc b/Silicon/Ma=
rvell/OcteonTx/AcpiTables/T91/Spcr.aslc
index f663d8ade8..2a3415f0a6 100644
--- a/Silicon/Marvell/OcteonTx/AcpiTables/T91/Spcr.aslc
+++ b/Silicon/Marvell/OcteonTx/AcpiTables/T91/Spcr.aslc
@@ -22,7 +22,7 @@ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE Spcr =3D {
EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE,=0D
EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION=0D
),=0D
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550, //=
InterfaceType=0D
+ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16450, //=
InterfaceType=0D
{ EFI_ACPI_RESERVED_BYTE,=0D
EFI_ACPI_RESERVED_BYTE,=0D
EFI_ACPI_RESERVED_BYTE }, //=
Reserved1[3]=0D
--=20
2.29.0


[edk2-platforms PATCH 2/6] Marvell: Armada7k8k/OcteonTx: Fix RT debug prints

Marcin Wojtas
 

Resolution of the DebugLib for the DXE_RUNTIME_DRIVER library
class was limited to non-RELEASE builds. This caused crashes
during FWTS in case the RT attempted to use UART. Fix that
by allowing to use DxeRuntimeDebugLibSerialPort in all kind
of builds.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 2 --
1 file changed, 2 deletions(-)

diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc b/Silicon/Marvel=
l/Armada7k8k/Armada7k8k.dsc.inc
index 4cdafe8b1f..939fbf14d9 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
@@ -195,9 +195,7 @@
!else=0D
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf=
=0D
!endif=0D
-!if $(TARGET) !=3D RELEASE=0D
DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibS=
erialPort.inf=0D
-!endif=0D
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL=
ibRuntimeDxe.inf=0D
=0D
[LibraryClasses.ARM, LibraryClasses.AARCH64]=0D
--=20
2.29.0


[edk2-platforms PATCH 1/6] Marvell/Drivers: SmbiosPlatformDxe: Align Type17 to SMBIOS v3.2

Marcin Wojtas
 

This patch adds missing entries required for SMBIOS v3.2 compliance
of the Type17 table. On the occasion improve Type4 table contents.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 39 +++++++=
+++++++++++--
1 file changed, 35 insertions(+), 4 deletions(-)

diff --git a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c =
b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
index 2ecaec2af5..a99291e902 100644
--- a/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
+++ b/Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -181,7 +181,7 @@ STATIC SMBIOS_TABLE_TYPE4 mArmadaDefaultType4 =3D {
3, //version=0D
{0,0,0,0,0,1}, //voltage=0D
0, //external clock=0D
- 2000, //max speed=0D
+ 2200, //max speed=0D
0, //current speed - requires update=0D
0x41, //status=0D
ProcessorUpgradeOther,=0D
@@ -196,6 +196,9 @@ STATIC SMBIOS_TABLE_TYPE4 mArmadaDefaultType4 =3D {
4, //threads per socket=0D
0xEC, //processor characteristics=0D
ProcessorFamilyARM, //ARM core=0D
+ 0, // CoreCount2;=0D
+ 0, // EnabledCoreCount2;=0D
+ 0, // ThreadCount2;=0D
};=0D
=0D
STATIC CHAR8 CONST *mArmadaDefaultType4Strings[] =3D {=0D
@@ -457,7 +460,7 @@ STATIC SMBIOS_TABLE_TYPE17 mArmadaDefaultType17 =3D {
0, //Memory size obtained dynamically=0D
MemoryFormFactorRowOfChips, //Memory factor=0D
0, //Not part of a set=0D
- 1, //Right side of board=0D
+ 1, //Location=0D
2, //Bank 0=0D
MemoryTypeDdr4, //DDR4=0D
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, //unbuffered=0D
@@ -467,10 +470,36 @@ STATIC SMBIOS_TABLE_TYPE17 mArmadaDefaultType17 =3D {
0, //asset tag=0D
0, //part number=0D
0, //rank=0D
+ 0, // ExtendedSize; (since Size < 32GB-1)=0D
+ 0, // ConfiguredMemoryClockSpeed - initialized at runtime=0D
+ 0, // MinimumVoltage; (unknown)=0D
+ 0, // MaximumVoltage; (unknown)=0D
+ 0, // ConfiguredVoltage; (unknown)=0D
+ MemoryTechnologyDram, // MemoryTechnology=0D
+ {{ // MemoryOperatingModeCapability=0D
+ 0, // Reserved :1;=0D
+ 0, // Other :1;=0D
+ 0, // Unknown :1;=0D
+ 1, // VolatileMemory :1;=0D
+ 0, // ByteAccessiblePersistentMemory :1;=0D
+ 0, // BlockAccessiblePersistentMemory :1;=0D
+ 0 // Reserved :10;=0D
+ }},=0D
+ 0, // FirwareVersion=0D
+ 0, // ModuleManufacturerID (unknown)=0D
+ 0, // ModuleProductID (unknown)=0D
+ 0, // MemorySubsystemControllerManufacturerID (unknown)=0D
+ 0, // MemorySubsystemControllerProductID (unknown)=0D
+ 0, // NonVolatileSize=0D
+ 0, // VolatileSize - initialized at runtime=0D
+ 0, // CacheSize=0D
+ 0, // LogicalSize=0D
+ 0, // ExtendedSpeed,=0D
+ 0 // ExtendedConfiguredMemorySpeed=0D
};=0D
=0D
STATIC CHAR8 CONST *mArmadaDefaultType17Strings[] =3D {=0D
- "RIGHT SIDE\0", /* location */=0D
+ "DIMM SLOT\0", /* location */=0D
"BANK 0\0", /* bank description */=0D
NULL=0D
};=0D
@@ -735,9 +764,10 @@ SmbiosMemoryInstall (
}=0D
=0D
//=0D
- // Update TYPE17 memory size field=0D
+ // Update TYPE17 memory size fields=0D
//=0D
mArmadaDefaultType17.Size =3D (UINT16)(MemorySize >> 20);=0D
+ mArmadaDefaultType17.VolatileSize =3D MemorySize;=0D
=0D
return EFI_SUCCESS;=0D
}=0D
@@ -767,6 +797,7 @@ SmbiosInstallAllStructures (
mArmadaDefaultType0.SystemBiosMinorRelease =3D FirmwareMinorRevisionNumb=
er;=0D
mArmadaDefaultType4.CurrentSpeed =3D SampleAtResetGetCpuFrequency ();=0D
mArmadaDefaultType17.Speed =3D SampleAtResetGetDramFrequency ();=0D
+ mArmadaDefaultType17.ConfiguredMemoryClockSpeed =3D SampleAtResetGetDram=
Frequency ();=0D
=0D
//=0D
// Generate memory descriptors.=0D
--=20
2.29.0


[edk2-platforms PATCH 0/6] Marvell ACS fixes

Marcin Wojtas
 

Hi,

This series addresses a couple of issues found during
ACS3.0 test suit runs. The SMBIOS Type17 table
extension and RTC fixes/improvements.
Moreover the SPCR console subtype is switched to
a different value and Cn913xDb ACPI tables are
fixed, so that to achieve proper Windows 10 PE boot.

More details can be found in the commit logs.
The patchest is publicly available in the github:
https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/marvell-acs-r20210524

Best regards,
Marcin

Marcin Wojtas (6):
Marvell/Drivers: SmbiosPlatformDxe: Align Type17 to SMBIOS v3.2
Marvell: Armada7k8k/OcteonTx: Fix RT debug prints
Marvell: Armada7k8k/OcteonTx: Switch SPCR UART subtype to 0x1
Marvell/Cn913xDbA: AcpiTables: Use unique UID's
Marvell: RealTimeClockLib: Fix daylight and timezone handling
Marvell: RealTimeClockLib: Rework LibGetWakeupTime/LibSetWakeupTime

Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 2 -
Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.h | 2 +-
Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c | 32 ++++++++--------
Silicon/Marvell/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 39 ++++++++++++++++++--
Silicon/Marvell/Armada7k8k/AcpiTables/Spcr.aslc | 2 +-
Silicon/Marvell/OcteonTx/AcpiTables/T91/Cn9131DbA/Ssdt.asl | 6 +--
Silicon/Marvell/OcteonTx/AcpiTables/T91/Spcr.aslc | 2 +-
7 files changed, 56 insertions(+), 29 deletions(-)

--
2.29.0


[PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime

Marcin Wojtas
 

GetWakeupTime should return full time information, including
the daylight/timezone. Make use of the existing non-volatile
variables for that purpose. Moreover add an error checking
of possibly invalid parameters.
This partially fixes FWTS and SCT Set/GetWakeupTime tests on
Marvell platforms.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/Embedded=
Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c
index e59036badc..85650a6ede 100644
--- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
+++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
@@ -143,6 +143,17 @@ GetWakeupTime (
OUT EFI_TIME *Time=0D
)=0D
{=0D
+ if (Time =3D=3D NULL || Enabled =3D=3D NULL || Pending =3D=3D NULL) {=0D
+ return EFI_INVALID_PARAMETER;=0D
+ }=0D
+=0D
+ //=0D
+ // Set these first so the RealTimeClockLib implementation=0D
+ // can override them based on its own settings.=0D
+ //=0D
+ Time->TimeZone =3D mTimeSettings.TimeZone;=0D
+ Time->Daylight =3D mTimeSettings.Daylight;=0D
+=0D
return LibGetWakeupTime (Enabled, Pending, Time);=0D
}=0D
=0D
--=20
2.29.0


Re: [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2

Sunny Wang
 

Add Liming's new email.

Hi Marcin,

There seems no LF (0A).
1. From the patch I got below in this email, several lines got merged into one line.
#define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART 0x000e #define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_DCC 0x000f #define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_BCM2835_UART 0x0010+#define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_16550_WITH_GAS 0x0012 #define EFI_ACPI_DBG2_PORT_TYPE_1394 0x8001 #define EFI_ACPI_DBG2_PORT_SUBTYPE_1394_STANDARD 0x0000 #define EFI_ACPI_DBG2_PORT_TYPE_USB
2. In https://edk2.groups.io/g/devel/topic/patch_1_1_mdepkg_add_new/83024903?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,83024903, I saw "=0D" appending to each line. I'm not sure if this is relevant.

Moreover, I don't see #1 and #2 in another similar code change https://edk2.groups.io/g/devel/message/75283?p=,,,20,0,0,0::relevance,,MdePkg%3A+Update+DBG2+and+SPCR+header+with+NVIDIA+16550+Subtype,20,2,0,82919032.

Of course, if this won't cause any issue with pushing the patch, I'm totally fine with this.

Reviewed-by: Sunny Wang <sunny.wang@arm.com>


Best Regards,
Sunny Wang

-----Original Message-----
From: Marcin Wojtas <mw@semihalf.com>
Sent: Monday, May 24, 2021 10:21 AM
To: Sunny Wang <Sunny.Wang@arm.com>
Cc: devel@edk2.groups.io; michael.d.kinney@intel.com; leif@nuviainc.com; ardb+tianocore@kernel.org; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; gjb@semihalf.com; upstream@semihalf.com
Subject: Re: [edk2-devel] [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2

Hi Sunny,


pon., 24 maj 2021 o 04:09 Sunny Wang <Sunny.Wang@arm.com> napisał(a):

Looks good, Marcin.
However, it looks like something wrong with the line-ending. Could you check if your line-ending setting is CR/LF? Did you use /edk2/BaseTools/Scripts/PatchCheck.py tool to check your patch? If not, could you use it? I expect this tool can catch the line-ending problem.
The line endings are fine in my repo, I generated and sent the patch as usual.

And of course prior to sending I ran PatchCheck.py - it complains only about too long URL line in the commit message, but the line-endings are ok.

$ python3 /home/mw/git/edk2-workspace/edk2/BaseTools/Scripts/PatchCheck.py -1 Checking git commit: HEAD
MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2 WARNING - Line 9 of commit message is too long (91 >= 76).
[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table
The commit message format passed all checks.
The code passed all checks.

Do you check the line endings in a different way?

Best regards,
Marcin


Best Regards,
Sunny Wang

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marcin
Wojtas via groups.io
Sent: Sunday, May 23, 2021 5:15 PM
To: devel@edk2.groups.io
Cc: liming.gao@intel.com; michael.d.kinney@intel.com;
leif@nuviainc.com; ardb+tianocore@kernel.org; Samer El-Haj-Mahmoud
<Samer.El-Haj-Mahmoud@arm.com>; Sunny Wang <Sunny.Wang@arm.com>;
gjb@semihalf.com; upstream@semihalf.com; Marcin Wojtas
<mw@semihalf.com>
Subject: [edk2-devel] [PATCH 1/1] MdePkg: Add new 16550-compatible
Serial Port Subtypes to DBG2

The Microsoft Debug Port Table 2 (DBG2) specification revision May 31,
2017 adds support for 16550-compatible Serial Port Subtype with
parameters defined in Generic Address Structure (GAS) [1]

Reflect that in the EDK2 headers.

[1]
https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi
-debug-port-table

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
MdePkg/Include/IndustryStandard/DebugPort2Table.h | 1 +
MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h |
5 +++++
2 files changed, 6 insertions(+)

diff --git a/MdePkg/Include/IndustryStandard/DebugPort2Table.h
b/MdePkg/Include/IndustryStandard/DebugPort2Table.h
index 3faa30b76a..9ccfc1b1ee 100644
--- a/MdePkg/Include/IndustryStandard/DebugPort2Table.h
+++ b/MdePkg/Include/IndustryStandard/DebugPort2Table.h
@@ -47,6 +47,7 @@ typedef struct {
#define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART 0x000e #define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_DCC 0x000f #define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_BCM2835_UART 0x0010+#define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_16550_WITH_GAS 0x0012 #define EFI_ACPI_DBG2_PORT_TYPE_1394 0x8001 #define EFI_ACPI_DBG2_PORT_SUBTYPE_1394_STANDARD 0x0000 #define EFI_ACPI_DBG2_PORT_TYPE_USB 0x8002diff --git a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
index 2066c7895e..7796796afe 100644
---
a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
+++ b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.
+++ h
@@ -100,6 +100,11 @@ typedef struct {
/// #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_BCM2835_UART 0x10 +///+/// 16550-compatible with parameters defined in Generic Address Structure+///+#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550_WITH_GAS 0x12+ // // Interrupt Type //--
2.29.0



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75464):
https://edk2.groups.io/g/devel/message/75464
Mute This Topic: https://groups.io/mt/83024903/5985097
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [Sunny.Wang@arm.com]
-=-=-=-=-=-=


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.
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.


Re: [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2

Marcin Wojtas
 

Hi Sunny,


pon., 24 maj 2021 o 04:09 Sunny Wang <Sunny.Wang@arm.com> napisał(a):

Looks good, Marcin.
However, it looks like something wrong with the line-ending. Could you check if your line-ending setting is CR/LF? Did you use /edk2/BaseTools/Scripts/PatchCheck.py tool to check your patch? If not, could you use it? I expect this tool can catch the line-ending problem.
The line endings are fine in my repo, I generated and sent the patch as usual.

And of course prior to sending I ran PatchCheck.py - it complains only
about too long URL line in the commit message, but the line-endings
are ok.

$ python3 /home/mw/git/edk2-workspace/edk2/BaseTools/Scripts/PatchCheck.py -1
Checking git commit: HEAD
MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2
WARNING - Line 9 of commit message is too long (91 >= 76).
[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table
The commit message format passed all checks.
The code passed all checks.

Do you check the line endings in a different way?

Best regards,
Marcin


Best Regards,
Sunny Wang

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marcin Wojtas via groups.io
Sent: Sunday, May 23, 2021 5:15 PM
To: devel@edk2.groups.io
Cc: liming.gao@intel.com; michael.d.kinney@intel.com; leif@nuviainc.com; ardb+tianocore@kernel.org; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Sunny Wang <Sunny.Wang@arm.com>; gjb@semihalf.com; upstream@semihalf.com; Marcin Wojtas <mw@semihalf.com>
Subject: [edk2-devel] [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2

The Microsoft Debug Port Table 2 (DBG2) specification revision May 31, 2017 adds support for 16550-compatible Serial Port Subtype with parameters defined in Generic Address Structure (GAS) [1]

Reflect that in the EDK2 headers.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
MdePkg/Include/IndustryStandard/DebugPort2Table.h | 1 +
MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h | 5 +++++
2 files changed, 6 insertions(+)

diff --git a/MdePkg/Include/IndustryStandard/DebugPort2Table.h b/MdePkg/Include/IndustryStandard/DebugPort2Table.h
index 3faa30b76a..9ccfc1b1ee 100644
--- a/MdePkg/Include/IndustryStandard/DebugPort2Table.h
+++ b/MdePkg/Include/IndustryStandard/DebugPort2Table.h
@@ -47,6 +47,7 @@ typedef struct {
#define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART 0x000e #define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_DCC 0x000f #define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_BCM2835_UART 0x0010+#define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_16550_WITH_GAS 0x0012 #define EFI_ACPI_DBG2_PORT_TYPE_1394 0x8001 #define EFI_ACPI_DBG2_PORT_SUBTYPE_1394_STANDARD 0x0000 #define EFI_ACPI_DBG2_PORT_TYPE_USB 0x8002diff --git a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
index 2066c7895e..7796796afe 100644
--- a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
+++ b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.
+++ h
@@ -100,6 +100,11 @@ typedef struct {
/// #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_BCM2835_UART 0x10 +///+/// 16550-compatible with parameters defined in Generic Address Structure+///+#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550_WITH_GAS 0x12+ // // Interrupt Type //--
2.29.0



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75464): https://edk2.groups.io/g/devel/message/75464
Mute This Topic: https://groups.io/mt/83024903/5985097
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [Sunny.Wang@arm.com] -=-=-=-=-=-=


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.


Re: [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2

Sunny Wang
 

Looks good, Marcin.
However, it looks like something wrong with the line-ending. Could you check if your line-ending setting is CR/LF? Did you use /edk2/BaseTools/Scripts/PatchCheck.py tool to check your patch? If not, could you use it? I expect this tool can catch the line-ending problem.

Best Regards,
Sunny Wang

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marcin Wojtas via groups.io
Sent: Sunday, May 23, 2021 5:15 PM
To: devel@edk2.groups.io
Cc: liming.gao@intel.com; michael.d.kinney@intel.com; leif@nuviainc.com; ardb+tianocore@kernel.org; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>; Sunny Wang <Sunny.Wang@arm.com>; gjb@semihalf.com; upstream@semihalf.com; Marcin Wojtas <mw@semihalf.com>
Subject: [edk2-devel] [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2

The Microsoft Debug Port Table 2 (DBG2) specification revision May 31, 2017 adds support for 16550-compatible Serial Port Subtype with parameters defined in Generic Address Structure (GAS) [1]

Reflect that in the EDK2 headers.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
MdePkg/Include/IndustryStandard/DebugPort2Table.h | 1 +
MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h | 5 +++++
2 files changed, 6 insertions(+)

diff --git a/MdePkg/Include/IndustryStandard/DebugPort2Table.h b/MdePkg/Include/IndustryStandard/DebugPort2Table.h
index 3faa30b76a..9ccfc1b1ee 100644
--- a/MdePkg/Include/IndustryStandard/DebugPort2Table.h
+++ b/MdePkg/Include/IndustryStandard/DebugPort2Table.h
@@ -47,6 +47,7 @@ typedef struct {
#define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART 0x000e #define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_DCC 0x000f #define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_BCM2835_UART 0x0010+#define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_16550_WITH_GAS 0x0012 #define EFI_ACPI_DBG2_PORT_TYPE_1394 0x8001 #define EFI_ACPI_DBG2_PORT_SUBTYPE_1394_STANDARD 0x0000 #define EFI_ACPI_DBG2_PORT_TYPE_USB 0x8002diff --git a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
index 2066c7895e..7796796afe 100644
--- a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
+++ b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.
+++ h
@@ -100,6 +100,11 @@ typedef struct {
/// #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_BCM2835_UART 0x10 +///+/// 16550-compatible with parameters defined in Generic Address Structure+///+#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550_WITH_GAS 0x12+ // // Interrupt Type //--
2.29.0



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75464): https://edk2.groups.io/g/devel/message/75464
Mute This Topic: https://groups.io/mt/83024903/5985097
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [Sunny.Wang@arm.com] -=-=-=-=-=-=


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.


[PATCH v2] MinPlatformPkg/Fsp: Rebase fail when python tools path exist whitespace

IanX Kuo
 

From: IanX Kuo <ianx.kuo@intel.com>

(a) C:\Users\<UserName>\AppData\Local\Program\Python\Python38
(b) C:\Python38
(c) C:\Program Files\Python38
Issue only happens on (a) and (c).
(a) happen on <UserName> have whitespace. Ex: Tony Chen
(c) happen on "Program Files" have whitespace.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: IanX Kuo <ianx.kuo@intel.com>
---
.../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py | 6 +++++-
.../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 2 ++
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBa=
seAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBin=
BaseAddress.py
index 406e5ec130..a3d5263ad0 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre=
ss.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre=
ss.py
@@ -70,12 +70,16 @@ for line in flashmap.split("\n"):
file.close()=0D
=0D
#=0D
-# Get FSP-M Size, in order to calculate the FSP-T Base. Used SplitFspBin.p=
y script =0D
+# Get FSP-M Size, in order to calculate the FSP-T Base. Used SplitFspBin.p=
y script=0D
# to dump the header, and get the ImageSize in FSP-M section=0D
#=0D
pythontool =3D 'python'=0D
if 'PYTHON_HOME' in os.environ:=0D
pythontool =3D os.environ['PYTHON_HOME'] + os.sep + 'python'=0D
+else:=0D
+ pythontool =3D sys.executable=0D
+pythontool =3D "\"" + pythontool + "\""=0D
+=0D
Process =3D subprocess.Popen([pythontool, splitFspBinPath, "info","-f",fsp=
BinFilePath], stdout=3Dsubprocess.PIPE)=0D
Output =3D Process.communicate()[0]=0D
FsptInfo =3D Output.rsplit(b"FSP_M", 1);=0D
diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddres=
s.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
index fb4cf4f9b7..50e442a500 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
@@ -70,6 +70,8 @@ if 'PYTHON_HOME' in os.environ:
pythontool =3D os.environ['PYTHON_HOME'] + os.sep + 'python'=0D
else:=0D
pythontool =3D sys.executable=0D
+pythontool =3D "\"" + pythontool + "\""=0D
+=0D
Process =3D subprocess.Popen([pythontool, splitFspBinPath, "info","-f",fsp=
BinFilePath], stdout=3Dsubprocess.PIPE)=0D
Output =3D Process.communicate()[0]=0D
FsptInfo =3D Output.rsplit(b"FSP_M", 1);=0D
--=20
2.27.0.windows.1


[PATCH v1] MinPlatformPkg/Fsp: Rebase fail when python tools path exist whitespace

IanX Kuo
 

From: IanX Kuo <ianx.kuo@intel.com>

(a) C:\Users\<UserName>\AppData\Local\Program\Python\Python38
(b) C:\Python38
(c) C:\Program Files\Python38
Issue only happens on (a) and (c).
(a) happen on <UserName> have whitespace. Ex: Tony Chen
(c) happen on "Program Files" have whitespace.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: IanX Kuo <ianx.kuo@intel.com>
---
.../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py | 6 +++++-
.../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 4 +++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBa=
seAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBin=
BaseAddress.py
index 406e5ec130..de2d49d55e 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre=
ss.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre=
ss.py
@@ -1,6 +1,6 @@
## @ RebaseAndPatchFspBinBaseAddress.py=0D
#=0D
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>=0D
+# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>=0D
# SPDX-License-Identifier: BSD-2-Clause-Patent=0D
#=0D
=0D
@@ -76,6 +76,10 @@ file.close()
pythontool =3D 'python'=0D
if 'PYTHON_HOME' in os.environ:=0D
pythontool =3D os.environ['PYTHON_HOME'] + os.sep + 'python'=0D
+else:=0D
+ pythontool =3D sys.executable=0D
+pythontool =3D "\"" + pythontool + "\""=0D
+=0D
Process =3D subprocess.Popen([pythontool, splitFspBinPath, "info","-f",fsp=
BinFilePath], stdout=3Dsubprocess.PIPE)=0D
Output =3D Process.communicate()[0]=0D
FsptInfo =3D Output.rsplit(b"FSP_M", 1);=0D
diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddres=
s.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
index fb4cf4f9b7..d9adb78ca2 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
@@ -1,6 +1,6 @@
## @ RebaseFspBinBaseAddress.py=0D
#=0D
-# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>=0D
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>=0D
# SPDX-License-Identifier: BSD-2-Clause-Patent=0D
#=0D
=0D
@@ -70,6 +70,8 @@ if 'PYTHON_HOME' in os.environ:
pythontool =3D os.environ['PYTHON_HOME'] + os.sep + 'python'=0D
else:=0D
pythontool =3D sys.executable=0D
+pythontool =3D "\"" + pythontool + "\""=0D
+=0D
Process =3D subprocess.Popen([pythontool, splitFspBinPath, "info","-f",fsp=
BinFilePath], stdout=3Dsubprocess.PIPE)=0D
Output =3D Process.communicate()[0]=0D
FsptInfo =3D Output.rsplit(b"FSP_M", 1);=0D
--=20
2.30.0.windows.1


Re: [tianocore.github.io.wiki PATCH 1/1] Xcode.md: Update instructions to work on modern macOS and Xcode versions

Andrew Fish
 

I’ll take a look . I need to grab a blank system and give it a try.

On May 23, 2021, at 9:12 AM, Rebecca Cran <rebecca@bsdio.com> wrote:

On 5/23/2021 2:51 AM, Laszlo Ersek wrote:

On 05/21/21 20:28, Rebecca Cran wrote:
Could someone review this please? I submitted it almost 2 weeks ago.
I've been aware of it, but I've not once launched (or even seen) Xcode,
so I can't verify the patch.

One thing by which you could help Andrew review the patch is: pushing
the patched wiki article to your own fork of the wiki on github.com, and
following up with the link in this thread. Then Andrew could review the
rendered article more easily.

Unfortunately I don't know how to fork it! I seem to remember we've had this discussion before, but the original page is https://github.com/tianocore/tianocore.github.io/wiki/Xcode, and I can see the file if I clone https://github.com/tianocore/tianocore.github.io.wiki.git - but if I create a fork, it forks https://github.com/tianocore/tianocore.github.io which is a different site.


--
Rebecca Cran







[PATCH] Silicon/StMMRpmb: Consume MdeLibs.dsc.inc for RegisterFilterLib

Ilias Apalodimas
 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3246

MdeLibs.dsc.inc was added for some basic/default library
instances provided by MdePkg and RegisterFilterLibNull Library
was also added into it as the first version of MdeLibs.dsc.inc.

So update platform dsc to consume MdeLibs.dsc.inc for
RegisterFilterLibNull which will be consumed by IoLib and BaseLib.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
.../PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandalo=
neMmRpmb.dsc b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStanda=
loneMmRpmb.dsc
index f99a47ebf605..266e2297dd09 100644
--- a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpm=
b.dsc
+++ b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpm=
b.dsc
@@ -22,6 +22,8 @@
FLASH_DEFINITION =3D Platform/StandaloneMm/PlatformStandal=
oneMmPkg/PlatformStandaloneMmRpmb.fdf=0D
DEFINE DEBUG_MESSAGE =3D TRUE=0D
=0D
+ !include MdePkg/MdeLibs.dsc.inc=0D
+=0D
##########################################################################=
######=0D
#=0D
# Library Class section - list of all Library Classes needed by this Platf=
orm.=0D
--=20
2.31.1


Re: [tianocore.github.io.wiki PATCH 1/1] Xcode.md: Update instructions to work on modern macOS and Xcode versions

Rebecca Cran
 

On 5/23/2021 2:51 AM, Laszlo Ersek wrote:

On 05/21/21 20:28, Rebecca Cran wrote:
Could someone review this please? I submitted it almost 2 weeks ago.
I've been aware of it, but I've not once launched (or even seen) Xcode,
so I can't verify the patch.

One thing by which you could help Andrew review the patch is: pushing
the patched wiki article to your own fork of the wiki on github.com, and
following up with the link in this thread. Then Andrew could review the
rendered article more easily.

Unfortunately I don't know how to fork it! I seem to remember we've had this discussion before, but the original page is https://github.com/tianocore/tianocore.github.io/wiki/Xcode, and I can see the file if I clone https://github.com/tianocore/tianocore.github.io.wiki.git - but if I create a fork, it forks https://github.com/tianocore/tianocore.github.io which is a different site.


--
Rebecca Cran


Re: [edk2-stable202105 PATCH] MdeModulePkg/VariableLock: downgrade compatibility warnings to DEBUG_WARN

Laszlo Ersek
 

On 05/21/21 22:40, Laszlo Ersek wrote:
Commit a18a9bde36d2 ("MdeModulePkg/Variable/RuntimeDxe: Restore Variable
Lock Protocol behavior", 2020-12-15), for bug 3111, added two such sets of
debug messages that:

(a) are relevant for developers,

(b) yet should not necessarily poke end-users, because no functionality
suffers in practice.

Both message sets are in function VariableLockRequestToLock(): the first
is a generic interface deprecation warning; the second is the
double-locking situation, which we permit for compatibility (return status
EFI_SUCCESS).

Both message sets should be emitted with the DEBUG_WARN mask, not the most
serious DEBUG_ERROR mask. On some platforms, the serial console carries
both terminal traffic, and grave (DEBUG_ERROR-only) log messages. On such
platforms, both message sets may be perceived as a nuisance by end-users,
as there is nothing they can do, and there's nothing they *should* do --
in practice, nothing malfunctions.

(Such a platform is ArmVirtQemu, built with "-D
DEBUG_PRINT_ERROR_LEVEL=0x80000000".)

Cc: Bret Barkelew <bret.barkelew@microsoft.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3410
Fixes: a18a9bde36d2ffc12df29cdced1efa1f8f9f2021
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c
index 7d87e50efdcd..4e1efef9a7e4 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c
@@ -48,9 +48,9 @@ VariableLockRequestToLock (
EFI_STATUS Status;
VARIABLE_POLICY_ENTRY *NewPolicy;

- DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __FUNCTION__));
- DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!\n"));
- DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName));
+ DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __FUNCTION__));
+ DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!\n"));
+ DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName));

NewPolicy = NULL;
Status = CreateBasicVariablePolicy(
@@ -69,13 +69,13 @@ VariableLockRequestToLock (
//
// If the error returned is EFI_ALREADY_STARTED, we need to check the
// current database for the variable and see whether it's locked. If it's
- // locked, we're still fine, but also generate a DEBUG_ERROR message so the
+ // locked, we're still fine, but also generate a DEBUG_WARN message so the
// duplicate lock can be removed.
//
if (Status == EFI_ALREADY_STARTED) {
Status = ValidateSetVariable (VariableName, VendorGuid, 0, 0, NULL);
if (Status == EFI_WRITE_PROTECTED) {
- DEBUG ((DEBUG_ERROR, " Variable: %g %s is already locked!\n", VendorGuid, VariableName));
+ DEBUG ((DEBUG_WARN, " Variable: %g %s is already locked!\n", VendorGuid, VariableName));
Status = EFI_SUCCESS;
} else {
DEBUG ((DEBUG_ERROR, " Variable: %g %s can not be locked!\n", VendorGuid, VariableName));
Merged as commit cfa6ffb113f2, via
<https://github.com/tianocore/edk2/pull/1661>.

Thanks!
Laszlo


Re: [PATCH] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3

Laszlo Ersek
 

On 05/23/21 11:03, Ard Biesheuvel wrote:
On Sun, 23 May 2021 at 10:55, Laszlo Ersek <lersek@redhat.com> wrote:

On 05/21/21 12:49, Joey Gouly wrote:
From: Joey Gouly <joey.gouly@arm.com>
Sent: 09 March 2021 16:45
Subject: [PATCH] ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3
Hi,

A little ping on this. Can someone take a look?

There was a similar patch here, that addressed the same issue https://edk2.groups.io/g/devel/topic/82327316#74401 so I think it would be good get this in.
This even looks like a candidate for edk2-stable202105 to me (it's small
and arguably a clear-cut bugfix).

NB the comment style should be:

//
// Interrupt ID 1020-1023 are reserved:
//

IOW, we need a trailing and a leading empty comment line, plus the
semicolon at the end of the comment should likely be a colon, or maybe
just a period.
With that,

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Thank you, Ard!

Joey, can you please resubmit the patch with the comment fix, and Ard's
R-b, quickly?

Please use the following subject prefix:

[edk2-devel202105 PATCH v2]

Also, please file a bugzilla ticket for this issue at
<https://bugzilla.tianocore.org/>, and include the BZ URL in the commit
message. (It wouldn't be really necessary for such a small patch, but a
ticket is required during the feature freeze.)

Thanks
Laszlo

9081 - 9100 of 84490