summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_domain_context.h
AgeCommit message (Collapse)Author
2024-10-25lib: sbi_domain: Use domain data support for per-domain hart contextAnup Patel
The per-domain hartindex_to_context_table[] is yet another per-domain data required for implementing hart entry into (or exit from) domain. Use the recently added domain data support for per-domain hart context so that a dedicated hartindex_to_context_table[] in struct sbi_domain is not needed. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]>
2024-10-25include: sbi: Remove cyclic include in sbi_domain_context.hAnup Patel
The sbi_domain_context.h includes sbi_domain.h and the sbi_domain.h also includes sbi_domain_context.h. Remove this cyclic include in sbi_domain_context.h. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Samuel Holland <[email protected]>
2024-09-25lib: sbi: Use current_hartindex() where possibleSamuel Holland
This avoids calls to the expensive sbi_hartid_to_hartindex() function and also makes the firmware smaller. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-09-23lib: sbi_domain_context: Fix file permissionsSamuel Holland
These C source files should not be marked as executable. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-06-13sbi: sbi_domain_context: Fix trap context for domain context switchingYu Chien Peter Lin
Save/restore sbi_trap_context during domain context switching to ensure proper trap handling and isolation. This maintains correct domain-specific state, avoiding context corruption. Fixes: abea949721bc ("lib: sbi: Introduce trap context") Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Alvin Chang <[email protected]> Tested-by: Alvin Chang <[email protected]> Reviewed-by: Yong Li <[email protected]> Tested-by: Yong Li <[email protected]>
2024-03-10lib: sbi: Add initial domain context management supportQingyu Shang
The domain context management component in OpenSBI provides basic CPU context management routines for existing OpenSBI domain. As domain extension, it was initially designed to facilitate the suspension and resumption of domains, enabling secure domains to efficiently share CPU resources. The patch also provides an addition to the OpenSBI domain to provide updates on hart-domain assignment and declarations of contexts within the domain. Signed-off-by: Qingyu Shang <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]> Tested-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Anup Patel <[email protected]>