Nucleus
Barry System headers (remove libc dependency) 18495cf (3 years, 2 months ago)
/*
* This file contains the code for handling the Fixed ACPI Description Table.
* The FADT describes the ACPI fixed register blocks related to power
* management. It should also contain a pointer to the Differentiated System
* Description Table.
*/
#include <nucleus/io.h>
#include "acpi.h"
/* Preferred Power Management Profile */
enum PMProfile {
PM_UNSPECIFIED,
PM_DESKTOP,
PM_MOBILE,
PM_WORKSTATION,
PM_ENTERPRISE_SERVER,
PM_SOHO_SERVER,
PM_APPLIANCE_PC,
PM_PERFORMANCE_SERVER,
};
/* Structure of the FADT */
struct FADTable {
uint32_t firmwareCtrl;
uint32_t dsdt;
uint8_t reserved;
uint8_t prefPMProfile;
uint16_t sciInterrupt;
uint32_t smiCommandPort;
/* Bunch more boring stuff */
};
/* Parse FADT for information */
void
init_fadt(struct SDTHeader *header)
{
struct FADTable *fadt = (struct FADTable *) (header + 1);
init_table((void *) fadt->dsdt);
}