aboutsummaryrefslogtreecommitdiff
path: root/scripts/Kconfiglib/setconfig.py
diff options
context:
space:
mode:
authorSergey Matyukevich <geomatsi@gmail.com>2024-06-27 15:04:09 +0300
committerAnup Patel <anup@brainfault.org>2024-06-28 08:36:46 +0530
commit23b7badeee3caa1445784273ba5dc8dbcbba7c34 (patch)
treeda6f99e0d4ca2fb7c0e79e547d14c8ac68503a71 /scripts/Kconfiglib/setconfig.py
parent0e45b634713d8a67d8a905e8970e93682c1db64f (diff)
downloadopensbi-23b7badeee3caa1445784273ba5dc8dbcbba7c34.zip
opensbi-23b7badeee3caa1445784273ba5dc8dbcbba7c34.tar.gz
opensbi-23b7badeee3caa1445784273ba5dc8dbcbba7c34.tar.bz2
lib: sbi: check incoming dbtr shmem address
Current Debug Trigger SBI extension proposal suggests to activate shmem area and obtain its physical address from S-mode software in the following way: : If both `shmem_phys_lo` and `shmem_phys_hi` parameters are not : all-ones bitwise then `shmem_phys_lo` specifies the lower XLEN : bits and `shmem_phys_hi` specifies the upper XLEN bits of the : shared memory physical base address. The `shmem_phys_lo` MUST : be `(XLEN / 8)` byte aligned and the size of shared memory is : assumed to be `trig_max * (XLEN / 2)` bytes. For more details see the current version of the proposal: - https://lists.riscv.org/g/tech-debug/message/1302 On the other hand, on RV32, the M-mode can only access the first 4GB of the physical address space because M-mode does not have MMU to access full 34-bit physical address space. Similarly, on RV64, the M-mode can only access memory addressed by 64 bits. This commit checks shmem address in function sbi_dbtr_setup_shmem to make sure that shmem_phys_hi part of the valid address is zero. Besides, the macro DBTR_SHMEM_MAKE_PHYS is updated to take into account only low XLEN part. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> Reviewed-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Diffstat (limited to 'scripts/Kconfiglib/setconfig.py')
0 files changed, 0 insertions, 0 deletions