Skip to content

Commit

Permalink
Merge branch 'release/202302' into fancier_tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
kuqin12 authored Jan 26, 2024
2 parents 6bc6266 + 833db39 commit 51bf64f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ jobs:
from pathlib import Path
# Find the plugin directory that contains the CodeQL plugin
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('.pytool/Plugin/CodeQL'))
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('BaseTools/Plugin/CodeQL'))
if not plugin_dir:
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('.pytool/Plugin/CodeQL'))
# This should only be found once
if len(plugin_dir) == 1:
Expand Down Expand Up @@ -319,10 +321,32 @@ jobs:
if: steps.codeqlcli_cache.outputs.cache-hit != 'true'
run: stuart_update -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.archs }} TOOL_CHAIN_TAG=${{ matrix.tool_chain_tag }} --codeql

- name: Find pytool Plugin Directory
id: find_pytool_dir
shell: python
run: |
import os
import sys
from pathlib import Path
# Find the plugin directory that contains the Compiler plugin
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('.pytool/Plugin/CompilerPlugin'))
# This should only be found once
if len(plugin_dir) == 1:
# If the directory is found get the parent Plugin directory
plugin_dir = str(plugin_dir[0].parent)
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
print(f'pytool_plugin_dir={plugin_dir}', file=fh)
else:
print("::error title=Workspace Error!::Failed to find Mu Basecore .pytool/Plugin directory!")
sys.exit(1)
- name: Remove CI Plugins Irrelevant to CodeQL
shell: python
env:
CODEQL_PLUGIN_DIR: ${{ steps.find_dir.outputs.codeql_plugin_dir }}
PYTOOL_PLUGIN_DIR: ${{ steps.find_pytool_dir.outputs.pytool_plugin_dir }}
run: |
import os
import shutil
Expand All @@ -331,7 +355,7 @@ jobs:
# Only these two plugins are needed for CodeQL
plugins_to_keep = ['CodeQL', 'CompilerPlugin']
plugin_dir = Path(os.environ['CODEQL_PLUGIN_DIR']).parent.absolute()
plugin_dir = Path(os.environ['PYTOOL_PLUGIN_DIR']).absolute()
if plugin_dir.is_dir():
for dir in plugin_dir.iterdir():
if str(dir.stem) not in plugins_to_keep:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,13 @@ DxeCoreAdvancedLoggerLibConstructor (
LoggerInfo->LogBufferSize = EFI_PAGES_TO_SIZE (FixedPcdGet32 (PcdAdvancedLoggerPages)) - sizeof (ADVANCED_LOGGER_INFO);
LoggerInfo->LogCurrent = LoggerInfo->LogBuffer;
LoggerInfo->HwPrintLevel = FixedPcdGet32 (PcdAdvancedLoggerHdwPortDebugPrintErrorLevel);
mMaxAddress = LoggerInfo->LogBuffer + LoggerInfo->LogBufferSize;
mBufferSize = LoggerInfo->LogBufferSize;
if (LoggerInfo->HdwPortInitialized == FALSE) {
AdvancedLoggerHdwPortInitialize ();
LoggerInfo->HdwPortInitialized = TRUE;
}

mMaxAddress = LoggerInfo->LogBuffer + LoggerInfo->LogBufferSize;
mBufferSize = LoggerInfo->LogBufferSize;
} else {
DEBUG ((DEBUG_ERROR, "%a: Error allocating Advanced Logger Buffer\n", __FUNCTION__));
}
Expand Down
4 changes: 2 additions & 2 deletions pip-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# https://www.python.org/dev/peps/pep-0440/#version-specifiers
##

edk2-pytool-library==0.19.9
edk2-pytool-extensions==0.26.4
edk2-pytool-library==0.20.0
edk2-pytool-extensions==0.27.0
edk2-basetools==0.1.29
antlr4-python3-runtime==4.13.1
regex==2023.12.25
Expand Down

0 comments on commit 51bf64f

Please sign in to comment.