Граф коммитов

1025 Коммитов

Автор SHA1 Сообщение Дата
Taylor Beebe 3377f2f9e1
Add StackCheckLib Instances to Platform DSC Files (#216)
## Description

An instance of StackCheckLib must be in each DSC to accommodate
-fstack-protector and /GS flags.

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

Tested in pipelines

## Integration Instructions

N/A
2024-02-29 09:47:28 -08:00
Oliver Smith-Denny 7f821af07a Fix CodeQL issue in PL061Gpio 2024-02-01 08:15:58 -08:00
Michael Kubacki f594d427c9
MemoryInitPei: Remove Non-RT Types from Mem Type Info HOB (#168)
## Description

MemoryInitPei: Remove Non-RT Types from Mem Type Info HOB

Removes the following types from the memory type information HOBs
produced in the MemoryInitPei modules in ArmPlatformPkg and ArmVirtPkg.

- `EfiBootServicesCode`
- `EfiBootServicesData`
- `EfiLoaderCode`
- `EfiLoaderData`

When the memory type information UEFI variable is updated in BDS,
it goes through the common variable check code attached to the UEFI
variable driver which explicitly checks the size of the variable data
to determine if the variable update is valid.

MemoryTypeInfoVarCheckHandler () in
MdeModulePkg/Library/MemoryTypeInfoSecVarCheckLib/MemoryTypeInfoSecVarCheckLib.c.

The size here is `0x50` instead of the expected size of `0x30`. It
is not common to place non-runtime memory types in the memory type
information HOB so the types are removed from the HOB published
here to align with typical code expectations.

UEFI variable update error:

```
  ERROR: MemoryTypeInfoVarCheckHandler() - DataSize = 0x50 Expected = 0x30
  Variable Check handler fail Security Violation -
    4C19049F-4137-4DD3-9C10-8B97A83FFDFA:MemoryTypeInformation
  Memory Type Information settings cannot be saved. OS S4 may fail!
```

Some Arm platforms may use a different UEFI variable driver that does
not perform this check. If the types are truly needed, the variable
check code should be updated to compensate for them.

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

- ArmPlatformPkg build and CI
- ArmVirtPkg build and CI
- QemuSbsaPkg build and boot to EFI shell with test apps

## Integration Instructions

Review code to determine if either of these PEIMs (`MemoryInitPeim`).
If so, whether code was dependent on the memory types in the memory
type information HOB that were removed to determine if further changes
are needed.

---------

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-10-18 16:25:41 -07:00
Chris Fernald 4a690ce072
[CHERRY-PICK] Add the ability to configure the memory type used for the FD region (#141)
## Description

Add the ability to configure the memory type used for the FD region on
the non-secure UEFI side.

- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Tested on internal platform build.

## Integration Instructions

N/A

Cherry pick of
https://github.com/microsoft/mu_silicon_arm_tiano/pull/140
2023-07-13 13:59:49 -07:00
Joey Vagedes c866ea13f5
ci.yaml: add PrEval entry (#133)
## Description

Adds a PrEval entry to all ci.yaml files to enable PrEval Policy 5.

- [ ] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

N/A

## Integration Instructions

N/A
2023-07-12 16:38:11 +00:00
Ken Lautner aaed267e9c REBASE: Removed a reference to an inf that no longer exists 2023-05-12 21:33:18 -07:00
Oliver Smith-Denny 6354ba00c8 Set RTC and Runtime Flash MMIO as XP by Default (#96)
Please ensure you have read the [contribution
docs](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md) prior
to submitting the pull request. In particular,
[pull request
guidelines](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md#pull-request-best-practices).

When `SetMemorySpaceAttributes()` is called with CPU arch attributes
set, it will unset any attributes not explicitly set. In the RTC and
runtime flash MMIO code, this is the `EFI_MEMORY_XP` bit that gets
unset, which is a potential security and safety issue.

This PR fixes up callers to `SetMemorySpaceAttributes()` that are
clearing the `EFI_MEMORY_XP` bit to explicitly set it.

The NorFlashDxe driver is a runtime driver to map flash to MMIO, this
should be mapped XP at such a time as during runtime we will not be
executing from the flash region.

For each item, place an "x" in between `[` and `]` if true. Example:
`[x]`.
_(you can also check items in the GitHub UI)_

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [x] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

Tested to build and on QEMU, though I do not have hardware that uses
these RTCs.

N/A.
2023-05-12 18:25:51 -07:00
Chris Fernald cc556cecc4 Create ARM platform library function for customizing PEI memory (#63)
## Description

Creates a new function in the ARM platform library to allow the platform
to customize the location of the initial PEI memory installation region.

- [ ] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [x] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

Tested against the SBSA platform with custom memory initialization
logic.

## Integration Instructions

Platforms with their own arm platform package will need to add
implementation of ArmPlatformGetPeiMemory that returns FALSE to be
unaffected.
2023-05-12 18:25:04 -07:00
Michael Kubacki bb0004b35a Convert line endings from LF to CRLF (#45)
# Preface

Please ensure you have read the [contribution
docs](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md) prior
to submitting the pull request. In particular,
[pull request
guidelines](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md#pull-request-best-practices).

## Description

Updates the repo to match Tianocore requirements to use CRLF line
endings.

This allows this repo to pass CI against the latest mu_basecore.

- [ ] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Verified results with Line Ending Check CI plugin on Ubuntu.

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-05-12 18:25:04 -07:00
Ken Lautner ed9ef112fc Fixed debug print having to many variables 2023-05-12 18:15:25 -07:00
Arti Gupta 4113f017d3 Merged PR 5288: Updated PL011UartLib.c to not wait indefinitely during read
Updated PL011UartLib.c to not wait indefinitely during read
2023-05-12 18:00:01 -07:00
Sean Brogan 316c51576a Rebase - Updates for moved ArmCompilerIntrinsicsLib 2023-05-12 18:00:01 -07:00
Omkar Anand Kulkarni 73d4adf22b C-P: ArmPlatformPkg: Add Readme file
Added a readme file that explains the software framework for dynamic
generation of HEST table.

Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni@arm.com>
Change-Id: Iafe54949948ddf15c1d769cf5886caba589409ba
(cherry picked from commit 9486a4a10844142e872ed6553aac420a1f66a9bf)
2023-05-12 18:00:00 -07:00
Bret Barkelew bd24f1118a ArmPkg and ArmPlatformPkg: Resolve build errors resulting from package moves 2023-05-12 18:00:00 -07:00
Bret Barkelew 926446e92d ArmPlatformPkg: Update to pass CI 2023-05-12 14:38:43 -07:00
Bret Barkelew c6ad06356c [BUGFIX] Resolve CI issues created by ARM patches 2023-05-12 14:38:18 -07:00
Omkar Anand Kulkarni 771efcc216 [C-P] ArmPlatformPkg: retreive error source descriptors from MM
Add a driver that retreives error source descriptors from MM and
populates those into the HEST ACPI table. The error source descriptors
that are available from the MM side are retreived using MM Communicate 2
protocol.

The first call into the MM returns the size of MM Communicate buffer
required to hold all error source descriptor info. The communication
buffer of that size is then allocated and the second call into MM
returns the error source descriptors in the communication buffer.
The retreived error source descriptors are then appended to the HEST
table.

Co-authored-by: Thomas Abraham <thomas.abraham@arm.com>
Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni@arm.com>
Change-Id: I6355616db838c1a0720dc783c92c9bd907ed4d18
2023-05-12 14:37:10 -07:00
Omkar Anand Kulkarni 98df8d7ed8 [C-P] ArmPlatformPkg: add definition for MM_HEST_ERROR_SOURCE_DESC_PROTOCOL
Add the protocol definition of the MM_HEST_ERROR_SOURCE_DESC_PROTOCOL
protocol. This protocol can be implemented by MM drivers to publish
error source descriptors that have to be populated into HEST table.

Co-authored-by: Thomas Abraham <thomas.abraham@arm.com>
Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni@arm.com>
Change-Id: I8fc5538cf2a5cba1707929fa4c7660649ccee7c2
2023-05-12 14:37:10 -07:00
Omkar Anand Kulkarni a8ba39da62 [C-P] ArmPlatformPkg: Allow dynamic generation of HEST ACPI table
Introduce the HEST table generation protocol that allows platforms to
build the table with multiple error source descriptors and install the
table. The protocols provides two interfaces. The first interface allows
for adding multiple error source descriptors into the HEST table. The
second interface can then be used to dynamically installed the fully
populated HEST table. This allows multiple drivers and/or libraries to
dynamically register error source descriptors into the HEST table.

Co-authored-by: Thomas Abraham <thomas.abraham@arm.com>
Signed-off-by: Omkar Anand Kulkarni <omkar.kulkarni@arm.com>
Change-Id: I72ce299cc71d487355d5e7795aae9efb318975eb
2023-05-12 14:37:10 -07:00
Bret Barkelew 61352c6a49 [TCBZ3351] ArmPlatformPkg: Update LcdHwNullLib to prevent init
Library previously returned EFI_SUCCESS which causes the platform to
continue initializing LCD HW. Should return EFI_NOT_FOUND.
2023-05-12 14:37:10 -07:00
Chris Oo 9fde45ed67 Merged PR 2327612: Merge changes required to build AARCH64 for Hyper-V
Related work items: #17155713
2023-05-12 14:37:10 -07:00
Kurt Kennett 00908c9f8b Merged PR 972782: Add changes required for arm64 vs tools to work
First batch of changes to permit VS2017 ARM64 tools to build required elements.

Related work items: #14268301
2023-05-12 14:37:10 -07:00
Ard Biesheuvel cc650a0378 ArmPlatformPkg: Retire NorFlashDxe driver
The NorFlashDxe driver in ArmPlatformPkg was shared between development
platforms built by ARM Ltd, and virtual platforms that were once modeled
after Versatile Express, but have very little in common with actual bare
metal implementations.

Both sides have migrated to a domain specific version of the driver, so
we can retire the old one.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
2022-11-06 15:21:12 +00:00
Rebecca Cran 56035d1c8b ArmPlatformPkg/PrePeiCore: Print the firmware version early in boot
Copy code from PrePi to PrePeiCore that prints the firmware version
and build date early in the boot process.

Signed-off-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Tested-by: Oliver Steffen <osteffen@redhat.com>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
2022-10-25 16:26:25 +00:00
Ard Biesheuvel fb493ac84e ArmPlatformPkg/PrePeiCore: permit entry with the MMU enabled
Some platforms may set up a preliminary ID map in flash and enter EFI
with the MMU and caches enabled, as this removes a lot of the complexity
around cache coherency. Let's take this into account, and avoid touching
the MMU controls or perform cache invalidation when the MMU is enabled
at entry.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
2022-10-24 14:30:33 +00:00
Michael Kubacki 917a7e3f34 ArmPlatformPkg/NorFlashDxe: Remove unused debug print specifier
These debug messages are repeated in both NorFlashBlockIoReadBlocks()
and NorFlashBlockIoWriteBlocks():

  "NorFlashBlockIoWriteBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x"
  "bytes (%d kB), BufferPtr @ 0x%08x)\n"

Although this requires 5 arguments, only 4 are provided. The kilobyte
value was never given.

This change removes that specifier so the 4 arguments match the 4
specifiers in the debug macro.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
2022-09-09 01:42:39 +00:00
Pierre Gondois 1926702c95 ArmPlatformPkg: Remove duplicated words
In an effort to clean the documentation of the above
package, remove duplicated words.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.muajwar@arm.com>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
2022-09-05 13:52:51 +00:00
Rohit Mathew 22c45b7c52 ArmPlatformPkg/PrePeiCore: Invoke constructors for SEC phase
On platforms that do not have the serial console port pre-initialized
prior to the SEC phase and due to the absence of a call to
"SerialPortInitialize", this results in missing debug logs. So, call
the auto-generated "ProcessLibraryConstructorList" function from SEC
phase to have all the dependent library constructors called
(this includes a call to "SerialPortInitialize").

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-09-05 13:52:51 +00:00
Thomas Abraham f304308e1c ArmPlatformPkg: Add PCD for serial debug port interrupt
For Arm platforms that support more that one serial port, one of the
serial port can be used for connecting debuggers such as WinDbg. There
are PCDs that allow the base address and clock rate to be specified for
this debug serial port but not its interrupt number. So add a PCD to
specify the interrupt number assigned to the serial debug port
controller.

Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-06-22 17:31:49 +00:00
Rebecca Cran 3930d1791a ArmPlatformPkg: Remove overly verbose DEBUG lines in LcdGraphicsBlt
The DEBUG output in LcdGraphicsBlt is overly verbose, and makes using
the console difficult, for example when using the UiApp.

Since the extra output should no longer be needed, delete the DEBUG
lines.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-06-22 14:57:31 +00:00
Rebecca Cran b55b6d33e4 ArmPlatformPkg: Remove RVCT support
RVCT is obsolete and no longer used.
Remove support for it.

Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-13 14:58:54 +00:00
Rebecca Cran 101f4c7892 ArmPlatformPkg: Fix EDK2_DSC check in Scripts/Makefile
With GNU Make 4.2.1, ifeq ($(EDK2_DSC),"") doesn't catch the case where
EDK2_DSC isn't defined. So, switch to using ifndef.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-03 09:12:27 +00:00
Rebecca Cran 5299568ce6 ArmPlatformPkg: Fix target initialisation in cmd_load_symbols.py
The debugger in Arm Development Studio 2021.2 doesn't work with
"ec = debugger.getExecutionContext(0)" because it's subsequently unable
to access memory. Fix it by switching to
"ec = debugger.getCurrentExecutionContext()".

The documentation for waitForStop() says:

"It is not needed after a call to stop() because stop() is blocking."

So, remove the call to waitForStop.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-03 09:12:27 +00:00
Rebecca Cran daa6cd8763 ArmPlatformPkg: Fix error message in Scripts/Ds5/edk2_debugger.py
An error message in Scripts/Ds5/edk2_debugger.py was missing the word
'not'.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-03 09:12:27 +00:00
Rebecca Cran 103fa647d1 ArmPkg: Replace CoreId and ClusterId with Mpidr in ARM_CORE_INFO struct
Remove the ClusterId and CoreId fields in the ARM_CORE_INFO structure in
favor of a new Mpidr field. Update code in
ArmPlatformPkg/PrePeiCore/MainMPCore and ArmPlatformPkg/PrePi/MainMPCore.c
to use the new field and call new macros GET_MPIDR_AFF0 and GET_MPIDR_AFF1
instead.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-01-30 11:04:41 +00:00
Michael Kubacki 40b0b23ed3 ArmPlatformPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the ArmPlatformPkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Andrew Fish <afish@apple.com>
2021-12-07 17:24:28 +00:00
Michael D Kinney 2863ba97ca ArmPlatformPkg: Change OPTIONAL keyword usage style
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760

Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>
2021-12-07 17:24:28 +00:00
Michael D Kinney 1d2482e1e3 ArmPlatformPkg: Change use of EFI_D_* to DEBUG_*
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739

Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-12-07 17:24:28 +00:00
Michael D Kinney 1939fc9569 ArmPlatformPkg: Update YAML to ignore specific ECC files/errors
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3749

Update package YAML files to ignore ECC errors that are
already present.  These issues must be fixed in the future,
but should not block source code changes for these known
issues.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-11-30 14:19:07 +00:00
Grzegorz Bernacki a97e9e327e ArmPlatformPkg: Create include file for default key content.
This commits add file which can be included by platform Flash
Description File. It allows to specify certificate files, which
will be embedded into binary file. The content of these files
can be used to initialize Secure Boot default keys and databases.

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
Reviewed-by: Sunny Wang <sunny.wang@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-03 07:26:41 +00:00
Artem Kopotev fddb8d24ec ArmPlatformPkg/Scripts: Infer dll load address from console output
cmd_load_symbols.py can only load symbols from FV. Add the possibility to
use UEFI console output to calculate dll load address and send
add-symbol-file commands directly to ArmDS debugger

dll load address can't be used directly from UEFI output, see comment in
DebugPeCoffExtraActionLib: "This may not work correctly if you generate
PE/COFF directly as then the Offset would not be required".

1) Use objdump -S module.dll | grep <_ModuleEntryPoint> to get offset
in dll (offset)
2) Use Entrypoint=<address> from UEFI console output (entrypoint)
3) dll load address is (entrypoint)-(offset)

Signed-off-by: Artem Kopotev <artem.kopotev@arm.com>
Tested-by: Pierre Gondois <Pierre.Gondois@arm.com>
2021-07-19 07:38:14 +00:00
Sean Brogan 610385fa3b ArmPlatformPkg: SpellCheck: Switch spellcheck CI to AuditOnly
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3445

Spellcheck was not covering all specified files due to CSpell v5 and
Node v10 incompatibility of current CI pipeline configuration.

This change switches the spellcheck for ArmPlatformPkg to AuditOnly to
avoid potentially numerous spell errors. The correction action is to be
revisited by package maintainers once the tool incompatibility is
resolved.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>

Signed-off-by: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-06-16 14:40:00 +00:00
Pierre Gondois 1cb1087749 ArmPlatformPkg: Add ArmPlatformPkg.ci.yaml
Add ArmPlatformPkg.ci.yaml to configure the CI for the
ArmPlatformPkg.

Cc: Bret Barkelew <bret.barkelew@microsoft.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-28 12:03:51 +00:00
Pierre Gondois ecfe47968e ArmPlatformPkg: Document libraries in ArmPlatformPkg.dec
This patch documents the libraries advertised in ArmPlatformPkg.dec.

Cc: Bret Barkelew <bret.barkelew@microsoft.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-28 12:03:51 +00:00
Pierre Gondois a4d95d7cf9 ArmPkg: Fix Ecc error 8001 in Chipset
This patch fixes the following Ecc reported error:
Only capital letters are allowed to be used
for #define declarations

Edk2 coding standard stating that:
"Names starting with one or two underscores, such as
_MACRO_GUARD_FILE_NAME_H_, must not be used."
the include guard of ArmCortexA5x.h is also updated.

Ref:
https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/
5_source_files/53_include_files#
5-3-5-all-include-file-contents-must-be-protected-by-a-include-guard

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-15 19:53:39 +00:00
Pierre Gondois 8948fb0974 ArmPlatformPkg: Remove package dependency in NorFlashStandaloneMm
The DependencyCheck available in .pytool detects an unnecessary
dependency of the NorFlashStandaloneMm.inf module over the
EmbeddedPkg package.
This patch removes this dependency.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Tested-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-04-15 19:24:14 +00:00
Pierre Gondois 890e6d466c ArmPlatformPkg: Fix Ecc error 9001
This patch fixes the following Ecc reported error:
INF/DEC/DSC/FDF file header comment should begin
with "## @file" or "# @file" at the very top file

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-15 19:24:14 +00:00
Pierre Gondois 5a5440d0dc ArmPlatformPkg: Fix Ecc error 8001
This patch fixes the following Ecc reported error:
File header doesn't exist File header comment missing
the ""Copyright""

Even though a copyright is present in the header file,
the leading '*' char prevents the Ecc tool from detecting it.
According to the edk2 coding specifcation, section 5.2.3
"File Heading", there should not be leading '*' char.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-15 19:24:14 +00:00
Dandan Bi 96afc54688 ArmPlatformPkg: Consume MdeLibs.dsc.inc for RegisterFilterLib
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

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.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-03-31 05:47:10 +00:00
Ard Biesheuvel 4f214830ce ArmPlatformPkg/NorFlashDxe: use correct PCD accessors
Commit 8015f3f6d4 ("ArmPlatformPkg: Enable support for flash in
64-bit address space") updated the NorFlash DXE and StMM drivers to
take alternate PCDs into account when discovering the base of the
NOR flash regions.

This introduced a disparity between the declarations of the PCD references
in the .INF files, which permits the use of dynamic PCDs, and the code
itself, which now uses FixedPcdGet() accessors. On platforms that actually
use dynamic PCDs, this results in a build error.

So let's clean this up:
- for the DXE version, use the generic PcdGet() accessors, so dynamic PCDs
  are permitted
- for the standalone MM version, redeclare the PCDs as [FixedPcd] in the
  .INF description, and switch to the FixedPcdGet() accessors.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
2021-01-18 11:19:45 +00:00