Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/modules/ACPICodec/acpicode.h

1/*
2Copyright (c) 2010, Intel Corporation
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7
8 * Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
13 * Neither the name of Intel Corporation nor the names of its contributors
14 may be used to endorse or promote products derived from this software
15 without specific prior written permission.
16
17THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27*/
28
29#ifndef acpi_code_h
30#define acpi_code_h
31
32#include "datatype.h"
33#include "acpi.h"
34#include "ppm.h"
35
36void setRsdpchecksum(ACPI_TABLE_RSDP *rsdp);
37void setRsdpXchecksum(ACPI_TABLE_RSDP *rsdp);
38U32 update_rsdp_with_xsdt(ACPI_TABLE_RSDP *rsdp, ACPI_TABLE_XSDT *xsdt);
39U32 update_rsdp_with_rsdt(ACPI_TABLE_RSDP *rsdp, ACPI_TABLE_RSDT *rsdt);
40
41void SetChecksum(struct acpi_table_header *header);
42U32 ProcessMadtInfo(ACPI_TABLE_MADT * madt, MADT_INFO * madt_info);
43void MoveRsdtInsertSsdt(ACPI_TABLE_RSDP * RsdPointer, ACPI_TABLE_RSDT * OldRsdtPointer, ACPI_TABLE_RSDT * NewRsdtPointer, ACPI_TABLE_SSDT * SsdtPointer);
44void InsertSsdt(ACPI_TABLE_RSDT * RsdtPointer, ACPI_TABLE_SSDT * SsdtPointer);
45void InsertSsdt64(ACPI_TABLE_XSDT * XsdtPointer, ACPI_TABLE_SSDT * SsdtPointer);
46U32 ProcessFadt(ACPI_TABLE_FADT * FadtPointer, U32 pmbase);
47U32 ProcessDsdt(ACPI_TABLE_DSDT * DsdtPointer, U8 * PCIUIDPointer, U8 uid);
48
49void setByteConst(ACPI_BYTE_CONST * byteConst, U8 byteData);
50void *buildByteConst(void *current, U8 byteData);
51void setWordConst(ACPI_WORD_CONST * wordConst, U16 wordData);
52void *buildWordConst(void *current, U16 wordData);
53void setDwordConst(ACPI_DWORD_CONST * dwordConst, U32 dwordData);
54void *buildDwordConst(void *current, U32 dwordData);
55void *buildSmallBuffer(void *current);
56void *buildEndTag(void *current);
57void *buildGenericRegister(void *current, const ACPI_GENERIC_ADDRESS * gas);
58
59void *buildSmallMethod(void *current, U32 name, U8 methodFlags);
60void *buildMethod(void *current, U32 name, U8 methodFlags);
61void *buildReturnZero(void *current);
62void *buildReturnOpcode(void *current, U8 opcodeToReturn);
63void *buildReturnPackage(void *current, U8 numElements);
64void *buildNamedDword(void *current, U32 name, U32 dword);
65void *buildOpCode(void *current, U8 opCode);
66
67void *buildNameSeg(void *current, U32 name);
68void setSmallPackage(ACPI_SMALL_PACKAGE * package, U8 numElements);
69void *buildSmallPackage(void *current, U8 numElements);
70void setPackageLength(ACPI_PACKAGE_LENGTH * packageLength, U32 length);
71void *buildPackageLength(void *current, U32 Length);
72void *buildNamePath(void *current, U32 name);
73void *buildTableHeader(void *current, U32 signature, U64 oemTableId);
74
75#endif // acpi_code_h
76

Archive Download this file

Revision: 1667