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

2206 Коммитов

Автор SHA1 Сообщение Дата
Taylor Beebe 08525ef85c
Update MU_BASECORE, Remove VariablePolicyFuncTestApp Test Exemption (#708)
## Description

VariablePolicyFuncTestApp now passes on Q35 and SBSA.

- [ ] 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 in the CI pipelines

## Integration Instructions

N/A
2023-09-21 11:02:45 -07:00
Antaeus Kleinert-Strand 9fe12eacd0
Clean-up Q35 and Sbsa PlatformBuild.py (#702)
## Description

* Update Sbsa PlatformBuild.py
  * Pull in changes from Q35 PlatformBuild.py
  * Remove redundant code
* Update import order and function comments in Q35 package.

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

* Validated the Sbsa package builds and boots to UEFI shell.

## Integration Instructions

N/A
2023-09-18 18:58:16 +00:00
Michael Kubacki dab532f9df
QemuQ35Pkg/PlatformBuild.py: Make workspace root stable (#705)
## Description

The root is currently determined using `cwd()` which can cause the
root to be relative to the directory where the stuart command is
invoked from. It should always return the same absolute path so
`cwd()` is removed.

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

QemuQ35Pkg build from the root directory and subdirectories.

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-09-18 11:39:29 -04:00
Michael Kubacki 3585039ec6 QemuQ35Pkg/PlatformBuild.py: Add CodeQL filtering support
Makes a number of adjustments in PlatformBuild.py as outlined below.
The main improvement is adding support to recursively gather CodeQL
filter files within the repo.

1. Remove unused imports at the top of the file.
2. Replace local functionality with common implementation in the
   `codeql_helpers` module.
3. Remove trailing whitespace throughout the file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-09-07 12:46:00 -04:00
Oliver Smith-Denny 766366a287
Remove Unused Environment Variables (#695)
## Description

There are several errors produced when building QemuQ35Pkg and
QemuSbsaPkg indicating that some relative paths cannot be converted to
absolute paths. This is because these paths do not exist in the code
tree anymore.

This patch removes the unused env vars.

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

Still builds without these.

## Integration Instructions

N/A.
2023-09-06 17:50:39 +00:00
Michael Kubacki 62723e6a46
QemuQ35Pkg/SmmAccess: Add missing include guard (#691)
## Description

All header files should have include guards.

See the following for more info:

https://codeql.github.com/codeql-query-help/cpp/cpp-missing-header-guard/

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

- CI build
- Ran CodeQL with `cpp-missing-header-guard` enabled

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-09-05 12:16:34 -04:00
Taylor Beebe a6b19efe36
Remove physical presence from Q35 and SBSA (#687)
## Description

The physical presence check is a poor way to determine if a user is
actually physically present at the machine. Because some security checks
can be bypassed with physical presence, set physical presence to FALSE.

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

## How This Was Tested

Tested on Q35 and SBSA

## Integration Instructions

N/A
2023-08-31 16:28:22 +00:00
Michael Kubacki f22b9c4c25
QemuRunner: Prevent virtual drive unknown image format warning (#686)
## Description

The virtual drive image is passed with the following parameter:

  `-hdd <VirtualDrivePath>`

This results in the following warning:

```
WARNING: Image format was not specified for 'VirtualDrive.img' and
         probing guessed raw.

         Automatically detecting the format is dangerous for raw
         images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the
         restrictions.
```

This passes the image using `-drive` to resolve the warning.

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

- QemuQ35Pkg and QemuSbsaPkg build and run

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-08-31 02:43:46 +00:00
Michael Kubacki 1af2309fb4 Add HelloWorldRustDxe to QemuQ35Pkg and QemuSbsaPkg
Adds the driver to both packages to demonstrate a Rust based UEFI
DXE driver executing during boot on a X64 and AARCH64 system.

A workspace Cargo.toml file is added for cargo make. Since this repo
is the "leaf of a dependency chain" in that it builds binaries that
are integrated into the platform build, the `Cargo.lock` file is
checked in per the guidance in:
https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-08-30 19:03:45 -04:00
Michael Kubacki 4871be91bd
Integrate UefiCpuLib breaking change (#689)
## Description

Updates the repo for a change that merged UefiCpuLib with CpuLib.

UefiCpuLib will be removed entirely soon so all references are updated
to CpuLib.

Includes the following submodule updates:

- `MU_BASECORE` to `v2023020005.0.1`
- `Common/MU` to `v2023020001.4.1`
- `Common/MU_TIANO` to `v2023020001.4.1`
- `Features/MM_SUPV` to `v8.1.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

- CI package build (via PR checks)

## Integration Instructions

N/A

---

Associated Changes in Submodules

- https://github.com/microsoft/mu_feature_mm_supv/pull/164
- https://github.com/microsoft/mu_plus/pull/304
- https://github.com/microsoft/mu_tiano_plus/pull/174

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-08-30 17:59:28 -04:00
Nishanth Sanjeevi 53b5b7fef4
Allow passing any CPU model while invoking QEMU. (#669)
## Description

- Added CpuInfoDxe driver that prints the basic information about the CPU
  model invoked by QEMU.
- Added a command line argument to pass the CPU model to be used while
  invoking QEMU
- Added basic tests to validate the CPU model being used

- [x] Impacts functionality?
Added a new driver that prints CPU model information

- [ ] Impacts security?
N/A

- [ ] Breaking change?
N/A

- [ ] Includes tests?
N/A

- [ ] Includes documentation?
No

## How This Was Tested

Validated the changes on QEMU

## Integration Instructions

N/A
2023-08-30 03:53:30 +00:00
Taylor Beebe f1dd8d5ec1
Bump Common/MU to v2023020001.3.1 and Remove Paging Audit Test Exemption (#683)
## Description

The most recent changes in mu_plus fix the paging audit test failures on
SBSA. This PR pulls in the latest mu_plus, updates the paging audit
calls to reflect the new command line interface, and removes the
PagingAuditTestApp test failure exemption on SBSA.

- [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 in the pipelines

## Integration Instructions

N/A
2023-08-30 00:43:52 +00:00
Joey Vagedes 6c9e3dd1ec
Resolve mws deprecations (#682)
## Description

Per edk2-pytool-extensions, replace the use of mws.join with
ed2path.GetAbsolutePathOnThisSystemFromEdk2RelativePath

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

CI

## Integration Instructions

N/A
2023-08-29 15:40:34 -07:00
Michael Kubacki 0ff647967c
QemuQ35Pkg: Integrate TPM Replay feature (#678)
Closes #677 

## Description

This feature enables experimentation with controlling the TPM
measurements made by firmware. It allows a developer to craft
a TPM event log and have the replayed during boot. It is disabled
by default.

General feature information is available in its readme:

https://github.com/microsoft/mu_plus/blob/HEAD/TpmTestingPkg/TpmReplayPei/Readme.md

It is currently only planned to be used QemuQ35Pkg. It could be
enabled in QemuSbsaPkg in the future if there is interest.

Details about the feature in the context of QEMU, are described in
`Platforms/Docs/Q35/Features/feature_tpm_replay.md` in this change.

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

- Input YAML to binary
- Input JSON to binary
- Input binary to YAML
- Replay events on QEMU Q35 to PCRs
- Verify event log in OS against the input file

## Integration Instructions

See `feature_tpm_replay.md`.

Enable the feature in `QemuQ35Pkg` in the DSC file:

```ini
  DEFINE TPM_REPLAY_ENABLED = TRUE
```

Or, as a `stuart_build` argument:

```bash
> stuart_build -c Platforms/QemuQ35Pkg/PlatformBuild.py --flashrom TOOL_CHAIN_TAG=GCC5 BLD_*_TPM_ENABLE=TRUE \
               BLD_*_TPM_ENABLE=TRUE TPM_DEV=/tmp/mytpm1/swtpm-sock
```

Then, follow instructions to create the TPM Replay
event log and load it.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-08-29 05:48:57 +00:00
Michael Kubacki b341487c01
Platforms/Docs: Refresh features in QEMU Q35 readme (#674)
## Description

- Adds missing features with pre-existing feature readmes
- Adds a Table of Contents and sorts sections to make navigating the
file easier
- Adds some more detail in a few areas

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

- markdownlint

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-08-25 00:46:31 +00:00
Joey Vagedes 87d2a289ce
QemuSbsaPkg.dsc: Don't use BaseMemoryLibOptDxe for MM_STANDALONE (#671)
## Description

BaseMemoryLibOptDxe.inf states that it does not support MM_STANDALONE
for AARCH64 architecture, however the build system does not catch this
restriction.

The build system does not catch this restriction because per the INF
spec, architectural modifiers are not supported for the [Defines]
section.
- [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

CI

## Integration Instructions

N/A
2023-08-23 10:25:49 -07:00
Michael Kubacki 76bad2072f
QemuRunner: Use NVMe for OS boot (#661)
## Description

This section in the QEMU documentation provides an overview of block
device options:

https://www.qemu.org/docs/master/system/qemu-manpage.html#hxtool-1

This change uses an NVMe device for the OS boot drive to exercise
the NVMe driver stack during boot and better reflect more common
modern use cases.

Other block devices mapped are left unchanged as I did not see an
obvious reason to change those right now.

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

- Build and boot to Windows with PATH_TO_OS set to a QCOW2 formatted
image
- Convert the QCOW2 image to VHD and boot again to Windows with
PATH_TO_OS set
- Verify the device is recognized as a NVMe device in UEFI shell
- Verify the OS disk drive is reported as NVMe in the OS

![image](https://github.com/microsoft/mu_tiano_platforms/assets/21320094/0782a8ed-df4c-401e-9653-0d3c1b3a5645)


## Integration Instructions

N/A - From a user perspective PATH_TO_OS works similar to before and
NVMe support is already present in the firmware.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-08-14 13:34:35 -04:00
Michael Kubacki 9fe32e505f QemuSbsaPkg: Change SbsaQemuNorFlashLib library class
Updates the library class to the name used for the header file
in the DEC file and used in consuming code.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-08-01 10:19:07 -04:00
Michael Kubacki a6f7e2859a Clean up ResetSystemLib usage
Remove library class warning messages and consistently link reset
logic across phases.

- Set all `HwResetSystemLib` instances to QEMU platform-specific
  reset logic.
- Set Standalone MM driver and core `HwResetSystemLib` instances
  to `BaseResetSystemLib.inf` in `QemuQ35Pkg`.
- QemuQ35Pkg:
  - Add `HwResetSystemLib` library class to `BaseResetSystemLib`
    and `DxeResetSystemLib` library instances.
  - Drop phase bindings in `BaseResetSystemLib` as content is not
    specific to those phases.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-08-01 10:19:07 -04:00
Michael Kubacki 391248e2e4 QemuQ35Pkg/XenHypercallLib: Add QemuPkg to packages section
`gEfiXenInfoGuid` is defined in `QemuPkg.dec`.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-07-28 20:43:13 -04:00
Michael Kubacki 5bd5b0a015
Add BIOS version and release date to SMBIOS (#646)
## Description

- Adds the BIOS version and date to Type 0 (BIOS) structure.
- Changes BIOS vendor to "Project Mu" so its easier to trace project
info.
- Adds the QEMU version to the Type 1 (System) version field.
- Q35: Changes System product from "MuQemuQ35" to "QEMU Q35".
- SBSA: Changes System product from "MuQemuQ35" to "QEMU SBSA".
- SBSA: Fixes asset tag values from "Q35" to "SBSA"

Other related minor cleanup.

The goal is to clean up firmware and system information and make it more
useful.

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

1. Verified values in QEMU run command.
2. Read values from `smbiosview` in the EFI shell.
3. Read relevant values from Windows UI.

## Integration Instructions

Review values modified and see if they affect tests or features
dependent on SMBIOS information.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-07-27 21:44:45 +00:00
Michael Kubacki cdec9bc934
Use "usb-tablet" instead of "usb-mouse" as the pointer device (#645)
## Description

`usb-tablet` and `usb-mouse` both override the default PS/2 emulation
when enabled. `usb-tablet` uses absolute coordinates and allows QEMU
to report the mouse position without grabbing the device.

It also tracks the mouse cursor more accurately.

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

QEMU Windows guest on Windows and Linux host.

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-07-27 17:02:43 -04:00
Taylor Beebe 3fbb9d450b
Update Test Exemptions (#643) 2023-07-21 09:10:33 -07:00
Chris Fernald 7b1bfe2b24
Fix support for TPM on Q35 (#633)
## Description

Fixes issue related to enabling TPM for QEMU Q35.

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

## How This Was Tested

Locally tested with Windows boot.

## Integration Instructions

N/A
2023-07-18 17:51:20 -07:00
Doug Flick b6d3f4cbb6
QemuRunner: Add support for QCOW2 images (#635)
# 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 adds support for both VHD and QCOW2 images by using the extension
to determine which storage rule should be used for qemu See [Issue
607](https://github.com/microsoft/mu_tiano_platforms/issues/607)

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?
  - Adds back functionality for qcow2 images
- [ ] Impacts security?
  - N/A
- [ ] Breaking change?
  - N/A
- [ ] Includes tests?
  - N/A
- [ ] Includes documentation?
  - N/A
  
## How This Was Tested
This was used to run both a vhd image and a cow2 image, to confirm
backward compatibility the resultant string was also compared

## Integration Instructions
N/A
2023-07-14 16:59:17 -07:00
Joey Vagedes 895797216b
QemuSbsaPkg: Remove uncessary env setting (#630)
## Description

Removes "TARGET_ARCH" and "ACTIVE_PLATFORM" from being set inside the
RetrieveCommandLineOptions() function. These are already set in the
SetPlatformEnv() function, which is the common place for them to be set.

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

CI

## Integration Instructions

N/A
2023-07-11 08:13:17 -07:00
kenlautner bf423a3b88
Use correct Openssl inf for SBSA (#625)
## Description

Changed the openssl inf version used to be the full version to match
expected functionality. Additionally disabled NETWORK_ISCSI_ENABLE as we
weren't using it.

Extra crypto functionality include:
1. Every SHA hash function. The default openssl version support SHA256
only.
2. X509 full functionality (this is connected with item 3)
3. ECC for TLS and other crypto features (item #2)

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

## How This Was Tested

Passed BaseCryptLib Unit Tests.

## Integration Instructions

N/A
2023-07-07 12:35:45 -07:00
kuqin12 f1a3463a3b
SBSA update: TFA and RngLib (#626)
# 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

Current SBSA is using timer based RngLib, which is not appropriate as an
example. This change updated the library to be instruction based.

Note that this instruction may not be available on all instructions
sets.

The change also updates to the latest TFA release for our own
housekeeping.

Fixes https://github.com/microsoft/mu_tiano_platforms/issues/616.

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

Booted SBSA platform firmware to Windows desktop.

## Integration Instructions

N/A
2023-07-05 19:34:13 -07:00
Taylor Beebe d297f745db
Update Test Exemptions (#624)
## Description

Remove unnecessary exemptions and extend lingering exemptions two weeks.

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

CI pipelines

## Integration Instructions

N/A

Co-authored-by: Taylor Beebe <t@taylorbeebe.com>
2023-07-05 10:13:05 -07:00
kuqin12 cfcc0309a2
Removed extra indirection of policy creation from a separate model (#611)
# 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 removed the individual policy initializers from platform
level since they are centralized to `ConfigKnobs`.

This change also removed the Depex in `ConfigKnobs` driver to fix the
dependency change.

Fixes https://github.com/microsoft/mu_tiano_platforms/issues/610.

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 change was tested on QemuSbsa and booted to Windows. The QemuQ35 is
also tested and booted to shell.

## Integration Instructions

N/A
2023-06-28 21:47:19 +00:00
kuqin12 b8ba64852a
mu_oem_sample and mu_feature_config submodule update (#599)
# 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

Update OEM sample repo to **v2023020000.0.2** and mu_feature_config repo
to **v0.3.4** for mu_tiano_platforms.

The corresponding configuration module usage is also simplified to pair
with the submodule changes.

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, ...
- [ ] 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 locally on Q35 and SBSA.

## Integration Instructions

Added a new configuration build variable for profile names on Q35
platform.
2023-06-23 11:40:47 -07:00
kenlautner 7bb7ed874f
Update mu_tiano_platforms to use the release/202302 branches (#590)
## Description

Updates mu_tiano_platforms to use the new release/202302 branches of MU.
Additionally, renamed VmgExitLib to CcExitLib along with it's associated
functions and changed reference openssl inf. Lastly, added the
VirtNorFlashStandaloneMm driver for QemuSbsa.

- Moved Feature/MM_SUPV from v7.3.2 to v8.1.0
- Moved Feature/DFCI from v3.0.0 to top of tree (no new release since
  v3.0.0)
- Moved MU_BASECORE from v2022080002.0.2 to v2023020002.0.0

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

Built and booted QemuQ35 without any problems.

## Integration Instructions

Just update to this branch or later.
2023-06-20 21:39:21 -04:00
Michael Turner 7b53f85c8e
Set the Type3 SN different from the Type1 SN (#589)
## Description

Set the Type 1 and Type 3 serial numbers to different values. This
allows one to see the that UI App has chosen the correct serial number
to display. It also is the source for the Type 1 serial number that
DfciDeviceIdLib uses to inform InTune of the device Serial Number. The
latest test cases will verify the correct serial number.

Used in testing Issue microsoft/mu_oem_sample#102 

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** - Potentially a code break if the wrong serial
number has been used in the past.
- [x] Includes tests?
- **Tests** - The latest Dfci Test cases will verify the correct serial
number.
- [ ] 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 QemuQ35Plg

## Integration Instructions

N/A
2023-06-12 08:47:57 -07:00
kuqin12 b64ad0f86e
Onboarding ARM64 builds on selfhosted Azure pipeline agents (#546)
# 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 a few new matrix entries to support building
mu_tiano_platforms on native ARM64 systems. The PR will cover both
https://github.com/microsoft/mu_basecore/issues/369 and
https://github.com/microsoft/mu_basecore/issues/305.

The running steps on Windows ARM64 is separated from building due to the
lack of support on QEMU Windows-ARM64.

QEMU SBSA building on Linux ARM is temporarily disabled due to a change
needed from BaseTools: . This is pending to be added when release/202302
is available.

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 selfhost-agents and existing agents.

## Integration Instructions

Pipeline changes, N/A for integration.
2023-06-06 16:35:03 -07:00
Taylor Beebe 492457a381 Extend VariablePolicyFuncTestApp and DxePagingAuditTestApp Exemptions
Description

Extend the exemption period for VariablePolicyFuncTestApp and
DxePagingAuditTestApp.

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

Running on Q35 and in the Azure Pipeline

Integration Instructions

N/A
2023-06-06 10:24:47 -07:00
Taylor Beebe 4db32afd7b Remove DeviceIdTestApp Exemption
Description

Adding Smbios Type 3 to the QEMU run command fixed the DeviceIdTestApp
failure.

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

Running on Q35 and in the Azure Pipeline

Integration Instructions

N/A
2023-06-06 10:24:47 -07:00
Taylor Beebe 793d81945d Bugfix: Fix Paging Audit Generation via Unit Test Logic
Description

The generate_paging_audit function requires arguments dictating the
platform and architecture to correctly generate the paging audit.

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

Running on Q35 and in the Azure Pipeline

Integration Instructions

N/A
2023-06-06 10:24:47 -07:00
Taylor Beebe f5746c78f8 Add Necessary Component to Run BootAuditTestApp and Remove Exemption
Description

BootAuditTestApp was previously failing because a variable policy was
not registered for the tested variables. This change adds the necessary
variable policy registration component.

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

Running on Q35 and in the Azure Pipeline

Integration Instructions

N/A
2023-06-06 10:24:47 -07:00
Taylor Beebe 79a69f7a01
Fix Links and Remove Unnecessary Sections in Readme Files (#571)
## Description

Some relative links were broken when the documentation was moved. This
PR fixes those broken relative links and removes some sections which
don't apply.

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

N/A

## Integration Instructions

N/A
2023-05-31 16:03:57 -07:00
Michael Turner a5f312dc86
Build and Run support for a Dfci Enabled Device Under Test (#489)
## Description

Fixes #470.

PRE-REQ. This PR requires the following PR's before this one will work
correctly:
https://github.com/microsoft/mu_tiano_platforms/pull/473
https://github.com/microsoft/mu_tiano_platforms/pull/471
https://github.com/microsoft/mu_feature_dfci/pull/84

This PR will have to bump DfciPkg to include PR 84 above before it is
completed.

This change adds the prereqs for DFCI - that is, platform specific
libraries required to interface between DFCI and a particular platform.
The required DFCI libraries are in PR 471. A convenience PR for booting
to FrontPage or with certain USB device mounted is also require (PR
473).

- [x] Impacts functionality?

- [ ] Impacts security?

- [ ] Breaking change?

- [ ] Includes tests?

- [x] Includes documentation?


## How This Was Tested

With all of the prerequisites included, a Q35 Virtual System was used to
run the Dfci End to End UnitTest with satisfactory results. That is, all
of the test cases ran will full success except Dfci_IntuneSettings -
which exhibits some know errors. This is not fixed due to another
pending change.

## Integration Instructions

N/A
2023-05-26 22:03:39 +00:00
Project Mu Bot [bot] 652bdfe473
Bump MU_BASECORE from 2022080002.0.1 to 2022080002.0.2 (#563)
Bumps MU_BASECORE from `2022080002.0.1` to `2022080002.0.2`

Introduces 10 new commits in
[MU_BASECORE](https://github.com/microsoft/mu_basecore.git).

<details>
<summary>Commits</summary>
<ul>
<li><a
href="a296f04604">a296f0</a>
Introduce Standalone MM Policy Service (<a
href="https://github.com/microsoft/mu_basecore/pull/390">#390</a>)</li>
<li><a
href="d4d7856f93">d4d785</a>
Add basic wrappers to the Policy Library (<a
href="https://github.com/microsoft/mu_basecore/pull/396">#396</a>)</li>
<li><a
href="68f1e801de">68f1e8</a>
pip: update edk2-pytool-extensions requirement from ~=0.23.0 to ~=0.23.2
(<a
href="https://github.com/microsoft/mu_basecore/pull/397">#397</a>)</li>
<li><a
href="346e17b532">346e17</a>
pip: bump edk2-basetools from 0.1.45 to 0.1.48 (<a
href="https://github.com/microsoft/mu_basecore/pull/401">#401</a>)</li>
<li><a
href="19a366b2b3">19a366</a>
Create Github Workflow to publish basetools on release (<a
href="https://github.com/microsoft/mu_basecore/pull/385">#385</a>)</li>
<li><a
href="656456cd5f">656456</a>
Additional CodeQL Fixes (<a
href="https://github.com/microsoft/mu_basecore/pull/400">#400</a>)</li>
<li><a
href="01a4ed58fb">01a4ed</a>
pip: update edk2-pytool-library requirement from ~=0.14.1 to ~=0.15.0
(<a
href="https://github.com/microsoft/mu_basecore/pull/405">#405</a>)</li>
<li><a
href="f421222215">f42122</a>
pip: bump antlr4-python3-runtime from 4.12.0 to 4.13.0 (<a
href="https://github.com/microsoft/mu_basecore/pull/408">#408</a>)</li>
<li><a
href="c03dc558c0">c03dc5</a>
pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.23.3
(<a
href="https://github.com/microsoft/mu_basecore/pull/406">#406</a>)</li>
<li><a
href="3179184b36">317918</a>
[CHERRY-PICK] Stop USB enumeration in case a malformed descriptor is
found (<a
href="https://github.com/microsoft/mu_basecore/pull/410">#410</a>) (<a
href="https://github.com/microsoft/mu_basecore/pull/412">#412</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>
2023-05-24 22:28:13 +00:00
Chris Fernald 97f5960017
Add POPCNT option to Q35 CPU (#545)
## Description

Windows Builds 25855+ require the POPCNT CPU feature. This PR adds this
option to the Q35 CPU options when launching QEMU to ensure
compatibility.

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

## How This Was Tested

Tested on Windows boot locally.

## Integration Instructions

N/A
2023-05-09 11:08:01 -07:00
Taylor Beebe ffa3c99ce0 Remove the LineParserTestApp from the CI Test Exemption List
Description

LineParserTestApp now passes. This PR removes it from the CI test
exemption list.

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

Running the test on Q35 and SBSA

N/A
2023-05-05 11:42:53 -07:00
Taylor Beebe 5f21b68fb8 Enable Advanced Logger in DXE on SBSA
Description

Adds Project Mu's Advanced Logger functionality to SBSA.

An issue has been created to enable Advanced Logger in MM and PEI:
https://github.com/microsoft/mu_tiano_platforms/issues/522

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

Running on SBSA

Integration Instructions

N/A
2023-05-05 11:42:53 -07:00
Taylor Beebe 3598db351d Remove MsWheaEarlyUnitTestApp from Q35 and SBSA
Description

Remove the failure exemption and test from the Q35 and SBSA platform
DSC files. The test is removed from Q35 because the CMOS emulated size
is too small to store WHEA records and from SBSA because no early
store option currently exists on ARM platforms.

- [ ] 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-05-05 11:42:53 -07:00
Taylor Beebe e0b43e20e8
Generate the Paging Audit When Running DxePagingAuditTestApp on Q35 and SBSA (#516)
## Description

Add a step when adding unit tests to the startup.nsh file to add a
second run of DxePagingAuditTestApp with the '-d' parameter to dump the
paging audit files. When reporting results, extract the paging audit
files and create the audit.

With this update, every CI run will contain the paging audit in the
artifacts. Also, whenever DxePagingAuditTestApp.efi is included in a Q35
or SBSA TEST_REGEX, the paging audit will be created and deposited into
the unit_test_results folder.

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

Build and run on SBSA and Q35

## Integration Instructions

N/A
2023-05-02 15:05:04 -07:00
Taylor Beebe f339ea6a72
Output Results of Failure Exempt Tests on Q35 and SBSA (#528)
## Description

The update to use a helper plugin for virtual drive managment changed
the way we filter tests. Instead of report_results() checking for exempt
tests during the report, the Q35 and SBSA platforms would filter out
exempt tests from the test list passed to report_results(). As a result,
the exempt unit tests would not have their XMLs copied to
unit_test_results or have a summary of their results dumped via logging
even if the tests passed.

This PR creates a second list containing only the exempt tests and
passes that to report_results(). By ignoring the output of
report_results() when passing in the exempt test list, we effectively
ignore the failures.

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

Running on Q35 and SBSA

## Integration Instructions

N/A
2023-05-02 16:45:40 +00:00
Taylor Beebe 636090d412
Remove MorLockTestApp from Q35 and SBSA (#511)
## Description

Remove MorLockTestApp from Q35 and SBA and link bugzilla related to the
omission reason.

- [ ] 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-05-01 19:47:14 +00:00
Taylor Beebe a02452d40e
Enable Advanced Logger in DXE on Q35 (#506)
## Description

Adds Project Mu's Advanced Logger functionality to Q35.

An issue has been created to enable Advanced Logger in MM and PEI:
https://github.com/microsoft/mu_tiano_platforms/issues/522

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

Booting on Q35

## Integration Instructions

N/A
2023-04-29 00:36:39 +00:00
Michael Turner 63d0de195f
Add platform libraries DfciDeviceIdSupportLib and DfciUiSupportLib (#471)
## Description

Fixes #470 

Dfci requires the platform to supply a couple of libraries. The
following libraries are added to Qemu package:

- DfciDeviceIdSupportLib
- DfciUiSupportLib

And replaces Null libraries used in the QemuQ35Pkg.dsc file.

- [x] Impacts functionality?
  - Yes, it impacts functionality by enabling Dfci to work in Qemu.
- [ ] Impacts security?

- [ ] Breaking change?

- [ ] Includes tests?

- [ ] Includes documentation?


## How This Was Tested

Tested in a QemuQ35Pkg test system.

## Integration Instructions

N/A
2023-04-28 21:45:55 +00:00