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

30466 Коммитов

Автор SHA1 Сообщение Дата
Michael Kubacki 724be19caa
.github/label-issues.yml: Use Mu DevOps 4.0.5 (#112)
## Description

4.0.5 updates the GitHub Actions used for labeling to include a
bug fix for previous versions trying to delete a label that does not
exist.

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

Already enabled in release/202302 and resolves a workflow error
encountered in the label task.

## Integration Instructions

N/A - Integrated in this change

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-06-28 15:53:57 -04:00
Michael Kubacki a44977512a
[CHERRY-PICK] Fix FV header length (#9) (#92)
## Description

Cherry-pick from release/202202 (commit
[d484285](d484285210)).

Read FV header length from the header instead of using
`sizeof(EFI_FIRMWARE_VOLUME_HEADER)` to account for variable number
of block map entries.

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

(cherry-pick from release/202202)

## Integration Instructions

N/A other than including this change.
2023-05-23 10:40:14 -04:00
dependabot[bot] e2c1a087e1
pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.23.3 (#89)
Updates the requirements on
[edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions)
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-05-22 21:20:00 -04:00
dependabot[bot] b6c00b7cab
pip: bump antlr4-python3-runtime from 4.12.0 to 4.13.0 (#90)
Bumps [antlr4-python3-runtime]() from 4.12.0 to 4.13.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 12:17:13 -04:00
dependabot[bot] 907c542318
pip: bump edk2-pytool-library from 0.14.1 to 0.15.0 (#88)
Bumps
[edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library)
from 0.14.1 to 0.15.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 11:08:41 -04:00
dependabot[bot] c5572c1b7d
pip: bump edk2-basetools from 0.1.45 to 0.1.48 (#87)
Bumps [edk2-basetools](https://github.com/tianocore/edk2-basetools) from
0.1.45 to 0.1.48.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-12 13:28:17 -04:00
dependabot[bot] 732446a8c8
pip: update edk2-pytool-extensions requirement from ~=0.23.0 to ~=0.23.2 (#85)
Updates the requirements on
[edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions)
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-05-10 16:33:29 -04:00
Project Mu UEFI Bot [bot] 8315d57266
Repo File Sync: Update CodeQL workflow trigger (#84)
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
[#4875054279](https://github.com/microsoft/mu_devops/actions/runs/4875054279)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-05-03 22:48:44 -04:00
Project Mu UEFI Bot [bot] 3448d64d6e
Repo File Sync: Always publish logs in CodeQL workflow, fix container safe dir, add issue assignment workflow (#83)
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
[#4832448197](https://github.com/microsoft/mu_devops/actions/runs/4832448197)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-04-28 13:25:23 -04:00
Project Mu UEFI Bot [bot] c3da1ff585
Repo File Sync: Update Fedora 37 container f1c7a20 from to 3b3eb8f (#82)
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
[#4817961331](https://github.com/microsoft/mu_devops/actions/runs/4817961331)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-04-27 11:26:07 -04:00
dependabot[bot] 4e66248ac8
pip: bump edk2-basetools from 0.1.44 to 0.1.45 (#81)
Bumps [edk2-basetools](https://github.com/tianocore/edk2-basetools) from
0.1.44 to 0.1.45.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-26 12:09:05 -04:00
dependabot[bot] 17d1067f36
pip: bump edk2-basetools from 0.1.43 to 0.1.44 (#80)
Bumps [edk2-basetools](https://github.com/tianocore/edk2-basetools) from
0.1.43 to 0.1.44.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 09:19:34 -04:00
Project Mu UEFI Bot [bot] efd087c38b
Repo File Sync: Update to Mu DevOps 2.4.0 (#79)
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
[#4784437996](https://github.com/microsoft/mu_devops/actions/runs/4784437996)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-04-24 22:21:18 -04:00
dependabot[bot] 0a188a1ea2
pip: bump edk2-basetools from 0.1.40 to 0.1.43 (#76)
Bumps [edk2-basetools](https://github.com/tianocore/edk2-basetools) from
0.1.40 to 0.1.43.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 13:36:25 -04:00
dependabot[bot] b73780a994
pip: update edk2-pytool-extensions requirement from ~=0.22.2 to ~=0.23.0 (#78)
Updates the requirements on
[edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions)
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-04-19 12:26:41 -04:00
dependabot[bot] dd780e8b10
pip: bump edk2-pytool-library from 0.14.0 to 0.14.1 (#74)
Bumps
[edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library)
from 0.14.0 to 0.14.1.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 10:03:23 -04:00
Project Mu UEFI Bot [bot] 67e43246bb
Repo File Sync: synced file(s) with microsoft/mu_devops (#77)
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
[#4669375546](https://github.com/microsoft/mu_devops/actions/runs/4669375546)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-04-11 11:46:42 -04:00
Project Mu UEFI Bot [bot] 247b7a90b4
Repo File Sync: synced file(s) with microsoft/mu_devops (#72)
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
[#4656100004](https://github.com/microsoft/mu_devops/actions/runs/4656100004)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-04-10 20:37:48 -04:00
Project Mu UEFI Bot [bot] 8e6ef9456c
Repo File Sync: Update from Mu DevOps 2.2.0 to 2.3.0 (#71)
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
[#4530617788](https://github.com/microsoft/mu_devops/actions/runs/4530617788)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-03-27 11:36:20 -04:00
Project Mu UEFI Bot [bot] b7d8abd4cb
Repo File Sync: Update Fedora 37 image to f1c7a20 and code cov post-processing in PR jobs (#70)
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
[#4509474583](https://github.com/microsoft/mu_devops/actions/runs/4509474583)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-03-24 10:16:16 -04:00
dependabot[bot] 60e921e400
pip: bump edk2-basetools from 0.1.24 to 0.1.40 (#68)
Bumps [edk2-basetools](https://github.com/tianocore/edk2-basetools) from
0.1.24 to 0.1.40.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-17 13:24:48 -04:00
Project Mu UEFI Bot [bot] a379a465be
Repo File Sync: Update from Fedora 35 to Fedora 37 image (#69)
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
[#4445863687](https://github.com/microsoft/mu_devops/actions/runs/4445863687)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-03-17 10:16:52 -04:00
dependabot[bot] e4149776a7
pip: update edk2-pytool-extensions requirement from ~=0.22.1 to ~=0.22.2 (#67)
Updates the requirements on
[edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions)
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-03-09 15:03:34 -05:00
dependabot[bot] 39699040ab
pip: update edk2-pytool-extensions requirement from ~=0.22.0 to ~=0.22.1 (#66)
Updates the requirements on
[edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions)
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-03-06 10:07:32 -05:00
Michael Kubacki 7e1fb1d5e5 IntelSiliconPkg: Fix CodeQL issues
Makes integer width consistent in loop conditions and explicitly
checks for NULL pointers in some places.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-03-03 11:36:07 -05:00
Michael Kubacki a8f1399d50 IntelFsp2Pkg & IntelFsp2WrapperPkg: Fix CodeQL issues
Makes integer width consistent in loop conditions and explicitly
checks for NULL pointers in some places.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-03-03 11:36:07 -05:00
Project Mu UEFI Bot [bot] a0f3ef6e82
Repo File Sync: Use Git long paths on Windows (#64)
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.

---

It is a well known limitation that GitHub uses the pattern
`<install_dir>/_work/<repo_name>/<repo_name>/` as the working
directory on the GitHub workflow agents.

It is redundant and particularly impactful on Windows as discussed
below:

https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path

This especially causes an issue in a Mu repository at the moment
(`mu_common_intel_min_platform`) due to its longer name which is
repeated twice in the path (as `<repo-name>`).

This change is limited to the GitHub CodeQL workflow and was found
to resolve the issue encountered and not raise any additional issues
in this workflow in testing.

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

---

This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#4308235673](https://github.com/microsoft/mu_devops/actions/runs/4308235673)
2023-03-01 19:34:07 -05:00
Michael Kubacki ed258869c4
Use CodeQL filter files (#63)
## Description

This will pick up filters from repo dependencies like mu_basecore.

- [ ] 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 with `--codeql` flag.

## Integration Instructions

N/A - Affects CodeQL results in this repo

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-03-01 18:11:27 -05:00
Project Mu UEFI Bot [bot] 650e9d1415
Repo File Sync: Add CodeQL GitHub workflow (#62)
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.

---

Adds a new workflow that is synced to Mu repos that are
currently expected to run against CodeQL.

This workflow has the following features to support
maintainability across the repos it is synced to:

- The packages are auto discovered and a dynamic matrix
  is generated for each package build. This allows the
  same file to work as-is in each repo that performs
  CI builds (packages are in the repo root directory).

- The Mu Basecore plugin directory is auto discovered
  in the workspace based on the presence of the CodeQL
  plugin being present in the directory.

- The operations supported by the Stuart CI script are
  dynamically discovered.

- CodeQL is only run on Windows agents. There is a known
  issue when building edk2-style code on Linux so this
  avoids encountering that issue.

  See: https://github.com/github/codeql-action/issues/1338

- The Windows CodeQL CLI package is about 260MB at this time.

  The GitHub Action cache is used by this workflow to cache
  the CLI after it is initially pulled down in the Stuart ext
  dep update.

- The CLI ext dep directory name and version used for caching
  are read from the ext_dep YAML file to reduce maintenance
  needed in the workflow if the file changes in the future.

Note that the SARIF file for each run is uploaded as a per-package
artifact. These can be downloaded and opened in VS Code with the
SARIF Viewer extension to view issues locally with the ability
to click to issue locations in files.

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

---

This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#4295514175](https://github.com/microsoft/mu_devops/actions/runs/4295514175)
2023-02-28 13:05:02 -05:00
dependabot[bot] 3b0a3392ae
pip: update edk2-pytool-extensions requirement from ~=0.21.8 to ~=0.22.0 (#61)
Updates the requirements on
[edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions)
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-02-24 09:25:23 -05:00
Project Mu UEFI Bot [bot] c0f862c75c
Repo File Sync: synced file(s) with microsoft/mu_devops (#60)
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
[#4260896629](https://github.com/microsoft/mu_devops/actions/runs/4260896629)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-02-24 09:22:56 -05:00
dependabot[bot] c59f57ee8d
GitHub Action: Bump microsoft/mu_devops from 2.0.1 to 2.1.0 (#57)
Bumps [microsoft/mu_devops](https://github.com/microsoft/mu_devops) from
2.0.1 to 2.1.0.

Changes:
https://github.com/microsoft/mu_devops/compare/v2.0.1...v2.1.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 12:33:19 -05:00
dependabot[bot] aa2a53a244
pip: bump antlr4-python3-runtime from 4.11.1 to 4.12.0 (#56)
Bumps [antlr4-python3-runtime](http://www.antlr.org) from 4.11.1 to
4.12.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 12:30:14 -05:00
Project Mu UEFI Bot [bot] 3455585409
Repo File Sync: synced file(s) with microsoft/mu_devops (#55)
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
[#4230928288](https://github.com/microsoft/mu_devops/actions/runs/4230928288)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
2023-02-21 12:28:19 -05:00
Michael Kubacki 5e30ae8fb6 [Cherry-pick] SpiFvbServiceStandaloneMm: Add changes for rewrite varstore header
Updates the Standalone MM module to have the necessary INF changes
to build with the following two recent commits made to rewrite the
the variable store header in the MM SPI FVB service.

  - e95c798
  - 88d44c5

Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
(cherry picked from commit e2353ad640d55dafb7315eae2a93b318809ccbe3)
2023-02-10 18:42:34 -05:00
Michael Kubacki 4232c6bd23 Mu Change: Uncrustify 2023-02-10 18:42:34 -05:00
Chasel Chiu 35e765fce7 [Cherry-pick] IntelSiliconPkg/SpiFvbServiceSmm: Support Additional NVS region.
Platform may implement an additional NVS region following
Regular variable region and in this case SpiFvbService should include
both region size when calculating the total NVS region size.

The PcdFlashNvStorageAdditionalSize is for compatible with legacy
usages that should be deprecated. The new usage model should define
separate regions without implicit connections to UEFI Variable or
FTW regions.

Example NVS flash map for such legacy usage:
Note: PcdFlashNvStorageAdditionalSize is equal to platform
      PcdFlashFvNvStorageEventLogSize.

  ---------------
  |UEFI Variable|
  ---------------
  |EventLog     | <= this is Additional NVS region
  ---------------
  |FTW Working  |
  ---------------
  |FTW Spare    |
  ---------------

Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
(cherry picked from commit 88d44c563d9fd5c95be93e706f9420352ee4c053)
2023-02-10 18:42:34 -05:00
Chasel Chiu fc2e287d62 [Cherry-pick] IntelSiliconPkg/SpiFvbServiceSmm: Rewrite VariableStore header.
When invalid VariableStore FV header detected, current SpiFvbService
will erase both FV and VariableStore headers from flash, however,
it will only rewrite FV header back and cause invalid VariableStore
header.

This patch adding the support for rewriting both FV header and
VariableStore header when VariableStore corruption happened.
The Corrupted variable content should be taken care by
FaultTolerantWrite driver later.

Platform has to set PcdFlashVariableStoreType to inform SpiFvbService
which VariableStoreType should be rewritten.

Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: S, Ashraf Ali <ashraf.ali.s@intel.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
(cherry picked from commit e95c7988994c73918ffa282e2d2f5af11f8addc4)
2023-02-10 18:42:34 -05:00
Michael Kubacki b16865ca9b
Add CodeQL Stuart parameter to this repo (#52)
## Description

Allows CodeQL to be run locally by specifying `--codeql` when
providing `stuart_update` and `stuart_ci_build` commands in this
repo.

- `stuart_update` - Automatically downloads the CodeQL CLI application
  appropriate for your host operating system
  - Note: This may take several minutes depending on your Internet
    connection speed
- `stuart_ci_build` - Automatically runs CodeQL against the packages
  built after they are built.

NOTE: Running with CodeQL will increase your overall build time for a
couple of reasons:

1. Every package must be clean built to get proper results
2. The CodeQL analysis phase takes a while to run

  (1) happens automatically, you do not need to specify a clean build
  manually

For more information, such as:

1. How to view results
2. How to modify the CodeQL rules run
3. How to include/exclude files/rules at various levels of granularity

And more...

Go to the CodeQL plugin readme:

https://github.com/microsoft/mu_basecore/blob/HEAD/.pytool/Plugin/CodeQL/Readme.md

---

Also, this commit sets `STUART_CODEQL_AUDIT_ONLY` to `TRUE`. This is
done to:

1. Demonstrate how to set an entire repo to audit-only mode
2. Allow CodeQL to run without breaking the build at this point in
   source history since issues remain to be fixed on this branch

This will be removed from the file when (2) is completed.

---

- [ ] 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 `--codeql` usage with `stuart_update` and `stuart_ci_build` locally.

## Integration Instructions

See earlier PR description and CodeQL plugin readme:

https://github.com/microsoft/mu_basecore/blob/HEAD/.pytool/Plugin/CodeQL/Readme.md

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-02-10 18:15:51 -05:00
dependabot[bot] 7bbff1344f
pip: update edk2-pytool-extensions requirement from ~=0.21.2 to ~=0.21.8 (#54) 2023-02-10 05:51:27 -05:00
Michael Kubacki 8fb8880199
IntelFsp2Pkg.dsc: Add stack cookie support libs (#53)
## Description

Add libraries needed to support /GS MSVC flag.

- [ ] 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 IntelFsp2Pkg VS2022 build.

## Integration Instructions

N/A - Local package build

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-02-09 23:36:44 -05:00
dependabot[bot] 823ff56eef
pip: bump edk2-pytool-library from 0.13.1 to 0.14.0 (#46)
Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 12:50:29 -05:00
Taylor Beebe edd8839d00
Remove VS2015 and VS2017 Stack Cookie Support from Package DSC Files (#49)
## Description

The /GS flag will not be added to VS2015 and VS2017 builds. This change removes the addition of stack cookie support libraries for VS2015 and VS2017 builds.

- [ ] 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 - VS2015 or VS2017 are no longer supported

## Integration Instructions

N/A
2023-02-09 12:49:55 -05:00
Kuo, Ted 6d02e3db07 IntelFsp2Pkg: Improvement of supporting null UPD pointer in FSP-T
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4114

1.Use xmm5 slot 1 and xmm6 slot 3 to save ucode status and UPD pointer
  respectively in TempRamInitApi in IA32 FspSecCoreT.
2.Correct inappropriate description in the return value of
  AsmGetFspInfoHeader.
3.Replace hardcoded offset value 0x1C with FSP_HEADER_IMGBASE_OFFSET in
  FspHeler.nasm.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Chinni B Duggapu <chinni.b.duggapu@intel.com>
Signed-off-by: Ted Kuo <ted.kuo@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-02-08 14:01:16 -05:00
Chasel Chiu f8f6fd4fd6 IntelFsp2Pkg: FSP should support input UPD as NULL.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4114

FSP specification supports input UPD as NULL cases which FSP will
use built-in UPD region instead.
FSP should not return INVALID_PARAMETER in such cases.

In FSP-T entry point case, the valid FSP-T UPD region pointer will be
passed to platform FSP code to consume.
In FSP-M and FSP-S cases, valid UPD pointer will be decided when
updating corresponding pointer field in FspGlobalData.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Reviewed-by: Ted Kuo <ted.kuo@intel.com>
2023-02-08 14:01:16 -05:00
Chasel Chiu 3aa977b92a IntelFsp2Pkg: Update Function header to support IA32/X64.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4126

Common functions will have either 32bit or 64bit instances which
having different return code size. Function header should support both
scenarios.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-02-08 14:01:16 -05:00
Project Mu UEFI Bot [bot] df7d53a6d6
Repo File Sync: synced file(s) with microsoft/mu_devops (#45) 2023-02-07 05:12:43 -05:00
Michael Kubacki cadff31274
.azurepipelines: Add support for new artifacts_identifier param (#44)
## Description

A new identifier can be used to identify published artifacts (as
of mu_devops 2.0.0 release). This change passes the packages and
targets being built to clarify artifact names.

The default value for the identifier is "Artifacts" so that is
what is being used at the moment. For example, build logs are
published under `"Logs Artifacts"`. After this change, the
identifier will be `"Logs <packages> <targets>"`.

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

Verified pipeline artifacts are named as expected.

## Integration Instructions

This is considered a "breaking change" because artifacts are accessible via
ADO APIs and can be identified by the artifact name. While it is unlikely any
process is consuming these artifacts based on name, if they are, they will
need to use the new artifact naming convention introduced in this change.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-02-06 15:00:06 -05:00
Project Mu UEFI Bot [bot] ef5b1f7c87
Repo File Sync: synced file(s) with microsoft/mu_devops (#43) 2023-02-03 23:17:33 -05:00
Project Mu UEFI Bot [bot] 065fc299f9
Repo File Sync: synced file(s) with microsoft/mu_devops (#41) 2023-02-03 21:06:58 -05:00