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 "bootstruct.h"
9#include "pci_root.h"
10#include "acpi_codec.h"
11
12#define kEnableAcpi"EnableAcpiModule"
13
14void is_ACPI_Codec_Registred_Hook(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6);
15void ACPICodec_start(void);
16
17void is_ACPI_Codec_Registred_Hook(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6){}
18
19void ACPICodec_start(void)
20{
21bool enable = true;
22getBoolForKey(kEnableAcpi, &enable, DEFAULT_BOOT_CONFIG) ;
23
24enable = (execute_hook("isACPIRegistred", NULL, NULL, NULL, NULL, NULL, NULL) != EFI_SUCCESS);
25
26if (enable)
27{
28replace_system_function("_setup_acpi",&setupAcpi);
29
30 register_hook_callback("isACPIRegistred", &is_ACPI_Codec_Registred_Hook);
31
32}
33}

Archive Download this file

Revision: 1899