Skip to content

Commit

Permalink
Document current data flow of debug logging filtering (#332)
Browse files Browse the repository at this point in the history
## Description

This change adds a short description of how logging level works in
advanced logger as well as a flowchart for visualization.

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

---------

Co-authored-by: Michael Kubacki <[email protected]>
  • Loading branch information
kuqin12 and makubacki authored Oct 12, 2023
1 parent 1423154 commit f58171d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AdvLoggerPkg/Docs/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ and the follow change is needed in the .fdf:
The v3 data header supports a new field of hardware debugging level to support setting the serial print configurable
during boot time.

All debug prints will be filtered by multiple build time flags, such as `PcdDebugPrintErrorLevel`, `MDEPKG_NDEBUG`, etc.
Prints that pass such filters will be logged to memory, and then fed to the hardware port library to be checked
against the hardware print level. A full data flow chart is shown below:

![Debug Logging Level Filters](debug_log_level.png)

The default value will be initialized to the value of `PcdAdvancedLoggerHdwPortDebugPrintErrorLevel` in the PEI core,
DXE core, or MM core, whichever comes first during the boot process.

Expand Down
Binary file added AdvLoggerPkg/Docs/debug_log_level.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f58171d

Please sign in to comment.