Skip to content

Diag log - #46

Draft
pawarai123 wants to merge 4 commits into
qualcomm-linux:qcom-nextfrom
pawarai123:diag-log
Draft

pawarai123 wants to merge 4 commits into
qualcomm-linux:qcom-nextfrom
pawarai123:diag-log

Conversation

@pawarai123

Copy link
Copy Markdown
Contributor

No description provided.

CFG_QCOM_RPMH_CLIENT ?= n
CFG_QCOM_PAS_PTA ?= n

CFG_QCOM_DIAG_LOG ?= $(CFG_TEE_CORE_DEBUG)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional bug: enabling diag log on a platform that lacks TCSR_BOOT_MISC_DETECT breaks the debug build.

This enables CFG_QCOM_DIAG_LOG (defaulting to CFG_TEE_CORE_DEBUG), which compiles diag_log.c. That file uses TCSR_BOOT_MISC_DETECT at file scope (in register_phys_mem_pgdir(...)), but neither bruin/shikra/target_config.h nor bruin/arch_config.h defines it (only bobcat/hoya/cacao do). Debug builds for shikra fail to compile. Same issue for nord (wildcat/nord/target.mk, no define in wildcat/arch_config.h or wildcat/nord/target_config.h).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harshal/Pawan, please help to address this comment.
Is this same issue where we need to configure IMEM to enable TZ log?

Add the platform configuration required by the diagnostic ring buffer
on the Wildcat architecture, including the buffer layout shared by all
Wildcat targets and the IMEM base and size for Nord.

Default CFG_QCOM_DIAG_LOG to CFG_TEE_CORE_DEBUG so that the buffer
is enabled on debug builds.

Change-Id: I440a6aeb25624e6c87877faad774478fb491dca2
Signed-off-by: Pawan Rai <pawarai@qti.qualcomm.com>
Cacao already carries IMEM_BASE and IMEM_SIZE in its target_config.h,
and the Wildcat arch_config.h now defines the shared buffer layout
(IMEM_DIAG_OFFSET, DIAG_SIZE, DIAG_BASE, DIAG_LOG_START_INFO).

Default CFG_QCOM_DIAG_LOG to CFG_TEE_CORE_DEBUG so that the buffer
is enabled on debug builds.

Change-Id: Ia472203bda34c738e36e06b65326d42a83ee421d
Signed-off-by: Pawan Rai <pawarai@qti.qualcomm.com>
Shikra already carries IMEM_BASE and IMEM_SIZE in its target_config.h.
Add the shared buffer layout macros (IMEM_DIAG_OFFSET, DIAG_SIZE,
DIAG_BASE, DIAG_LOG_START_INFO) to the Bruin arch_config.h, and
default CFG_QCOM_DIAG_LOG to CFG_TEE_CORE_DEBUG so the buffer is
enabled on debug builds.

Change-Id: Ie924e5f56d80a4103be60c5061fbfeadb69b5635
Signed-off-by: Pawan Rai <pawarai@qti.qualcomm.com>
Parse the OP-TEE diagnostic ring buffer written into IMEM by
diag_log.c. Handles full RAM dumps (OCIMEM.BIN) with either a
known DIAG_BASE offset (--offset) or automatic magic-scan mode
(--scan), as well as pre-extracted DIAG region slices.

Change-Id: I49a1145c9983d32b2c3ac8b50a6ec4916de606e0
Signed-off-by: Pawan Rai <pawarai@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants