public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel][PATCH 0/2] Platform/RPi: Fix compilation warnings
@ 2020-03-09 14:21 Pete Batard
  2020-03-09 14:21 ` [edk2-devel][PATCH 1/2] Platform/RPi/AcpiTables: Fix ASL " Pete Batard
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pete Batard @ 2020-03-09 14:21 UTC (permalink / raw)
  To: devel; +Cc: ard.biesheuvel, leif, philmd, awarkentin

This addresses the following warnings, that are generated during
compilation of the RPi firmware:

------------------------------------------------------------------

/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    165:       })
Warning  3150 -                                                            Empty Resource Template (END_TAG only) ^

/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    173:       Name (_GPI, Buffer()
Warning  3133 -                                                                                      Unknown reserved name ^  (_GPI)

/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    189:       Name (_GCI, Buffer()
Warning  3133 -                                                                                      Unknown reserved name ^  (_GCI)

/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    218:       Name (_GDI, Buffer()
Warning  3133 -                                                                                      Unknown reserved name ^  (_GDI)

/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    354:                     Offset (0),
Remark   2158 -                                                                            Unnecessary/redundant use of Offset operator ^

------------------------------------------------------------------

VfrCompile...
/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(240): WARNING: default
        : default value re-defined with different value

VfrCompile...
/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(246): WARNING: default
        : default value re-defined with different value

VfrCompile...
/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(252): WARNING: default
        : default value re-defined with different value

VfrCompile...
/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(258): WARNING: default
        : default value re-defined with different value

VfrCompile...
/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(264): WARNING: default
        : default value re-defined with different value

VfrCompile...
/usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(270): WARNING: default
        : default value re-defined with different value

------------------------------------------------------------------

Pete Batard (2):
  Platform/RPi/AcpiTables: Fix ASL compilation warnings
  Platform/RPi/ConfigDxe: Fix a compilation warning

 Platform/RaspberryPi/AcpiTables/AcpiTables.inf          | 3 +++
 Platform/RaspberryPi/AcpiTables/Xhci.asl                | 1 -
 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr | 6 ------
 Platform/RaspberryPi/RPi3/RPi3.dsc                      | 2 +-
 Platform/RaspberryPi/RPi4/RPi4.dsc                      | 2 +-
 Platform/RaspberryPi/RaspberryPi.dec                    | 2 +-
 6 files changed, 6 insertions(+), 10 deletions(-)

-- 
2.21.0.windows.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [edk2-devel][PATCH 1/2] Platform/RPi/AcpiTables: Fix ASL compilation warnings
  2020-03-09 14:21 [edk2-devel][PATCH 0/2] Platform/RPi: Fix compilation warnings Pete Batard
@ 2020-03-09 14:21 ` Pete Batard
  2020-03-09 14:21 ` [edk2-devel][PATCH 2/2] Platform/RPi/ConfigDxe: Fix a compilation warning Pete Batard
  2020-03-25  9:37 ` [edk2-devel][PATCH 0/2] Platform/RPi: Fix compilation warnings Ard Biesheuvel
  2 siblings, 0 replies; 4+ messages in thread
From: Pete Batard @ 2020-03-09 14:21 UTC (permalink / raw)
  To: devel; +Cc: ard.biesheuvel, leif, philmd, awarkentin

Silence 2 warnings from pep.asl:
* "Warning 3133 - Unknown reserved name (_GPI/_GCI/_GDI)"
* "Warning 3150 - Empty Resource Template", which is caused by
   section "Name (_CRS, ResourceTemplate () {})"

Remove "Offset(0)" in Xhci.asl, which produces the warning:
"Unnecessary/redundant use of Offset operator".

Signed-off-by: Pete Batard <pete@akeo.ie>
---
 Platform/RaspberryPi/AcpiTables/AcpiTables.inf | 3 +++
 Platform/RaspberryPi/AcpiTables/Xhci.asl       | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/AcpiTables/AcpiTables.inf b/Platform/RaspberryPi/AcpiTables/AcpiTables.inf
index c95d75ed01bb..9ad5246d6bb6 100644
--- a/Platform/RaspberryPi/AcpiTables/AcpiTables.inf
+++ b/Platform/RaspberryPi/AcpiTables/AcpiTables.inf
@@ -56,3 +56,6 @@ [FixedPcd]
   gBcmNetTokenSpaceGuid.PcdBcmGenetRegistersAddress
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
   gEmbeddedTokenSpaceGuid.PcdInterruptBaseAddress
+
+[BuildOptions]
+  GCC:*_*_*_ASL_FLAGS       = -vw3133 -vw3150
diff --git a/Platform/RaspberryPi/AcpiTables/Xhci.asl b/Platform/RaspberryPi/AcpiTables/Xhci.asl
index 0083d1992936..bc3fea60f925 100644
--- a/Platform/RaspberryPi/AcpiTables/Xhci.asl
+++ b/Platform/RaspberryPi/AcpiTables/Xhci.asl
@@ -118,7 +118,6 @@ Device (SCB0) {
         Method (_INI, 0, Serialized) {
             OperationRegion (PCFG, SystemMemory, SANITIZED_PCIE_REG_BASE + PCIE_EXT_CFG_DATA, 0x1000)
             Field (PCFG, AnyAcc, NoLock, Preserve) {
-                Offset (0),
                 VNID, 16, // Vendor ID
                 DVID, 16, // Device ID
                 CMND, 16, // Command register
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [edk2-devel][PATCH 2/2] Platform/RPi/ConfigDxe: Fix a compilation warning
  2020-03-09 14:21 [edk2-devel][PATCH 0/2] Platform/RPi: Fix compilation warnings Pete Batard
  2020-03-09 14:21 ` [edk2-devel][PATCH 1/2] Platform/RPi/AcpiTables: Fix ASL " Pete Batard
@ 2020-03-09 14:21 ` Pete Batard
  2020-03-25  9:37 ` [edk2-devel][PATCH 0/2] Platform/RPi: Fix compilation warnings Ard Biesheuvel
  2 siblings, 0 replies; 4+ messages in thread
From: Pete Batard @ 2020-03-09 14:21 UTC (permalink / raw)
  To: devel; +Cc: ard.biesheuvel, leif, philmd, awarkentin

This fixes "WARNING: default value re-defined with different value"
being produced when trying to set default values for the Scaled
VModes in ConfigDxeHii.vfr.

This warning is generated regardless of what the default value is
being set to and since we don't actually care about setting a default
value, as long as the PCD is properly set, we choose to simply remove
the default.

We also ensure that all the PCDs are set to the expected default value.

Signed-off-by: Pete Batard <pete@akeo.ie>
---
 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr | 6 ------
 Platform/RaspberryPi/RPi3/RPi3.dsc                      | 2 +-
 Platform/RaspberryPi/RPi4/RPi4.dsc                      | 2 +-
 Platform/RaspberryPi/RaspberryPi.dec                    | 2 +-
 4 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr
index 2a15e0f5096e..10c9e646f621 100644
--- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr
+++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr
@@ -365,42 +365,36 @@ formset
             prompt      = STRING_TOKEN(STR_DISPLAY_VMODES_640_PROMPT),
             help        = STRING_TOKEN(STR_DISPLAY_VMODES_640_HELP),
             flags       = CHECKBOX_DEFAULT | CHECKBOX_DEFAULT_MFG | RESET_REQUIRED,
-            default     = TRUE,
         endcheckbox;
 
         checkbox varid = DisplayEnableScaledVModes.v800,
             prompt      = STRING_TOKEN(STR_DISPLAY_VMODES_800_PROMPT),
             help        = STRING_TOKEN(STR_DISPLAY_VMODES_800_HELP),
             flags       = CHECKBOX_DEFAULT | CHECKBOX_DEFAULT_MFG | RESET_REQUIRED,
-            default     = TRUE,
         endcheckbox;
 
         checkbox varid = DisplayEnableScaledVModes.v1024,
             prompt      = STRING_TOKEN(STR_DISPLAY_VMODES_1024_PROMPT),
             help        = STRING_TOKEN(STR_DISPLAY_VMODES_1024_HELP),
             flags       = CHECKBOX_DEFAULT | CHECKBOX_DEFAULT_MFG | RESET_REQUIRED,
-            default     = TRUE,
         endcheckbox;
 
         checkbox varid = DisplayEnableScaledVModes.v720p,
             prompt      = STRING_TOKEN(STR_DISPLAY_VMODES_720_PROMPT),
             help        = STRING_TOKEN(STR_DISPLAY_VMODES_720_HELP),
             flags       = CHECKBOX_DEFAULT | CHECKBOX_DEFAULT_MFG | RESET_REQUIRED,
-            default     = TRUE,
         endcheckbox;
 
         checkbox varid = DisplayEnableScaledVModes.v1080p,
             prompt      = STRING_TOKEN(STR_DISPLAY_VMODES_1080_PROMPT),
             help        = STRING_TOKEN(STR_DISPLAY_VMODES_1080_HELP),
             flags       = CHECKBOX_DEFAULT | CHECKBOX_DEFAULT_MFG | RESET_REQUIRED,
-            default     = TRUE,
         endcheckbox;
 
         checkbox varid = DisplayEnableScaledVModes.Physical,
             prompt      = STRING_TOKEN(STR_DISPLAY_VMODES_REAL_PROMPT),
             help        = STRING_TOKEN(STR_DISPLAY_VMODES_REAL_HELP),
             flags       = CHECKBOX_DEFAULT | CHECKBOX_DEFAULT_MFG | RESET_REQUIRED,
-            default     = TRUE,
         endcheckbox;
 
         oneof varid = DisplayEnableSShot.Enable,
diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 91d5738afbc6..8266a92f3958 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -436,7 +436,7 @@ [PcdsDynamicHii.common.DEFAULT]
   #
   # Display-related.
   #
-  gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes|L"DisplayEnableScaledVModes"|gConfigDxeFormSetGuid|0x0|0xff
+  gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes|L"DisplayEnableScaledVModes"|gConfigDxeFormSetGuid|0x0|0x3f
   gRaspberryPiTokenSpaceGuid.PcdDisplayEnableSShot|L"DisplayEnableSShot"|gConfigDxeFormSetGuid|0x0|1
 
   #
diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc
index 2e98c3e16b91..85b5f024ef1b 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -475,7 +475,7 @@ [PcdsDynamicHii.common.DEFAULT]
   #
   # Display-related.
   #
-  gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes|L"DisplayEnableScaledVModes"|gConfigDxeFormSetGuid|0x0|0xff
+  gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes|L"DisplayEnableScaledVModes"|gConfigDxeFormSetGuid|0x0|0x3f
   gRaspberryPiTokenSpaceGuid.PcdDisplayEnableSShot|L"DisplayEnableSShot"|gConfigDxeFormSetGuid|0x0|1
 
   #
diff --git a/Platform/RaspberryPi/RaspberryPi.dec b/Platform/RaspberryPi/RaspberryPi.dec
index 1355cdee0534..10e0ef95a749 100644
--- a/Platform/RaspberryPi/RaspberryPi.dec
+++ b/Platform/RaspberryPi/RaspberryPi.dec
@@ -56,7 +56,7 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
   gRaspberryPiTokenSpaceGuid.PcdDebugEnableJTAG|0|UINT32|0x00000014
   gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|0|UINT32|0x00000015
   gRaspberryPiTokenSpaceGuid.PcdCustomCpuClock|0|UINT32|0x00000016
-  gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes|0|UINT8|0x00000017
+  gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes|0x3F|UINT8|0x00000017
   gRaspberryPiTokenSpaceGuid.PcdDisplayEnableSShot|0|UINT32|0x00000018
   gRaspberryPiTokenSpaceGuid.PcdOptDeviceTree|1|UINT32|0x0000001B
   gRaspberryPiTokenSpaceGuid.PcdRamMoreThan3GB|0|UINT32|0x00000019
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-devel][PATCH 0/2] Platform/RPi: Fix compilation warnings
  2020-03-09 14:21 [edk2-devel][PATCH 0/2] Platform/RPi: Fix compilation warnings Pete Batard
  2020-03-09 14:21 ` [edk2-devel][PATCH 1/2] Platform/RPi/AcpiTables: Fix ASL " Pete Batard
  2020-03-09 14:21 ` [edk2-devel][PATCH 2/2] Platform/RPi/ConfigDxe: Fix a compilation warning Pete Batard
@ 2020-03-25  9:37 ` Ard Biesheuvel
  2 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2020-03-25  9:37 UTC (permalink / raw)
  To: Pete Batard
  Cc: edk2-devel-groups-io, Leif Lindholm, Philippe Mathieu-Daudé,
	Andrei Warkentin

On Mon, 9 Mar 2020 at 15:21, Pete Batard <pete@akeo.ie> wrote:
>
> This addresses the following warnings, that are generated during
> compilation of the RPi firmware:
>

Thanks Pete

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Pushed as 3daa70143953..79c06cfaeaee


> ------------------------------------------------------------------
>
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    165:       })
> Warning  3150 -                                                            Empty Resource Template (END_TAG only) ^
>
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    173:       Name (_GPI, Buffer()
> Warning  3133 -                                                                                      Unknown reserved name ^  (_GPI)
>
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    189:       Name (_GCI, Buffer()
> Warning  3133 -                                                                                      Unknown reserved name ^  (_GCI)
>
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    218:       Name (_GDI, Buffer()
> Warning  3133 -                                                                                      Unknown reserved name ^  (_GDI)
>
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii    354:                     Offset (0),
> Remark   2158 -                                                                            Unnecessary/redundant use of Offset operator ^
>
> ------------------------------------------------------------------
>
> VfrCompile...
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(240): WARNING: default
>         : default value re-defined with different value
>
> VfrCompile...
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(246): WARNING: default
>         : default value re-defined with different value
>
> VfrCompile...
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(252): WARNING: default
>         : default value re-defined with different value
>
> VfrCompile...
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(258): WARNING: default
>         : default value re-defined with different value
>
> VfrCompile...
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(264): WARNING: default
>         : default value re-defined with different value
>
> VfrCompile...
> /usr/src/Build/RPi4/DEBUG_GCC5/AARCH64/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe/OUTPUT/ConfigDxeHii.i(270): WARNING: default
>         : default value re-defined with different value
>
> ------------------------------------------------------------------
>
> Pete Batard (2):
>   Platform/RPi/AcpiTables: Fix ASL compilation warnings
>   Platform/RPi/ConfigDxe: Fix a compilation warning
>
>  Platform/RaspberryPi/AcpiTables/AcpiTables.inf          | 3 +++
>  Platform/RaspberryPi/AcpiTables/Xhci.asl                | 1 -
>  Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr | 6 ------
>  Platform/RaspberryPi/RPi3/RPi3.dsc                      | 2 +-
>  Platform/RaspberryPi/RPi4/RPi4.dsc                      | 2 +-
>  Platform/RaspberryPi/RaspberryPi.dec                    | 2 +-
>  6 files changed, 6 insertions(+), 10 deletions(-)
>
> --
> 2.21.0.windows.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-25  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-09 14:21 [edk2-devel][PATCH 0/2] Platform/RPi: Fix compilation warnings Pete Batard
2020-03-09 14:21 ` [edk2-devel][PATCH 1/2] Platform/RPi/AcpiTables: Fix ASL " Pete Batard
2020-03-09 14:21 ` [edk2-devel][PATCH 2/2] Platform/RPi/ConfigDxe: Fix a compilation warning Pete Batard
2020-03-25  9:37 ` [edk2-devel][PATCH 0/2] Platform/RPi: Fix compilation warnings Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox