Git Product home page Git Product logo

sabi's Introduction

Simple AML Bytecode Interpreter

SABI is a simple bytecode interpreter for the ACPI Machine Language (AML), which is an essential component of the firmware (such as UEFI) on many modern machines. As such, the code allows an operating system to implement full ACPI support in the kernel.

The code is currently under active development and, while most things work, there are still many unimplemented functions and corner cases. Moreover, the code has been developed for a 64-bit architecture, and it will very like not work as intended on a 32-bit system. Use at your own risk!

Host functions

The host OS must provide a set of basic functions needed for SABI to work. These functions include memory management, access to hardware registers, timing functions, and error handling. All the necessary host functions are templated in source/host.c which serves as a wrapper for the actual functions implemented by the underlying operating system.

Besides from the host functions, the code assumes the existence of stdint.h and a minimally working implementation of string.h containing the following C99 compliant functions.

memcpy()
memset()
strcpy()
strlen()
strcmp()
strncmp()

Public functions

The public functions allow the operating system to execute functions within the AML code, as well as navigating the ACPI namespace. There are also auxiliary functions that perform predefined tasks, such as parsing the PCI routing tables, parsing resource templates, handling events, and changing the system power state. The public functions can be found in the following header files.

include/sabi/api.h
include/sabi/events.h
include/sabi/pci.h
include/sabi/pm.h
include/sabi/resources.h

Tools

The directory tools contains userspace programs with limited functionality. The userspace program printns reads an AML table (DSDT or SSDT) from disk and prints the dynamically generated namespace.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.