diff options
| author | Alexander Potapenko <glider@google.com> | 2024-11-18 16:12:41 +0100 |
|---|---|---|
| committer | Alexander Potapenko <glider@google.com> | 2024-11-26 11:12:47 +0000 |
| commit | 079d1d38ffaa34c34c4139195c344942c06bb3bc (patch) | |
| tree | 3594873059d13ed625094d88889fefd46c8abf3f /executor/kvm.h | |
| parent | 6df5c66f34a07b63b5fc663131f66f13244b7121 (diff) | |
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.
Diffstat (limited to 'executor/kvm.h')
| -rw-r--r-- | executor/kvm.h | 13 |
1 files changed, 12 insertions, 1 deletions
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) |
