Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/modules/ACPIPatcher/AcpiPatcher.c

  • Property svn:executable set to *
1/*
2 * Copyright (c) 2009 Evan Lojewski. All rights reserved.
3 *
4 */
5
6/*
7 * Copyright (c) 2010 cparm <armelcadetpetit@gmail.com>. All rights reserved.
8 *
9 */
10
11#include "libsaio.h"
12#include "modules.h"
13#include "bootstruct.h"
14#include "pci_root.h"
15#include "acpi_patcher.h"
16
17#define kEnableAcpi"EnableAcpiModule"
18void AcpiPatcher_start(void);
19void is_ACPI_Patcher_Registred_Hook(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6);
20void is_ACPI_Patcher_Registred_Hook(void* arg1, void* arg2, void* arg3, void* arg4, void* arg5, void* arg6){}
21
22void AcpiPatcher_start(void)
23{
24bool enable = true;
25
26getBoolForKey(kEnableAcpi, &enable, DEFAULT_BOOT_CONFIG);
27
28 enable = (execute_hook("isACPIRegistred", NULL, NULL, NULL, NULL, NULL, NULL) != EFI_SUCCESS);
29
30if (enable) {
31 replace_system_function("_setup_acpi",&setupAcpi);
32
33 register_hook_callback("isACPIRegistred", &is_ACPI_Patcher_Registred_Hook);
34
35}
36}

Archive Download this file

Revision: 1840