~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/seabios/src/fw/acpi-dsdt-dbug.dsl

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************
 
2
 * Debugging
 
3
 ****************************************************************/
 
4
 
 
5
Scope(\) {
 
6
    /* Debug Output */
 
7
    OperationRegion(DBG, SystemIO, 0x0402, 0x01)
 
8
    Field(DBG, ByteAcc, NoLock, Preserve) {
 
9
        DBGB,   8,
 
10
    }
 
11
 
 
12
    /* 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
}