blob: 276321f61787b5ad877976dd1d1933478784901a [file] [log] [blame]
Gerd Hoffmann0e25a252012-11-28 10:17:38 +01001/****************************************************************
2 * Debugging
3 ****************************************************************/
4
Kevin O'Connore9e7ab42012-12-02 01:09:17 -05005Scope(\) {
6 /* Debug Output */
7 OperationRegion(DBG, SystemIO, 0x0402, 0x01)
8 Field(DBG, ByteAcc, NoLock, Preserve) {
9 DBGB, 8,
Gerd Hoffmann0e25a252012-11-28 10:17:38 +010010 }
11
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050012 /* Debug method - use this method to send output to the QEMU
13 * BIOS debug port. This method handles strings, integers,
14 * and buffers. For example: DBUG("abc") DBUG(0x123) */
15 Method(DBUG, 1) {
16 ToHexString(Arg0, Local0)
17 ToBuffer(Local0, Local0)
18 Subtract(SizeOf(Local0), 1, Local1)
19 Store(Zero, Local2)
20 While (LLess(Local2, Local1)) {
21 Store(DerefOf(Index(Local0, Local2)), DBGB)
22 Increment(Local2)
23 }
24 Store(0x0A, DBGB)
25 }
26}