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

Add error handling in AML bytecode creation code #4870

Merged
merged 7 commits into from
Oct 24, 2024

Commits on Oct 23, 2024

  1. fix: error handling in AML code generation

    Right now, we include a few panics and assertions in the code that
    generates AML bytecode for our ACPI tables.
    
    Change the AML methods to explicitly return a Result type and substitute
    these panics and assertions with error types. Also, change some type
    methods that now need to return a Result as well.
    
    Signed-off-by: Babis Chalios <[email protected]>
    bchalios committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    0cefc2b View commit details
    Browse the repository at this point in the history
  2. fix: naming of types in acpi-tables

    We were calling stuff "Cachable" instead of "Cacheable".
    
    Signed-off-by: Babis Chalios <[email protected]>
    bchalios committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    8ea4690 View commit details
    Browse the repository at this point in the history
  3. fix: potential underflow in AML bytecode creation

    acpi_tables::aml::AddressSpace<T> type is describing an address space
    with a minimum address `min: T` and a maximum address `max: T`.
    Currently, we do not perform any checks on these values when creating
    the AddressSpace objects. This means that the starting address `min` can
    be bigger than the last address `max`, which can cause underflows when
    calculating the length of this address space, i.e. `max - min + 1`.
    
    Add a check in the constructor methods of AddressSpace objects and
    return an error when `min > max`.
    
    Signed-off-by: Babis Chalios <[email protected]>
    bchalios committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    cda1442 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fdba04a View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2024

  1. Configuration menu
    Copy the full SHA
    6f7bfeb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bae368d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    788b3f9 View commit details
    Browse the repository at this point in the history