Commit Graph

3 Commits

Author SHA1 Message Date
Deepak Nibade
a87c10d72c tegra_bootloader_debug: update access to profiler carveout
Guest VM has access to all of the profiler carveout right now so that
it can read full carveout and dump all the entries.

Right now address and size of Guest VM owned profiler carveout is parsed
from kernel command line. And the address of full profiler carveout
(containing logs of other VMs too) is calculated based on assumptions.

Current architecture is now getting reworked so that only a privileged
Guest VM can access full carveout and that too in read-only mode. Each
VM will have read-write access to its own carveout to read/write
profiler entries of that VM.

Update tegra_bootloader_debug_init.c to parse tegra_bl_prof_ro_start and
tegra_bl_prof_ro_size from kernel command line. These values indicate
address and size of the full read only carveout.

In tegra_bootloader_debuginit(), map the address of read only carveout
to tegra_bl_mapped_prof_ro_start and set is_privileged_vm to true.
Only privileged VM will be assigned this read only address by BL.

tegra_bl_mapped_prof_start continues to map to read-write carveout
owned by the VM.

Update profiler_show() so that it reads entries from the read-only
carveout if is_privileged_vm is set, otherwise it reads from read
write carveout.

Bug 3566403

Change-Id: I3c1e5d42d67f7724c6fa43b7e27f08ce2cd607b7
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2868921
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-31 13:23:04 -07:00
Anvesh Salveru
d0ab12f322 tegra_bootloader_debug: api to add profiling point
This change exports an api to add a new profiling
record in bootloader profiler memory.

Bug 3512531

Change-Id: I60fe25ab33bf607632c99a15acc24647956d4138
Signed-off-by: Anvesh Salveru <asalveru@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2692037
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2864626
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-05 04:11:40 -08:00
Laxman Dewangan
7c00563944 platform/tegra: Add bootloader debug driver
Add bootloader debug driver which provides debug functionality
from user space.

bug 3583607

Change-Id: I8bdd2712e755b370b3e157bcdcd3329122729fea
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2708549
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-05-06 05:22:34 -07:00