modularize gsc dump

Bug: 242479757
Test: do bugreport that has the same content as before
Change-Id: Ief96fbd0b5fedbf175523a50b9749421da43e436
This commit is contained in:
Adam Shih 2022-08-24 10:38:07 +08:00
parent 583eb20964
commit 5170d868c9
3 changed files with 6 additions and 7 deletions

View file

@ -571,6 +571,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk)
# Titan-M
ifeq (,$(filter true, $(BOARD_WITHOUT_DTLS)))
include hardware/google/pixel/dauntless/dauntless.mk
include device/google/gs-common/dauntless/gsc.mk
endif
PRODUCT_PACKAGES_DEBUG += \

View file

@ -238,7 +238,7 @@ Dumpstate::Dumpstate()
{ "aoc", [this](int fd) { dumpAoCSection(fd); } },
{ "ramdump", [this](int fd) { dumpRamdumpSection(fd); } },
{ "misc", [this](int fd) { dumpMiscSection(fd); } },
{ "gsc", [this](int fd) { dumpGscSection(fd); } },
{ "dump", [this](int fd) { dumpSection(fd); } },
{ "trusty", [this](int fd) { dumpTrustySection(fd); } },
},
mLogSections{
@ -1118,11 +1118,9 @@ void Dumpstate::dumpMiscSection(int fd) {
DumpFileToFd(fd, "VENDOR PROC DUMP", "/proc/vendor_sched/dump_task");
}
// Dump items related to GSC
void Dumpstate::dumpGscSection(int fd) {
RunCommandToFd(fd, "Citadel VERSION", {"vendor/bin/hw/citadel_updater", "-lv"});
RunCommandToFd(fd, "Citadel STATS", {"vendor/bin/hw/citadel_updater", "--stats"});
RunCommandToFd(fd, "GSC DEBUG DUMP", {"vendor/bin/hw/citadel_updater", "-D"});
// Dump scripts under vendor/bin/dump
void Dumpstate::dumpSection(int fd) {
RunCommandToFd(fd, "dump", {"/vendor/bin/dump/dump_gsc.sh"});
}
void Dumpstate::dumpTrustySection(int fd) {

View file

@ -67,7 +67,7 @@ class Dumpstate : public BnDumpstateDevice {
void dumpAoCSection(int fd);
void dumpRamdumpSection(int fd);
void dumpMiscSection(int fd);
void dumpGscSection(int fd);
void dumpSection(int fd);
void dumpTrustySection(int fd);
void dumpLogSection(int fd, int fdModem);