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

77 Коммитов

Автор SHA1 Сообщение Дата
Taylor Beebe 69dda0b597
Add StackCheckLib Instances to Platform DSC Files (#446)
## Description

An instance of StackCheckLib must be in each DSC to accommodate
-fstack-protector and /GS flags.

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

Tested in pipelines

## Integration Instructions

N/A
2024-02-29 09:44:50 -08:00
Michael Kubacki 6aae32a580 MsWheaPkg: Add EFIAPI to relevant functions
MsWheaReportHandlerPei() is passed to ReportHwErrRecRouter() for the
MS_WHEA_ERR_REPORT_PS_FN value where that is defined as:

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

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

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

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

fixup
2024-02-26 11:04:32 -05:00
Michael Kubacki d9ed9de9e2 MsWheaPkg/MsWheaEarlyStorageLib: Remove unsigned comparisons to zero
Removes an unnecessary condition since unsigned values are always
greater than or equal to 0.

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

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

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

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-12-12 20:39:02 -05:00
Taylor Beebe 792a81eba8
Use New Stack Cookie Library (#367)
## Description

Update one DSC file to use the new stack cookie library, and
MdePkg/MdeLibs.dsc.inc contains the definitions for the new stack cookie
libraries for the remaining DSC files.

- [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 GCC and MSVC builds

## Integration Instructions

N/A
2023-11-22 10:21:26 -08:00
kenlautner 51c7dc24ef
[CHERRY-PICK] Fix CodeQL errors (#274)
## Description

Fixed some CodeQL failures we're seeing in a variety of packages.

- [ ] 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 through CodeQL checks.

## Integration Instructions

N/A
2023-07-14 08:32:46 -07:00
Joey Vagedes 1e7d11ac55
ci.yaml: add PrEval entry (#267)
## Description

Adds PrEval entries for all packages to enable the new PrEval Policy 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

N/A

## Integration Instructions

N/A
2023-07-05 16:57:17 -07:00
Taylor Beebe eeb0f3a919 Bugfix: Change UT_LOG to DEBUG in MsWheaEarlyUnitTest Entry Point (#232)
## Description

UT_LOG functionality requires the unit tests to be running backed by the
unit test engine. Update the UT_LOG in the entry point to a debug
statement.

- [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 test on SBSA

## Integration Instructions

N/A
2023-05-13 21:56:03 -07:00
Taylor Beebe 931055c3e8 Update Test App to Check Early Storage Size
Description

Block some tests in the MsWheaEarlyStorageUnitTestApp behind a check
to the size of the early storage. This change is to prevent the test
from failing on platforms that do not have enough early storage to
accommodate the required early storage 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, ...
- [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 the MsWheaEarlyUnitTestApp on Q35

Integration Instructions

N/A
2023-05-13 21:56:03 -07:00
Taylor Beebe fc18ba46fb Update MS Whea Early Store Checksum Calculation
Description

The checksum calculation for the MS Whea Early Storage could be invalid
if the size defined in the early storage PCD value is larger than the
early storage region capacity. To make the calculation more robust, the
checksum calculation is updated to read the actual bytes of the early
store instead of relying on an input buffer which may not have been
properly written to the early store. Without this change, the stored
WHEA records would be invalidated if the early storage PCD value is
too large.

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

Running the MsWheaEarlyUnitTestApp on Q35

Integration Instructions

N/A
2023-05-13 21:56:03 -07:00
Taylor Beebe ce2593289e Update MsWheaEarlyStorageGetMaxSize() and MsWheaESGetMaxDataCount() to Check ES Region Size PCD
Description

As MsWheaEarlyStorageLib is written, PcdMsWheaReportEarlyStorageCapacity
must include the offset of the MS WHEA early storage region. This
expectation is unintuitive and can lead to configuration errors and
underflow in MsWheaEarlyStorageGetMaxSize(). Instead of changing the
PCD to not include the offset (and consequentially force existing
platforms to update) this change checks that the PCD is at least as
large as the offset and ASSERTs if not. This change also updates
MsWheaESGetMaxDataCount() to avoid underflow if the ES region is smaller
than the header size.

- [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 the MsWheaEarlyUnitTestApp on Q35

Integration Instructions

N/A
2023-05-13 21:56:03 -07:00
Taylor Beebe 64c12f3308 MsWheaPkg: More CodeQL fixes (#203)
## Description

Various fixes

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

Build and boot changes on QemuQ35Pkg to EFI shell.

## Integration Instructions

N/A
2023-05-13 21:56:02 -07:00
kuqin12 83e8a52168 [CodeQL] MsWheaPkg: Fixing CodeQL failures in this package (#175)
# 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

Fixing potential NULL pointer dereferences after allocation.

There is also an error involving variable comparison between different
width.

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

Verified on Q35 virtual platform.

## Integration Instructions

N/A

---------

Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
2023-05-13 21:56:02 -07:00
Taylor Beebe 423ef8985c Remove VS2015 and VS2017 Stack Cookie Support from Package DSC Files (#169)
## 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-05-13 21:56:02 -07:00
kuqin12 2dd19af828 Adding customizable GUID for BERT extra variables support (#122)
## Description

Current implement will allow extra variables with names specified under
`PcdBertEntriesVariableNames` and namespace GUID being
`gEfiHardwareErrorVariableGuid` to be collected into BERT table for OS
consumption.

However, variables under `gEfiHardwareErrorVariableGuid` has certain
restrictions that does not allow random variable names to be used and
could potentially clash with `HwErrRec####` occupied by other firmware
entities.

This change will add the flexibility for the platform to specify their
own
variable GUID to be collected during boot for BERT table usage.

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?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Tested on QEMU virtual systems and proprietary physical devices.

## Integration Instructions

For platforms that need to support specific CPER formatted variables
coalition into the BERT table, one should override the PCD value of
`gMsWheaPkgTokenSpaceGuid.PcdBertEntriesVariableGuid` of their choices.
Otherwise, `gEfiHardwareErrorVariableGuid` will be the default value and
certain variable naming schema might restrict the specific use case.
2023-05-13 21:56:01 -07:00
Taylor Beebe 840b9286fc Update Stack Cookie Conditionals for VS2022 (#85)
Because VS2022 is now the recommended compiler for Project Mu, we need
to update the conditional for the stack cookie libraries.

No

Enabling stack cookies

N/A

Include Stack Cookie Support Libs on Release Builds (#89)

Stack cookie support is hooked into our memory protection policy, so we
can utilize stack cookies on release builds.

No

Enabling Stack Cookies on Q35

N/A
2023-05-13 20:48:18 -07:00
Michael Kubacki 8b6f8ff254
Fix Line Endings in Repo (LF -> CRLF) (#67) (#68)
Converts line endings in the following packages:

* AdvLoggerPkg: Fix line endings (LF to CRLF)
* DfciPkg: Fix line endings (LF to CRLF)
* HidPkg: Fix line endings (LF to CRLF)
* MfciPkg: Fix line endings (LF to CRLF)
* MsCorePkg: Fix line endings (LF to CRLF)
* MsGraphicsPkg: Fix line endings (LF to CRLF)
* MsWheaPkg: Fix line endings (LF to CRLF)
* PcBdsPkg: Fix line endings (LF to CRLF)
* UefiTestingPkg: Fix line endings (LF to CRLF)
* XmlSupportPkg: Fix line endings (LF to CRLF)
* ZeroTouchPkg: Fix line endings (LF to CRLF)
(cherry picked from commit a6195ca in release/202202)

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2022-10-12 22:11:28 -04:00
Michael Kubacki 379bd43e71 Merged PR 6022: CodeQL Fixes
## Description

Resolves CodeQL issues.

Another lighter pass of CodeQL will occur shortly in the future.

- [ ] Breaking change?
  - Will this change break pre-existing builds or functionality without action being taken?
  **No**

## How This Was Tested

- Verified CI build
- Checked before and after CodeQL results
- Verified boot on QemuQ35Pkg

## Integration Instructions

N/A - If CodeQL was run before these changes, run again to get latest results

Co-authored-by: Ken Lautner <klautner@microsoft.com>
Co-authored-by: Mike Turner <miketur@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2022-09-15 01:43:12 +00:00
Michael Kubacki c2a6bc7e36 Merged PR 5989: Fix DEBUG macro errors in repo
## Description

Builds upon the changes done in 5ce890ef to fix additional DEBUG
macro errors found in this repo.

- [ ] Breaking change?
  - Will this change break pre-existing builds or functionality without action being taken?
  **No**

## How This Was Tested

Verified repo package results with DebugMacroCheck as of the version
checked into mu_basecore at c4183eff.

## Integration Instructions

None - This is done to prepare for DebugMacroCheck integration in this repo.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2022-09-01 21:19:50 +00:00
Antaeus Kleinert-Strand 102d89cfd1 Merged PR 5813: HwErrorBert: Initialize BertVars before use
##Description
* Initialize BertVars to NULL for Milos platform build requirements.

##How this was tested
* Boot tested on Milos platform; UEFI build passes.
2022-08-01 20:49:10 +00:00
Kun Qin 4f5744382a MsWheaPkg: Cspell: Fixing mis-spells
This change resolves all mis-spells by correcting the errors or grant
exceptions to them.
2022-06-29 21:52:21 -07:00
Kun Qin 2345399135 Merged PR 5066: Supporting non HwErrRec variables for BERT record
This change defined a new PCD `PcdBertEntriesVariableNames` for platform to define any wild card variables they would like to populate in a BERT table.

Note that the content for this variable must be compliant with CPER format. And the expected variables should be stored under `gEfiHardwareErrorVariableGuid`.
2022-06-29 23:48:34 +00:00
Barrett Karstens e9d9572b2c Merged PR 5318: Renaming Test apps for consistency and test automation
Renamed all the UEFI shell tests to match `*TestApp.efi`. Renamed the `.inf`s to match.

Built tests and ran on Athos: all tests ran without issue.
2022-05-24 20:28:46 +00:00
Taylor Beebe 3a075bc3f5 DfciPkg, MsWheaPkg: Resolve MD049 errors in markdown files 2022-02-08 22:22:58 -08:00
Taylor Beebe 94adae1085 Uncrustify mu_plus 2022-02-08 22:22:58 -08:00
Kun Qin e6adfdf2ee Merged PR 4429: Added variable policy to WHEA RecordID variable
This PR cleaned GetRecordID function interface and added common definitions for easier use.

It added routine to apply variable policy on size and attributes for "RecordID". The lock is not applied as it might be changed on demand when logging a new telemetry entry.

(cherry picked from commit 34de8198f9)
2022-01-21 23:15:22 -08:00
Sean Brogan a99f7dbeb4 Update Package DSC files to include the MdeLibs due to new library classes being introduced. 2021-09-11 00:35:17 -07:00
Taylor Beebe e02b6d1451 Add Simple Interface for Adding V0 Entry to CMOS ES
Adds the MsWheaESAddRecordV0() function which finds a slot in early storage for a V0 type entry, adds it, and updates the header checksum and active range.

Also moves two defines from the early storage common header to MsWheaEarlyStorageLib.h.

These changes were made to accommodate use cases in the MM supervisor and MemoryProtectionExceptionHandlerLib.

Related work items: #2409
2021-06-14 23:16:06 +00:00
Taylor Beebe 34fecb101f Small Fixes to HWH Menu
Update the menu to:
- Install gHwhMenuFormsetGuid so the menu properly displays if it is built
- Update the hex dump code to properly capture ASCII formatted bytes
- Went ahead and updated formatting while I was at it. It should now conform to edk2 standards
2021-06-01 22:30:21 +00:00
Taylor Beebe c2116c6984 Update MsWheaES Null Lib to Match Updated API
Bring MsWheaEarlyStorageLibNull.c into compliance with updated MsWheaEarlyStorageLib.h
2021-06-01 20:03:54 +00:00
Taylor Beebe 2c2ccd1a9c Expose MsWhea ES Functionality
Move to the ES library header the definition for two structures used by the early storage logic to store records prior to var write availability, and move a few functions to the ES library. This is needed to write directly to the ES CMOS region in the correct format without using the RSC logic. Using RSC when in an exception context fails, but writing a report directly to CMOS and rebooting is effective.
2021-05-22 00:57:26 +00:00
Taylor Beebe 859ebe80ae Add Hardware Health Frontpage Menu
A UEFI front page application which displays various fields of hardware error records to the user
2021-04-05 21:22:25 +00:00
Kun Qin 4c3e28e1de Merged PR 3281: Introduce Standalone MM version of WHEA report driver
Introduce Standalone MM version of WHEA report driver:
1. Replace all gSmst references with gMmst;
1. Added driver instance for WHEA Standalone MM type;
1. Abstract driver entrypoints for traditional and standalone MM instances;
1. Used SMM FTW protocol as depex for Standalone MM driver (since it requires the FVB in SMM to persist errors);
2021-01-16 02:04:45 +00:00
Mike Turner 362fa030f0 Merged PR 3173: Convert from DEBUG_BUFFER/DebugDumpMemory to the new DEBUG_HEX macro
Convert from DEBUG_BUFFER/DebugDumpMemory to the new DEBUG_HEX macro
2020-12-17 18:27:42 +00:00
Taylor Beebe 57f44a7794 Merged PR 3145: REBASE: Update CheckHwErrRecHeaderTestsApp to use UT_ASSERT
Should use UT_ASSERT_EQUAL instead of UT_LOG to properly log test failure.
2020-12-09 18:52:44 +00:00
Taylor Beebe ab3b311c1e Merged PR 3140: REBASE: Small MsWheaPkg Debug Print Fix
Fixes a small debug print mistake
2020-12-08 22:05:17 +00:00
Bret Barkelew 695c037e23 MsWheaPkg: Update markdown files for MarkdownLint 2020-12-08 04:59:30 +00:00
Taylor Beebe 8756fe1eed Merged PR 3116: [TCBZ3078] Fix ReportStatusCode()
ReportStatusCode() is not currently working due to how the ReportDispatcher() in ReportStatusCodeRuntimeDxe.c handles the case where EFI_STATUS_CODE_DATA was not passed from the caller.

Currently, ReportDispatcher() creates and zeros EFI_STATUS_CODE_DATA before signaling the event that a HwErrRec is being created. This causes the optional data argument to be non NULL when reaching our router and, because the data is zeroed and therefore does not contain the proper guid, the entire record is thrown out.
2020-12-01 19:47:57 +00:00
Taylor Beebe 008d5ea9e1 Merged PR 3131: Update the SectionOffset for CPER
SectionOffset should be the difference between the data and the base of the record. Also update the host test.
2020-12-01 00:10:19 +00:00
Taylor Beebe af20b8bb60 Merged PR 3115: REBASE: Update the WHEA unit test app to properly test variable services
This update sidesteps the nonissue where the creation of a hardware error record through reportstatuscode() triggers a reclaim when the common variable space is full.
2020-12-01 00:01:31 +00:00
Kun Qin 4d6385b4ac Merged PR 2939: Change WHEA meta data pointer to be EFI_PHYSICAL_ADDRESS to avoid bitwidth mismatch
Change WHEA meta data pointer to be EFI_PHYSICAL_ADDRESS to avoid bitwidth mismatch:
Pointer bit width in each architecture is defined as UINTN.

For hobs created in PEI phase, the ExtraSection type will be initialized in 32 bit environment. But when it is consumed in DXE phase, the upper 32 bit was left uninitialized and accessing it could result in GP fault.

The fix is to change the data type to EFI_PHYISICAL_ADDRESS to resolve data size change across 32-bit and 64-bit operations.
2020-10-19 22:31:15 +00:00
Kun Qin 430df6f9b0 Merged PR 2772: Remove assertion caused by failed boot attempt
Remove assertion caused by failed boot attempt in:

File: _MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c_

```
  REPORT_STATUS_CODE_EX (
    (EFI_ERROR_CODE | EFI_ERROR_MINOR),
    (EFI_SOFTWARE_DXE_BS_DRIVER | ErrorCode),
    0,
    NULL,
    NULL,
    &ExtendedData.DataHeader + 1,
    sizeof (ExtendedData) - sizeof (ExtendedData.DataHeader)
    );
```
2020-09-09 22:29:56 +00:00
Bret Barkelew febadbea9b Merged PR 2678: Enable ExtraSection in WheaReport and MuTelemetryHelperLib
Add helper lib support to pack extra, unstructured data at the end of a telemetry event.
Add WheaReport functionality to identify the extra data and store it in an extra CPER section.

Also, add a bunch of tests for all of that stuff.
2020-08-08 05:35:51 +00:00
Matthew Carlson 503e991124 Merged PR 2300: Remove references to old unit test package
remove references to old unit test package
2020-04-08 04:03:47 +00:00
Kun Qin 891a762788 Merged PR 2195: Added support of WHEA in SMM environment
Added support of WHEA in SMM environment, mis-spelling fixes and comment updates.
2020-03-26 18:33:21 +00:00
Bret Barkelew 40b1e69188 Update MsWheaPkg to use new UnitTestFrameworkPkg 2020-03-11 18:16:45 -07:00
Bret Barkelew 1672cf27a3 Merged PR 1824: Get Linux CI passing so that we can make it required. MsWheaPkg
Fix all build issues in MsWheaPkg
2019-12-14 01:59:22 +00:00
Bret Barkelew 62197efad0 Merged PR 1821: Update CI branches and temporarily disable all testing to re-enable the gates. 2019-12-14 01:27:04 +00:00
Dmitry Antipov 2d21f98724 Merged PR 1733: Fix CLANG build breaks due to bad debug prints
Fix CLANG build breaks due to bad debug prints
2019-11-21 19:55:01 +00:00