From 079d1d38ffaa34c34c4139195c344942c06bb3bc Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Mon, 18 Nov 2024 16:12:41 +0100 Subject: executor: arm64: implement SYZOS_API_ITS_SETUP The new API call implements basic setup of the ARM Interrupt Translation Service for the given number of CPUs, virtual devices, and LPIs. --- executor/kvm.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'executor/kvm.h') diff --git a/executor/kvm.h b/executor/kvm.h index b90da9362..d72913bc3 100644 --- a/executor/kvm.h +++ b/executor/kvm.h @@ -76,12 +76,13 @@ #define NEXT_INSN $0xbadc0de #define PREFIX_SIZE 0xba1d +#define SZ_4K 0x00001000 #define SZ_64K 0x00010000 // GICv3 distributor address. #define ARM64_ADDR_GICD_BASE 0x08000000 // GICv3 ITS address. -#define ARM64_ADDR_GICI_BASE 0x08080000 +#define ARM64_ADDR_GITS_BASE 0x08080000 // GICv3 redistributor address. #define ARM64_ADDR_GICR_BASE 0x080a0000 #define ARM64_ADDR_ITS_TABLES 0xc0000000 @@ -95,3 +96,13 @@ #define ARM64_ADDR_EXECUTOR_CODE 0xeeee8000 #define ARM64_ADDR_SCRATCH_CODE 0xeeef0000 #define ARM64_ADDR_EL1_STACK_BOTTOM 0xffff1000 + +// GICv3 ITS tables. +#define ITS_MAX_DEVICES 16 +#define ARM64_ADDR_ITS_DEVICE_TABLE (ARM64_ADDR_ITS_TABLES) +#define ARM64_ADDR_ITS_COLL_TABLE (ARM64_ADDR_ITS_DEVICE_TABLE + SZ_64K) +#define ARM64_ADDR_ITS_CMDQ_BASE (ARM64_ADDR_ITS_COLL_TABLE + SZ_64K) +// 16 slots for ITT tables, typically used by devices 0-15. +#define ARM64_ADDR_ITS_ITT_TABLES (ARM64_ADDR_ITS_CMDQ_BASE + SZ_64K) +#define ARM64_ADDR_ITS_PROP_TABLE (ARM64_ADDR_ITS_ITT_TABLES + SZ_64K * ITS_MAX_DEVICES) +#define ARM64_ADDR_ITS_PEND_TABLES (ARM64_ADDR_ITS_PROP_TABLE + SZ_64K) -- cgit mrf-deployment