Debian Codegraph @

src/mainboard/emulation/qemu-i440fx/acpi/dbug.asl

raw
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 /****************************************************************
4 * Debugging
5 ****************************************************************/
6
7 Scope(\) {
8 /* Debug Output */
9 OperationRegion(DBG, SystemIO, 0x0402, 0x01)
10 Field(DBG, ByteAcc, NoLock, Preserve) {
11 DBGB, 8,
12 }
13
14 /* Debug method - use this method to send output to the QEMU
15 * BIOS debug port. This method handles strings, integers,
16 * and buffers. For example: DBUG("abc") DBUG(0x123) */
17 Method(DBUG, 1) {
18 ToHexString(Arg0, Local0)
19 ToBuffer(Local0, Local0)
20 Local1 = SizeOf(Local0) - 1
21 Local2 = 0
22 While (Local2 < Local1) {
23 DBGB = DerefOf( Local0 [Local2])
24 Local2++
25 }
26 DBGB = 0x0A
27 }
28 }