2 * Bochs/QEMU ACPI SSDT ASL definition
4 * Copyright (c) 2006 Fabrice Bellard
5 * Copyright (c) 2009 SGI, Jes Sorensen <jes@sgi.com>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License version 2 as published by the Free Software Foundation.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 "acpi-ssdt.aml", // Output Filename
23 0x01, // DSDT Compliance Revision
31 /* pointer to first element of MADT APIC structures */
32 OperationRegion(ATPR, SystemMemory, 0x0514, 4)
33 Field (ATPR, DwordAcc, NoLock, Preserve)
38 #define madt_addr(nr) Add (ATP, Multiply(nr, 8))
40 #define gen_processor(nr, name) \
41 Processor (C##name, nr, 0x0000b010, 0x06) { \
42 OperationRegion (MATR, SystemMemory, madt_addr(nr), 8) \
43 Field (MATR, ByteAcc, NoLock, Preserve) \
47 Field (MATR, ByteAcc, NoLock, Preserve) \
56 If (FLG) { Return(0xF) } Else { Return(0x9) } \
78 #define gen_ntfy(nr) \
79 If (LEqual(Arg0, 0x##nr)) { \
80 If (LNotEqual(Arg1, \_PR.C##nr.FLG)) { \
81 Store (Arg1, \_PR.C##nr.FLG) \
82 If (LEqual(Arg1, 1)) { \
107 OperationRegion(PRST, SystemIO, 0xaf00, 32)
108 Field (PRST, ByteAcc, NoLock, Preserve)
116 While(LLess(Local0, 32)) {
118 Store(DerefOf(Index(Local3, Local0)), Local2)
119 While(LLess(Local1, 8)) {
120 NTFY(Add(Multiply(Local0, 8), Local1),
122 ShiftRight(Local2, 1, Local2)
132 * Add the missing _L02 method for CPU notification