Pyrogenesis  trunk
Macros | Typedefs | Functions | Variables
acpi.cpp File Reference
#include "precompiled.h"
#include "lib/sysdep/acpi.h"
#include "lib/byte_order.h"
#include "lib/sysdep/cpu.h"
#include "lib/module_init.h"
#include "lib/sysdep/os/win/wfirmware.h"
Include dependency graph for acpi.cpp:

Macros

#define ENABLE_MAHAF   0
 

Typedefs

typedef const volatile u8PCV_u8
 
typedef const volatile AcpiTablePCV_AcpiTable
 

Functions

static AcpiTableAllocateTable (size_t size)
 
template<typename T >
static void DeallocateTable (const T *table)
 
static u8 ComputeChecksum (PCV_u8 buf, size_t numBytes)
 
static bool ValidateTable (const AcpiTable *table, const char *signature=0)
 
static void AllocateAndCopyTables (const AcpiTable **&tables, size_t &numTables)
 
void acpi_Shutdown ()
 invalidates all pointers returned by acpi_GetTable. More...
 
const AcpiTableacpi_GetTable (const char *signature)
 

Variables

static const AcpiTable ** tables
 
static const AcpiTableinvalidTables
 
static size_t numTables
 

Macro Definition Documentation

#define ENABLE_MAHAF   0

Typedef Documentation

typedef const volatile AcpiTable* PCV_AcpiTable
typedef const volatile u8* PCV_u8

Function Documentation

const AcpiTable* acpi_GetTable ( const char *  signature)
Parameters
signaturee.g. "RSDT"
Returns
pointer to internal storage (valid until acpi_Shutdown())

note: the first call may be slow, e.g. if a kernel-mode driver is loaded. subsequent requests will be faster since tables are cached.

void acpi_Shutdown ( )

invalidates all pointers returned by acpi_GetTable.

static void AllocateAndCopyTables ( const AcpiTable **&  tables,
size_t &  numTables 
)
static
static AcpiTable* AllocateTable ( size_t  size)
static
static u8 ComputeChecksum ( PCV_u8  buf,
size_t  numBytes 
)
static
template<typename T >
static void DeallocateTable ( const T table)
static
static bool ValidateTable ( const AcpiTable table,
const char *  signature = 0 
)
static

Variable Documentation

const AcpiTable* invalidTables
static
size_t numTables
static
const AcpiTable** tables
static