lib: sbi_pmu: Reserve space for implementation specific firmware events
authorMayuresh Chitale <mchitale@ventanamicro.com>
Thu, 9 Mar 2023 13:13:53 +0000 (18:43 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 10 Mar 2023 08:30:22 +0000 (14:00 +0530)
We reserve space for SBI implementation specific custom firmware
events which can be used by M-mode firmwares and HS-mode hypervisors
for their own use. This reserved space is intentionally large to
ensure that SBI implementation has enough space to accommodate
platform specific firmware events as well.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
include/sbi/sbi_ecall_interface.h

index d4482129f89f0f3abab02d992459c672ad4f4e0a..459735807f10c71c1e6ae1f6859ea8055fca102e 100644 (file)
@@ -185,6 +185,17 @@ enum sbi_pmu_fw_event_code_id {
        SBI_PMU_FW_HFENCE_VVMA_ASID_SENT = 20,
        SBI_PMU_FW_HFENCE_VVMA_ASID_RCVD = 21,
        SBI_PMU_FW_MAX,
+       /*
+        * Event codes 22 to 255 are reserved for future use.
+        * Event codes 256 to 65534 are reserved for SBI implementation
+        * specific custom firmware events.
+        */
+       SBI_PMU_FW_RESERVED_MAX = 0xFFFE,
+       /*
+        * Event code 0xFFFF is used for platform specific firmware
+        * events where the event data contains any event specific information.
+        */
+       SBI_PMU_FW_PLATFORM = 0xFFFF,
 };
 
 /** SBI PMU event idx type */