Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated auto-gen script to accept cache for policy values #244

Merged
merged 6 commits into from
Sep 20, 2023

Conversation

kuqin12
Copy link
Contributor

@kuqin12 kuqin12 commented Sep 19, 2023

Preface

Please ensure you have read the contribution docs prior
to submitting the pull request. In particular,
pull request guidelines.

Description

This change adds a set of getter functions that accepts a caller designated buffer for cached configuration policy. This will avoid the direct usage of updating global variable does not work (i.e. the module is XIP).

Fixes #243.

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

The auto-generated headers were built on QEMU Q35 and confirmed the GOP configuration knob works as expected.

Integration Instructions

N/A for existing platforms. For platforms that require XIP usage, one should use ConfigGet***FromCache with user designated buffer, where the size of the buffer is specified in CACHED_POLICY_SIZE.

@github-actions github-actions bot added the language:python Pull requests that update Python code label Sep 19, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2023

Codecov Report

Merging #244 (3b109a6) into main (8c0e50b) will decrease coverage by 0.18%.
The diff coverage is 0.00%.

❗ Current head 3b109a6 differs from pull request most recent head 5801958. Consider uploading reports for the commit 5801958 to get more accurate results

@@            Coverage Diff             @@
##             main     #244      +/-   ##
==========================================
- Coverage   27.74%   27.57%   -0.18%     
==========================================
  Files          16       16              
  Lines        4494     4522      +28     
==========================================
  Hits         1247     1247              
- Misses       3247     3275      +28     
Flag Coverage Δ
Linux 27.57% <0.00%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
SetupDataPkg/Tools/KnobService.py 0.00% <0.00%> (ø)

SetupDataPkg/Tools/KnobService.py Outdated Show resolved Hide resolved
SetupDataPkg/Tools/KnobService.py Outdated Show resolved Hide resolved
SetupDataPkg/Tools/KnobService.py Show resolved Hide resolved
@github-actions github-actions bot added the type:documentation Improvements or additions to documentation label Sep 20, 2023
@kuqin12 kuqin12 enabled auto-merge (squash) September 20, 2023 23:53
@kuqin12 kuqin12 merged commit 4da0c03 into microsoft:main Sep 20, 2023
17 checks passed
ProjectMuBot referenced this pull request in microsoft/mu_tiano_platforms Sep 23, 2023
Introduces 14 new commits in [Features/CONFIG](https://github.com/microsoft/mu_feature_config.git).

<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/f7351fb88d5eba6d809f58aff216ff5009f12f5b">f7351f</a> GitHub Action: Bump actions/checkout from 3 to 4 (<a href="https://github.com/microsoft/mu_feature_config/pull/233">#233</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/237279c740d967f2b399722a3ea6f6b24942e90e">237279</a> pip: bump antlr4-python3-runtime from 4.13.0 to 4.13.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/234">#234</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/3672705455cf5624516e3254cc7539089ac910de">367270</a> pip: bump pytest from 7.4.0 to 7.4.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/236">#236</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/f768b8ad120c4191d4a5e14b24f5264ffedc69bd">f768b8</a> pip: bump pytest-html from 3.2.0 to 4.0.0 (<a href="https://github.com/microsoft/mu_feature_config/pull/235">#235</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/070a9d7af9123c57dea33db16d98d02c2d58ef21">070a9d</a> pip: bump edk2-pytool-extensions from 0.24.0 to 0.24.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/239">#239</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/c8484375646407e87f826d147739babcbc8c5e6e">c84843</a> pip: bump pytest-html from 4.0.0 to 4.0.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/238">#238</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/81fad9a8505717b902f6279bb35c766a33072abd">81fad9</a> pip: bump pytest from 7.4.1 to 7.4.2 (<a href="https://github.com/microsoft/mu_feature_config/pull/240">#240</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/8c0e50b5c8a443a0395d7bf2ac7948d0e5489f1e">8c0e50</a> Repo File Sync: Update CodeQL GitHub workflow (<a href="https://github.com/microsoft/mu_feature_config/pull/242">#242</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/4da0c03d73815b096e828c5034287003acce8b29">4da0c0</a> Updated auto-gen script to accept cache for policy values (<a href="https://github.com/microsoft/mu_feature_config/pull/244">#244</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/12e78e168e8fa433bf1b17bc9426d5a0769b9d8d">12e78e</a> pip: bump pytest-html from 4.0.1 to 4.0.2 (<a href="https://github.com/microsoft/mu_feature_config/pull/246">#246</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/fc299772f5068855818dc9bcc206228c38f8e7c8">fc2997</a> .pytool/CISettings.py: Update from 202208 to 202302 (<a href="https://github.com/microsoft/mu_feature_config/pull/247">#247</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/757719ae2f2709f4c5c62a3d57c27c9d3831f554">757719</a> pip: bump edk2-pytool-library from 0.17.0 to 0.18.0 (<a href="https://github.com/microsoft/mu_feature_config/pull/245">#245</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/e58f76b437ced0e2fe73f1768eb97625e541adfd">e58f76</a> Repo File Sync: Add cargo ecosystem to dependabot config (<a href="https://github.com/microsoft/mu_feature_config/pull/248">#248</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/e75813037e402ae992e4a21ff0f1d9b93458d4c8">e75813</a> pip: bump xmlschema from 2.4.0 to 2.5.0 (<a href="https://github.com/microsoft/mu_feature_config/pull/250">#250</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>
makubacki referenced this pull request in microsoft/mu_tiano_platforms Sep 25, 2023
Introduces 14 new commits in [Features/CONFIG](https://github.com/microsoft/mu_feature_config.git).

<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/f7351fb88d5eba6d809f58aff216ff5009f12f5b">f7351f</a> GitHub Action: Bump actions/checkout from 3 to 4 (<a href="https://github.com/microsoft/mu_feature_config/pull/233">#233</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/237279c740d967f2b399722a3ea6f6b24942e90e">237279</a> pip: bump antlr4-python3-runtime from 4.13.0 to 4.13.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/234">#234</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/3672705455cf5624516e3254cc7539089ac910de">367270</a> pip: bump pytest from 7.4.0 to 7.4.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/236">#236</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/f768b8ad120c4191d4a5e14b24f5264ffedc69bd">f768b8</a> pip: bump pytest-html from 3.2.0 to 4.0.0 (<a href="https://github.com/microsoft/mu_feature_config/pull/235">#235</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/070a9d7af9123c57dea33db16d98d02c2d58ef21">070a9d</a> pip: bump edk2-pytool-extensions from 0.24.0 to 0.24.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/239">#239</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/c8484375646407e87f826d147739babcbc8c5e6e">c84843</a> pip: bump pytest-html from 4.0.0 to 4.0.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/238">#238</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/81fad9a8505717b902f6279bb35c766a33072abd">81fad9</a> pip: bump pytest from 7.4.1 to 7.4.2 (<a href="https://github.com/microsoft/mu_feature_config/pull/240">#240</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/8c0e50b5c8a443a0395d7bf2ac7948d0e5489f1e">8c0e50</a> Repo File Sync: Update CodeQL GitHub workflow (<a href="https://github.com/microsoft/mu_feature_config/pull/242">#242</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/4da0c03d73815b096e828c5034287003acce8b29">4da0c0</a> Updated auto-gen script to accept cache for policy values (<a href="https://github.com/microsoft/mu_feature_config/pull/244">#244</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/12e78e168e8fa433bf1b17bc9426d5a0769b9d8d">12e78e</a> pip: bump pytest-html from 4.0.1 to 4.0.2 (<a href="https://github.com/microsoft/mu_feature_config/pull/246">#246</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/fc299772f5068855818dc9bcc206228c38f8e7c8">fc2997</a> .pytool/CISettings.py: Update from 202208 to 202302 (<a href="https://github.com/microsoft/mu_feature_config/pull/247">#247</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/757719ae2f2709f4c5c62a3d57c27c9d3831f554">757719</a> pip: bump edk2-pytool-library from 0.17.0 to 0.18.0 (<a href="https://github.com/microsoft/mu_feature_config/pull/245">#245</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/e58f76b437ced0e2fe73f1768eb97625e541adfd">e58f76</a> Repo File Sync: Add cargo ecosystem to dependabot config (<a href="https://github.com/microsoft/mu_feature_config/pull/248">#248</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/e75813037e402ae992e4a21ff0f1d9b93458d4c8">e75813</a> pip: bump xmlschema from 2.4.0 to 2.5.0 (<a href="https://github.com/microsoft/mu_feature_config/pull/250">#250</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language:python Pull requests that update Python code type:documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot use ConfigGet*** APIs from ConfigClientGenerated.h in Pre-Memory envrionment
4 participants