Add qemu 2.4.0
[kvmfornfv.git] / qemu / hw / i386 / acpi-dsdt-dbug.dsl
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11
12  * You should have received a copy of the GNU General Public License along
13  * with this program; if not, see <http://www.gnu.org/licenses/>.
14  */
15
16 /****************************************************************
17  * Debugging
18  ****************************************************************/
19
20 Scope(\) {
21     /* Debug Output */
22     OperationRegion(DBG, SystemIO, 0x0402, 0x01)
23     Field(DBG, ByteAcc, NoLock, Preserve) {
24         DBGB,   8,
25     }
26
27     /* Debug method - use this method to send output to the QEMU
28      * BIOS debug port.  This method handles strings, integers,
29      * and buffers.  For example: DBUG("abc") DBUG(0x123) */
30     Method(DBUG, 1) {
31         ToHexString(Arg0, Local0)
32         ToBuffer(Local0, Local0)
33         Subtract(SizeOf(Local0), 1, Local1)
34         Store(Zero, Local2)
35         While (LLess(Local2, Local1)) {
36             Store(DerefOf(Index(Local0, Local2)), DBGB)
37             Increment(Local2)
38         }
39         Store(0x0A, DBGB)
40     }
41 }