arch/arm64/include/asm/rsi_smc.h

Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/rsi_smc.h

File Facts

System
Linux kernel
Corpus path
arch/arm64/include/asm/rsi_smc.h
Extension
.h
Size
5357 bytes
Lines
194
Domain
Architecture Layer
Bucket
arch/arm64
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

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);

#endif /* __ASSEMBLER__ */

/*
 * Read configuration for the current Realm.
 *
 * arg1 == struct realm_config addr
 * ret0 == Status / error
 */
#define SMC_RSI_REALM_CONFIG			SMC_RSI_FID(0x196)

/*
 * Request RIPAS of a target IPA range to be changed to a specified value.
 *
 * arg1 == Base IPA address of target region
 * arg2 == Top of the region
 * arg3 == RIPAS value
 * arg4 == flags
 * ret0 == Status / error
 * ret1 == Top of modified IPA range
 * ret2 == Whether the Host accepted or rejected the request
 */
#define SMC_RSI_IPA_STATE_SET			SMC_RSI_FID(0x197)

#define RSI_NO_CHANGE_DESTROYED			UL(0)
#define RSI_CHANGE_DESTROYED			UL(1)

#define RSI_ACCEPT				UL(0)
#define RSI_REJECT				UL(1)

/*
 * Get RIPAS of a target IPA range.
 *
 * arg1 == Base IPA of target region
 * arg2 == End of target IPA region
 * ret0 == Status / error
 * ret1 == Top of IPA region which has the reported RIPAS value
 * ret2 == RIPAS value
 */
#define SMC_RSI_IPA_STATE_GET			SMC_RSI_FID(0x198)

/*
 * Make a Host call.
 *
 * arg1 == IPA of host call structure
 * ret0 == Status / error
 */
#define SMC_RSI_HOST_CALL			SMC_RSI_FID(0x199)

#endif /* __ASM_RSI_SMC_H_ */

Annotation

Implementation Notes