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

996 Коммитов

Автор SHA1 Сообщение Дата
Oliver Smith-Denny 260349120b [CHERRY_PICK] AdvLoggerPkg: Use BootServicesData for PreMem Alloc
This is a very small portion cherry-picked from
be9a3d273f. This fixes a breakage
for ARM64 platforms that initialize AdvLogger in PeiCore, which
has a hardcoded assumption that memory is not available at its
start (not true for ARM64 platforms) and so allocating a minimum
of 16 pages for the runtime granularity will fail. This "pre-mem"
buffer gets freed as soon as permanent memory is installed, so we
can allocate it as EfiBootServicesData (which does not use the
runtime allocation granularity of 64k). This also works on x86.
If PcdAdvancedLoggerPeiInRAM is true, we can allocate the full
amount and need the correct runtime type (I do not think this
feature works, for the reason listed above, but that is outside
the scope of this commit).
2024-07-12 10:57:58 -07:00
Oliver Smith-Denny dd13250a79 [CHERRY-PICK] AdvLoggerPkg: Remove NVMe Check from File Logger File Creation
Currently, File Logger will only create the UefiLogs directory on
the ESP if the device is an NVMe device. This is an unneccesary
restriction and is removed in this patch.
2024-07-12 10:57:58 -07:00
Aaron b15f3d42b1
Added information about the dependency on MuVarPolicyFoundationDxe (#378)
## Description

Mfci has a soft dependency on MuVarPolicyFoundationDxe. The phase based
variables (Target\Manufacturer, Target\Product, Target\SerialNumber,
Target\OEM_01 and Target\OEM_02) are locked using
RegisterVarStateVariablePolicy.

Adding documentation to explicitly call out the need for the MsCorePkg's
MuVarPolicyFoundationDxe to enable phase based locking.

- [ ] 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, ...
- [x] 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

Ran CI locally

## Integration Instructions

n/a
2024-02-29 15:02:26 -08:00
Taylor Beebe 69dda0b597
Add StackCheckLib Instances to Platform DSC Files (#446)
## 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:44:50 -08:00
Michael Kubacki dd9d22cb0f .github/workflows/codeql.yml: Use cargo-make 0.37.9
Matches the version specified in rust-toolchain.toml since this is
now checked during build. A file sync will follow in the future to
update the version as it changes in Mu DevOps Version.njk file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-02-26 11:04:32 -05:00
Michael Kubacki 6aae32a580 MsWheaPkg: Add EFIAPI to relevant functions
MsWheaReportHandlerPei() is passed to ReportHwErrRecRouter() for the
MS_WHEA_ERR_REPORT_PS_FN value where that is defined as:

typedef
EFI_STATUS
(EFIAPI *MS_WHEA_ERR_REPORT_PS_FN)(
  IN MS_WHEA_ERROR_ENTRY_MD           *MsWheaEntryMD
  );

So, MsWheaReportHandlerPei() needs to include EFIAPI as well.

Similarly, MsWheaRscHandlerPei() needs EFIAPI due to the definition
of EFI_PEI_RSC_HANDLER_CALLBACK.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>

fixup
2024-02-26 11:04:32 -05:00
Project Mu UEFI Bot [bot] ba26b5d4a7
Repo File Sync: synced file(s) with microsoft/mu_devops (#427) 2024-01-31 13:47:16 -05:00
dependabot[bot] febf37f196
GitHub Action: Bump robinraju/release-downloader from 1.8 to 1.9 (#425)
Bumps
[robinraju/release-downloader](https://github.com/robinraju/release-downloader)
from 1.8 to 1.9.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 09:15:22 -05:00
kuqin12 12f028aaa2
Adding a more adapt python tooling for Advanced Logger v4 (#415)
# 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

This change will allow the advanced logger parser to handle the v4,
which would get lines from the same UEFI boot phase without intercepting
each other. It will also search for the beginning of returned buffer
with more sophisticated logic.

Resolves https://github.com/microsoft/mu_plus/issues/401

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,
...
- [ ] 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

This was tested on both QEMU Q35 and proprietary hardware platform
returned advanced logger buffer binary.

## Integration Instructions

N/A

---------

Co-authored-by: Oliver Smith-Denny <osde@microsoft.com>
2024-01-26 18:10:06 +00:00
kuqin12 832500f138 Fixing Advanced logger wrapping unit test (#417)
# 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

The existing shell test will not take the disabled processors into
account, thus causing the system to have false positive results.

This change updated the logic to tick out disabled cores, removed some
UT logs to avoid spamming the output and replaced all the returned
status with UT_ASSERT for easier troubleshooting.

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

- [ ] 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, ...
- [x] 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

This change was tested on proprietary hardware with multiple cores.

## Integration Instructions

N/A

---------

Co-authored-by: Oliver Smith-Denny <osde@microsoft.com>
(cherry picked from commit 3c47b5f8e2)
2024-01-26 08:40:28 -08:00
John Schock 833db39436 Add call to HdwPortInitialize() when instantiating logger in DXE (#411)
## Description

This change adds a call to AdvancedLoggerHdwPortInitialize() when the
advanced logger is created in the DxeCoreAdvancedLoggerLibConstructor().
Previously, hardware port was only initalized in AdvancedLoggerGetInfo()
if the logging info structure was present at a fixed location or in a
HOB; this would cause writes to the hardware port to potentially fail in
the path where the logger is not initialized until the Constructor is
called.

- [x] Impacts functionality?
- AdvancedLoggerHdwPortInitialize() is now called in the
DxeCoreAdvancedLoggerLibConstructor if the logger is instantiated there.
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Verified on a platform where this was not working due to missing HdwPort
initialization; verified after this patch that it works as expected.

## Integration Instructions

N/A

---------

Co-authored-by: kuqin12 <42554914+kuqin12@users.noreply.github.com>
(cherry picked from commit 6d5e0c5ff2)
2024-01-25 12:33:51 -08:00
Project Mu UEFI Bot [bot] 08fb6f19af
Repo File Sync: synced file(s) with microsoft/mu_devops (#418)
synced local file(s) with
[microsoft/mu_devops](https://github.com/microsoft/mu_devops).

🤖: View the [Repo File Sync Configuration
File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml)
to see how files are synced.



---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#7652167966](https://github.com/microsoft/mu_devops/actions/runs/7652167966)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2024-01-25 11:39:31 -08:00
Joey Vagedes 966192bed8
Update pip-requirements.txt (#421)
## Description

Updates edk2-pytool-extensions and edk2-pytool-library to work with the
latest commit of MU_BASECORE

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

- [ ] 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
2024-01-24 09:38:09 -08:00
Project Mu UEFI Bot [bot] b1f42ea286
Repo File Sync: Support CodeQL Plugin in BaseTools (#416)
synced local file(s) with
[microsoft/mu_devops](https://github.com/microsoft/mu_devops).

🤖: View the [Repo File Sync Configuration
File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml)
to see how files are synced.

---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#7629520553](https://github.com/microsoft/mu_devops/actions/runs/7629520553)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2024-01-23 13:53:43 -05:00
dependabot[bot] f1a14619e6
GitHub Action: Bump actions/cache from 3 to 4 (#412)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 11:01:42 -05:00
Michael Kubacki d19b1ee73f AdvLoggerPkg/SecDebugAgent: Update for 64-bit
Allows the module to be built for 64-bit SEC.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-01-19 21:18:05 -05:00
Michael Kubacki a6a9f87869 AdvLoggerPkg: 64-bit SEC & PEI C Code changes
C code changes for building the code as 64-bit.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-01-19 21:18:05 -05:00
Project Mu UEFI Bot [bot] f434085d77
Repo File Sync: Add Cargo features to Makefile.toml (#409)
synced local file(s) with
[microsoft/mu_devops](https://github.com/microsoft/mu_devops).

🤖: View the [Repo File Sync Configuration
File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml)
to see how files are synced.

---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#7581631119](https://github.com/microsoft/mu_devops/actions/runs/7581631119)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2024-01-19 15:33:56 -05:00
kenlautner c56b9d8809
Removed references to openssllib and it's associated libraries (#410)
## Description
There are some references to BaseCryptLib and Openssl in package dsc
files. In MU_BASECORE Openssl and its BaseCryptLib implementations were
removed so we need to update to using the NULL lib.

- [ ] 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 with CI

## Integration Instructions

N/A
2024-01-19 09:22:14 -08:00
kuqin12 d269a99999
Wrap advanced logger buffer cursor when the logging area is full (#408)
## Description

The advanced logging at runtime is lack of usage. However, this becomes
increasingly important for server platforms, where the system could
potentially stay up for months, or even years. This will make the
advanced logger fill up the buffer during runtime/MM logging well ahead
of a reset event, making the buffer content stale when being reviewed.

This change added a feature PCD guarded feature that, when enabled, will
automatically wrap the LogCurrent cursor to the beginning and continue
to log. This will effectively create a circular buffer as the stale
content will remain in place. The tooling update is still under
development.

- [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, ...
- [x] 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

This was tested on QEMU Q35 along with the UEFI shell based test app to
verify that the entry after wrapping is correct and is multi-threading
safe.

## Integration Instructions

Platforms can enable this feature by setting
`gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerAutoClearEnable|TRUE`
2024-01-18 10:34:13 -08:00
dependabot[bot] de34c20496
pip: bump edk2-pytool-library from 0.19.8 to 0.19.9 (#407)
Bumps
[edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library)
from 0.19.8 to 0.19.9.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-17 11:51:25 -05:00
kuqin12 69d1c094ca
Fixing uninitialized variable build error (#406)
## Description


267e27f6a6
change introduced a build error on certain platforms, due to a local
variable being used uninitialized. This change will set the variable to
0 before usage.

- [ ] 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, ...

## How This Was Tested

This change is tested with LineParserTestApp on QEMU Q35 platform.

## Integration Instructions

N/A
2024-01-12 11:50:23 -08:00
Michael Kubacki ca8ab99908
.git-blame-ignore-revs: Ignore Line Ending and Uncrustify only commits (#404)
## Description

Adds commits that only applied Uncrustify formatting or converted
line endings to a .git-blame-ignore-revs file so they are ignored
by git blame. This is supported by GitHub:

https://github.blog/changelog/2022-03-24-ignore-commits-in-the-blame-view-beta/

This helps clean up git blame by filtering out these changes.

Note: This file needs to be updated on rebase branches. Processes
      like filter-branch can automatically update relevant SHAs.

- [ ] 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

- `git blame`

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-01-11 09:33:22 -05:00
kuqin12 267e27f6a6
Add prefix for advanced logger memory message entries (#388)
# 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

This change introduces a new message entry structure, which contains
extra information of log producer and can be used to differentiate the
different boot phases, i.e. PEI, DXE, SMM, etc. Platforms that have
multiple firmware entities can leverage this extra information to
distinguish coalesced memory logging regions.

The updated applications (UEFI shell app and host OS Python script) are
also updated to support new message entry structure while maintaining
the backwards compatibility.

Resolves https://github.com/microsoft/mu_plus/issues/375.

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,
...
- [ ] 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, ...
- [x] 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

This change was tested on QEMU Q35 and verified that prefix are properly
injected for DXE phase prints.

## Integration Instructions

The log parsers are updated, thus platforms use the existing parser
should pick up the latest tool from mu_plus. For platforms that carry
their own implementation, they should add the proper support in their
own implementation before picking up this change from mu_plus.
2024-01-10 22:06:18 +00:00
Taylor Beebe 1f5c696742
Remove Pre-Split MemoryProtectionTestApp Files (#405)
## Description


f5354997ae
split the MemoryProtectionTestApp into DXE and SMM instances but did not
delete the old files to give consumers time to update their platform DSC
files. This PR is the breaking change which removes the old files.

- [ ] 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

N/A

## Integration Instructions

N/A
2024-01-10 14:55:28 -05:00
Taylor Beebe f95d40a42b
Fix DxePagingAuditTestApp Typo, Update FlatPageTableLib AARCH64 IsPageReadable() Check (#402)
## Description

DxePagingAuditTestApp: When checking an image section characteristics, a
bitmasking is done which incorrectly includes a logical OR instead of a
bitwise OR.
FlatPageTableLib: The AARCH64 IsPageReadable() routine correctly checks
for the no access, r/w case (0b00) but not the r/w, r/w case (0b01)
because both 0b11 and 0b01 would pass the latter check.

- [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 on a Surface ARM platform and SBSA

## Integration Instructions

N/A
2024-01-09 09:35:56 -08:00
Taylor Beebe 2c40f8a82a
DxePagingAudit: Skip Stack Publishing if Stack Info Isn't Valid (#400)
## Description

The MemoryInfoDatabase.dat file contains information about the content
of memory regions. If an entry in the database file is invalid, it will
break the generation of the paging audit. Before adding the stack info
to the database file, check that the stack size is greater than zero.

- [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 on Q35 by generating the paging audit

## Integration Instructions

N/A
2024-01-05 20:15:19 +00:00
dependabot[bot] f4fb337925
Rust Dependency: Update scroll requirement from 0.11 to 0.12 (#399)
Updates the requirements on [scroll](https://github.com/m4b/scroll) to
permit the latest version.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:48:49 -05:00
Taylor Beebe f79fe549fc DxePagingAudit: Update Shell Tests to Use the Validate Function
Description

This patch updates the shell tests to use the validate function from
the previous patch. This allows the tests to be more exact in reporting
regions which do not meet the memory protection security bar.

- [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 on Q35 by running the app.

Integration Instructions

N/A
2024-01-03 12:43:28 -08:00
Taylor Beebe c04bc553d5 DxePagingAudit: Add Function to Check Attributes Using GetRegionAccessAttributes()
Description

ValidatePageTableAttributes() is a function that validates the attributes
of the input memory region. It uses GetRegionAccessAttributes() to get
the attributes of the region and compares them to the
attributes passed in. This function will be used by each test case
to check that the page/translation table attributes match the memory
protection requirements.

- [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 on Q35 by running the app with the following patch.

Integration Instructions

N/A
2024-01-03 12:43:28 -08:00
Taylor Beebe 93a6a350c5 DxePagingAudit: Pre-allocate Memory For Maps in Shell Tests
Description

The page table map, EFI memory map, and EFI memory space map all
describe the layout of the system address space. Because of this,
if allocations are performed while these maps are being generated,
then the maps generated the earliest will be inaccurate. This
change pre-allocates the memory for these maps before they are
generated to ensure that the maps are consistent.

- [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 on Q35 by running the app with the following patch.

Integration Instructions

N/A
2024-01-03 12:43:28 -08:00
Taylor Beebe c0279a4589 FlatPageTableLib: Update GetRegionAccessAttributes()
Description

GetRegionAccessAttributes() takes an input region description and page
table map and outputs the attributes of that region. Because it's
common for multi-page regions to have varying attributes, the patch
updates the function to return the attributes of the first
attribute-contiguous range found in the region and report the actual
size of that range. This allows the caller to collect the attributes
of the region by calling the function repeatedly instead of needing
to guess which subsection of the region has contiguous attributes.

- [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 on Q35 by running the function.

Integration Instructions

N/A
2024-01-03 12:43:28 -08:00
Taylor Beebe 9156848eb6 FlatPageTableLib: Add a Dump Table Function
Description

This patch adds a function to dump the contents of a flat page
table to the console. This is useful for debugging.

- [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 on Q35 by running the function.

Integration Instructions

N/A
2024-01-03 12:43:28 -08:00
Taylor Beebe ce6280a3c0 DxePagingAudit: Always Write Out All Files
Description

This updates the paging audit to always write out all .dat files
even if the buffers are empty. The presence of the file acts
as a receipt that the audit was run successfully and helps with
automated unit testing.

- [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 on Q35 by creating the paging audit.

Integration Instructions

N/A
2024-01-03 12:43:28 -08:00
dependabot[bot] 1b3c447e4b
pip: bump regex from 2023.10.3 to 2023.12.25 (#398)
Bumps [regex](https://github.com/mrabarnett/mrab-regex) from 2023.10.3
to 2023.12.25.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-28 10:09:13 -08:00
Aaron 710c92218b
Add PeiCore method to find AdvancedLogger log buffer if LoggerInfo is… (#389)
## Description

This was discovered in a platform that uses AdvancedLogger Starting in
Pei, but without permanent memory until after MRC runs.
(i.e. AdvancedLoggerLib PeiCore instance allocates CAR heap for the log
buffer)

The platform makes uses of EFI_PEI_TEMPORARY_RAM_DONE_PPI, where is
tears down all variable range MTRRs.

When PeiCore is reentered after memory has become available, it will
relocate Hobs to system memory, then it will go through the Hobs and fix
up the memory allocation pointers to point to the system memory
addresses instead of the Heap addresses.

During this transition, the PlatformBlob pointer will become invalid,
after CAR is torn down.

During the PeiCore's `PeiServicesInstallPpi (&mMemoryDiscoveredPpi);`, a
debug message will attempt to be output about the `Install PPI: ` of the
Memory Discovered Ppi, and the current logic will attempt to use the
PlatformBlob, which results in a memory exception (the pointer is all
Fs).

This PR updates the logic in `AdvancedLoggerGetLoggerInfo` to verify the
PlatformBlob pointer contains the correct signature before returning it,
and if that fails, it then will go through Memory Allocation Hobs to try
to find a memory allocation that corresponds to the AdvancedLogger
buffer. If it fails, it will fall through to the existing functionality
of creating a new allocation hob.

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,
...
- [ ] 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

Verified that the system that was triggering an exception was able to
function correctly after this change was incorporated.

## Integration Instructions

N/A
2023-12-20 19:40:41 -08:00
dependabot[bot] 066c9b81b0
pip: bump edk2-pytool-extensions from 0.26.3 to 0.26.4 (#397)
Bumps
[edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions)
from 0.26.3 to 0.26.4.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 11:15:40 -05:00
Project Mu UEFI Bot [bot] 26a6b4b00f
Repo File Sync: Update GitHub actions in CodeQL workflow (#396)
synced local file(s) with
[microsoft/mu_devops](https://github.com/microsoft/mu_devops).

🤖: View the [Repo File Sync Configuration
File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml)
to see how files are synced.



---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#7264686520](https://github.com/microsoft/mu_devops/actions/runs/7264686520)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-12-19 13:22:24 -05:00
dependabot[bot] 0d6e728e43
Rust Dependency: Update mockall requirement from 0.11.4 to 0.12.0 (#392)
Updates the requirements on
[mockall](https://github.com/asomers/mockall) to permit the latest
version.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 11:50:54 -05:00
dependabot[bot] b0356011c7
pip: bump edk2-pytool-library from 0.19.7 to 0.19.8 (#391)
Bumps
[edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library)
from 0.19.7 to 0.19.8.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 23:42:23 +00:00
dependabot[bot] 02d2349b0f
pip: bump edk2-pytool-extensions from 0.26.2 to 0.26.3 (#390)
Bumps
[edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions)
from 0.26.2 to 0.26.3.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 22:30:33 +00:00
John Schock 298478fa55
Implement a new version of UefiHidDxeV2 with significant improvements to unit test capability and general architecture. (#374)
## Description

This PR introduces a "v2" implementation of UefiHidDxe that has
significant refactoring to support unit tests and architectural
improvements.
- UefiHidDxeV2 code coverage with unit tests is ~80% or greater for all
modules of the UefiHidDxe crate
- Better separation between FFI layers and native rust layers 

The long term plan is to eventually remove the original UefiHidDxe in
favor of this implementation.

- [x] Impacts functionality?
- Driver provides the same functionality as UefiHidDxe which should be
considered deprecated going forward.
- [ ] Impacts security?
- [ ] Breaking change?
- [x] Includes tests?
  - Includes Rust unit tests covering all new modules.
- [x] Includes documentation?
  - Standard rustdocs included.

## How This Was Tested

Tested under QEMU using simulated USB keyboard and mouse.

## Integration Instructions

UefiHidDxeV2 is a drop-in replacement for UefiHidDxe; platforms that
wish to move to the new implementation can do so by pulling in the new
UefiHidDxeV2 and adding the necessary mockall crate to their workspace
Cargo.toml.
2023-12-14 02:55:47 +00:00
Michael Kubacki bb8910fe10
MsGraphicsPkg/SimpleUIToolKit: Move array bounds check before access (#386)
## Description

Checks the index is within expected bounds before accessing the array.

- [ ] 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

CodeQL and package compilation.

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-12-13 02:01:02 +00:00
Michael Kubacki d9ed9de9e2 MsWheaPkg/MsWheaEarlyStorageLib: Remove unsigned comparisons to zero
Removes an unnecessary condition since unsigned values are always
greater than or equal to 0.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-12-12 20:39:02 -05:00
Michael Kubacki fd620ac233 MsWheaPkg/MsWheaEarlyStorageLib: Remove unused static function
Removes `MsWheaCMOSStoreClearAll()` which is scoped to the file and
not used. Improves code readability and maintenance.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-12-12 20:39:02 -05:00
Michael Kubacki 3d3b828364 Add header guards missing in some files
Some header files, such as those which define structures or classes,
cannot be included more than once within a translation unit, as doing
so would cause a redefinition error. Such headers must be guarded to
prevent ill-effects from multiple inclusion. Similarly, if header
files include other header files, and this inclusion graph contains
a cycle, then at least one file within the cycle must contain header
guards in order to break the cycle. Because of cases like these, all
headers should be guarded as a matter of good practice, even if they
do not strictly need to be.

Furthermore, most modern compilers contain optimizations which are
triggered by header guards. If the header guard strictly conforms
to the pattern that compilers expect, then inclusions of that
header other than the first have absolutely no effect: the file
isn't re-read from disk, nor is it re-tokenised or re-preprocessed.
This can result in a noticeable, albeit minor, improvement to
compilation time.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-12-12 20:39:02 -05:00
kuqin12 c67a13efe7
Adding policy check for advanced file logger (#384)
# 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

This change added support for enablement/disablement of advanced file
logger through policy services. Platforms intending to support this
functionality should produce policy prior to the driver load. The
default configuration is set to file logger enabled.

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,
...
- [ ] 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, ...
- [x] 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

This is tested on QEMU Q35 and verified that not creating policy will
remain producing log files, and disabling the policy will prevent the
driver from logging any files to ESP.

## Integration Instructions

In platform code, use `SetPolicy` with `gAdvancedFileLoggerPolicyGuid`
to produce a policy entry for file logger driver to consume.
2023-12-12 10:48:47 -08:00
dependabot[bot] 045991a8b4
GitHub Action: Bump actions/setup-python from 4 to 5 (#383)
Bumps [actions/setup-python](https://github.com/actions/setup-python)
from 4 to 5.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 13:22:35 -05:00
Taylor Beebe ef5218ab09
DxePagingAudit: Update MemoryOutsideEfiMemoryMapIsInaccessible Test (#381)
## Description

1. MemoryOutsideEfiMemoryMapIsInaccessible checks if memory not present
in the EFI memory map has the EFI_MEMORY_RP attribute. The previous
version of this test assumed that the memory range spanned by the EFI
memory map was contiguous which is sometimes not the case on platforms.
This update changes the flow of the test to look at interstitial gaps in
the memory map and not just those on the flanks.

2. The EFI memory map returned through the boot services table is
sometimes out of order. This update sorts the memory map and memory
space map whenever they're populated for a test.

3. The X64 MemoryOutsideEfiMemoryMapIsInaccessible HTML test had a typo
which is fixed in this update.

- [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, ...
- [x] 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 on Q35 and ARM

## Integration Instructions

N/A
2023-12-08 20:56:20 +00:00
kuqin12 36cec67a40
Minor debug print updates for DxePagingAuditTestApp (#382)
## Description

This change updated some print levels and added the PDB name for images
being looked at.

- [ ] 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, ...
- [x] 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 on proprietary virtual ARM platform and verified updated prints
works as expected.

## Integration Instructions

N/A
2023-12-08 12:35:34 -08:00