Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/modules/ACPICodec/ACPICodec.c

  • Property svn:executable set to *
1/*
2 * Copyright (c) 2010 cparm <armelcadetpetit@gmail.com>. All rights reserved.
3 *
4 */
5
6#include "libsaio.h"
7#include "modules.h"
8#include "boot.h"
9#include "bootstruct.h"
10#include "pci_root.h"
11#include "acpi_codec.h"
12
13#define kEnableAcpi"EnableAcpiModule"
14
15void ACPICodec_setupEfiConfigurationTable_hook(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6)
16{
17EFI_STATUS *ret = (EFI_STATUS *)arg1;
18
19// Setup ACPI (mackerintel's patch)
20*ret = setupAcpi();
21
22}
23
24void is_ACPI_Codec_Registred_Hook(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6){}
25
26void ACPICodec_start()
27{
28bool enable = true;
29getBoolForKey(kEnableAcpi, &enable, &bootInfo->bootConfig) ;
30
31enable = (execute_hook("isACPIRegistred", NULL, NULL, NULL, NULL, NULL, NULL) != EFI_SUCCESS);
32
33if (enable) {
34register_hook_callback("setupEfiConfigurationTable", &ACPICodec_setupEfiConfigurationTable_hook);
35 register_hook_callback("isACPIRegistred", &is_ACPI_Codec_Registred_Hook);
36
37}
38}

Archive Download this file

Revision: 1122