Re: [PATCH v5 03/19] arm64: rsi: Add RSI definitions
From: Catalin Marinas
Date: Mon Aug 26 2024 - 06:01:50 EST
On Mon, Aug 19, 2024 at 02:19:08PM +0100, Steven Price wrote:
> From: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
>
> The RMM (Realm Management Monitor) provides functionality that can be
> accessed by a realm guest through SMC (Realm Services Interface) calls.
>
> The SMC definitions are based on DEN0137[1] version 1.0-rel0-rc1.
>
> [1] https://developer.arm.com/-/cdn-downloads/permalink/PDF/Architectures/DEN0137_1.0-rel0-rc1_rmm-arch_external.pdf
>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
> Signed-off-by: Steven Price <steven.price@xxxxxxx>
Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx>
(I did cross-check the definitions with the spec)
> +struct realm_config {
> + union {
> + struct {
> + unsigned long ipa_bits; /* Width of IPA in bits */
> + unsigned long hash_algo; /* Hash algorithm */
> + };
> + u8 pad[0x200];
> + };
> + union {
> + u8 rpv[64]; /* Realm Personalization Value */
> + u8 pad2[0xe00];
> + };
> + /*
> + * The RMM requires the configuration structure to be aligned to a 4k
> + * boundary, ensure this happens by aligning this structure.
> + */
> +} __aligned(0x1000);
It might have been easier to just write the pad sizes in decimal (trying
to figure out what 0xe00 is ;)). Anyway, it's fine like this as well.
--
Catalin