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

Implement a log buffer to store log messages. #52

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Commits on Jun 18, 2024

  1. igvmbuilder: remove firmware field in GpaMap

    The firmware field of GpaMap was initialized once but never read. This
    raises a warning in the last clippy release.
    
    Signed-off-by: Thomas Leroy <[email protected]>
    p4zuu authored and vsntk18 committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    fae503d View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. utils: Add a StringRingBuffer implementation

    The log buffer is implemented using a ring buffer that contains the
    characters within log entries. This patch introduces a generic
    StringRingBuffer that can be used for safely managing the contents of
    strings within a ring buffer that is suitable for use with the log
    buffer. This separates the ring buffer implementation from the log and
    allows implementation of ring buffer specific unit testing, which is
    included within this patch.
    
    Signed-off-by: Vasant Karasulli <[email protected]>
    Signed-off-by: Roy Hopkins <[email protected]>
    vsntk18 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    6cfb31a View commit details
    Browse the repository at this point in the history
  2. Implement a log buffer which stores all log messages in

    memory.
    
    This log buffer is based on the string ring buffer in
    utils/StringRingBuffer.
    
    Signed-off-by: Vasant Karasulli <[email protected]>
    vsntk18 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    eaa9b0d View commit details
    Browse the repository at this point in the history
  3. Implement a percpu line buffer to store the individual

    log messages.
    
    Each individual log message gets written into the global log buffer
    from the percpu line buffer.
    
    Signed-off-by: Vasant Karasulli <[email protected]>
    vsntk18 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    f13d49b View commit details
    Browse the repository at this point in the history
  4. Initialize log buffer and migrate it from stage2 to svsm

    kernel.
    
    Introduce a new struct MigrateInfo which contains the data to
    be migrated from stage2 to svsm kernel.
    
    Signed-off-by: Vasant Karasulli <[email protected]>
    vsntk18 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    453f8c9 View commit details
    Browse the repository at this point in the history
  5. Add a feature named enable-console-log

    This feature can be enable to print log messages to console in
    addition to storing them in the log buffer.
    Enable this feature by default for debug builds.
    
    Signed-off-by: Vasant Karasulli <[email protected]>
    vsntk18 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    dddab64 View commit details
    Browse the repository at this point in the history
  6. log_buffer: add unit tests to test the functionality

    Test the log_buffer by calling methods like write_log()
    and read_log().
    
    Signed-off-by: Vasant Karasulli <[email protected]>
    vsntk18 committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    0a410dd View commit details
    Browse the repository at this point in the history