FROMLIST: platform/x86: amd-pmc: Add support for AMD Smart Trace Buffer

STB (Smart Trace Buffer), is a debug trace buffer which is used to help
isolate failures by analyzing the last feature that a system was running
before hitting a failure. This nonintrusive way is always running in the
background and trace is stored into the SoC.

This patch provides mechanism to access the STB buffer using the read and
write routines.

Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
(am from https://patchwork.kernel.org/project/platform-driver-x86/patch/20211005155641.2308-1-Sanket.Goswami@amd.com/)

BUG=b:194146855
TEST=Build kernel, deploy it and perform suspend_stress_test

Signed-off-by: Rajib Mahapatra <rajib.mahapatra@amd.corp-partner.google.com>
Change-Id: I2ab2a25875d11a99533d987573f122309df303b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3218714
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Commit-Queue: Raul E Rangel <rrangel@chromium.org>
1 file changed