Skip to content

Commit 47027bf

Browse files
committed
add dbg2 header.
1 parent d96e7c5 commit 47027bf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ foreach(DEVICE_TARGET ${ALL_DEVICE_TARGETS})
159159
set(AML_FILE "${TARGET_OUTPUT_DIR}/${TABLE_NAME_UPPER}.aml")
160160
set(DSL_FILE "${TARGET_OUTPUT_DIR}/${TABLE_NAME_UPPER}.dsl")
161161
set(DEVICE_IASL_LOG_FILE "${TARGET_OUTPUT_DIR}/iasl.log")
162-
set(HEX_OUTPUT_DIR "${CMAKE_BINARY_DIR}/hex")
162+
set(HEX_OUTPUT_DIR "${CMAKE_BINARY_DIR}/test")
163163
file(MAKE_DIRECTORY ${HEX_OUTPUT_DIR})
164164

165165
# Add custom command: extract ACPI table
@@ -178,10 +178,10 @@ foreach(DEVICE_TARGET ${ALL_DEVICE_TARGETS})
178178
add_custom_command(
179179
OUTPUT ${DSL_FILE}
180180
COMMAND ${IASL_EXECUTABLE} -d ${AML_FILE} >> ${DEVICE_IASL_LOG_FILE} 2>&1 || true
181-
COMMAND ${CMAKE_COMMAND} -E rename ${HEX_OUTPUT_DIR}/${TABLE_NAME_UPPER}.hex ${HEX_OUTPUT_DIR}/${DEVICE_NAME}_${TABLE_NAME_UPPER}.hex 2>/dev/null || true
181+
COMMAND /bin/bash -c "[ -f '${TARGET_OUTPUT_DIR}/${TABLE_NAME_UPPER}.hex' ] && mv '${TARGET_OUTPUT_DIR}/${TABLE_NAME_UPPER}.hex' '${HEX_OUTPUT_DIR}/${DEVICE_NAME}_${TABLE_NAME_UPPER}.hex' || true"
182182
COMMAND ${CMAKE_COMMAND} -E rename ${TARGET_OUTPUT_DIR}/${TABLE_NAME_UPPER}.dsl ${DSL_FILE} || true
183183
DEPENDS ${AML_FILE}
184-
WORKING_DIRECTORY ${HEX_OUTPUT_DIR}
184+
WORKING_DIRECTORY ${TARGET_OUTPUT_DIR}
185185
COMMENT "Decompiling ${DEVICE_NAME}/${TABLE_NAME_UPPER}.aml -> ${TABLE_NAME_UPPER}.dsl (log: iasl.log)..."
186186
VERBATIM
187187
)

include/common/dbg2.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#pragma once
22
#include <acpi.h>
33
#include <common.h>
4-
/** Reference
4+
5+
/** Microsoft Debug Port Table (DBG2)
6+
Reference:
57
https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table
68
*/
79

0 commit comments

Comments
 (0)