arch/arm64/include/asm/mem_encrypt.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/mem_encrypt.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/mem_encrypt.h- Extension
.h- Size
- 1015 bytes
- Lines
- 38
- 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.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/rsi.h
Detected Declarations
struct devicestruct arm64_mem_crypt_opsfunction force_dma_unencrypted
Annotated Snippet
struct arm64_mem_crypt_ops {
int (*encrypt)(unsigned long addr, int numpages);
int (*decrypt)(unsigned long addr, int numpages);
};
int arm64_mem_crypt_ops_register(const struct arm64_mem_crypt_ops *ops);
int set_memory_encrypted(unsigned long addr, int numpages);
int set_memory_decrypted(unsigned long addr, int numpages);
int realm_register_memory_enc_ops(void);
static inline bool force_dma_unencrypted(struct device *dev)
{
return is_realm_world();
}
/*
* For Arm CCA guests, canonical addresses are "encrypted", so no changes
* required for dma_addr_encrypted().
* The unencrypted DMA buffers must be accessed via the unprotected IPA,
* "top IPA bit" set.
*/
#define dma_addr_unencrypted(x) ((x) | PROT_NS_SHARED)
/* Clear the "top" IPA bit while converting back */
#define dma_addr_canonical(x) ((x) & ~PROT_NS_SHARED)
#endif /* __ASM_MEM_ENCRYPT_H */
Annotation
- Immediate include surface: `asm/rsi.h`.
- Detected declarations: `struct device`, `struct arm64_mem_crypt_ops`, `function force_dma_unencrypted`.
- Atlas domain: Architecture Layer / arch/arm64.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.