Skip to content

Commit de96d75

Browse files
oleksiimoisieievGrygorii Strashko
authored andcommitted
xen/arm: add SCI mediator support for DomUs
Integration of the SCMI mediator with xen libs: - add hypercalls to aquire SCI channel and set device permissions for DomUs; - add SCMI_SMC nodes to DomUs device-tree based on partial device-tree; - SCI requests redirection from DomUs to Firmware. Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com> Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
1 parent a8638b6 commit de96d75

8 files changed

Lines changed: 365 additions & 14 deletions

File tree

tools/include/xenctrl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,9 @@ int xc_domain_getvnuma(xc_interface *xch,
12301230
int xc_domain_soft_reset(xc_interface *xch,
12311231
uint32_t domid);
12321232

1233+
int xc_domain_get_sci_info(xc_interface *xch, uint32_t domid,
1234+
uint64_t *paddr, uint32_t *func_id);
1235+
12331236
#if defined(__i386__) || defined(__x86_64__)
12341237
/*
12351238
* PC BIOS standard E820 types and structure.

tools/libs/ctrl/xc_domain.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,6 +2219,23 @@ int xc_domain_setrproc(xc_interface *xch,
22192219
return do_domctl(xch, &domctl);
22202220
}
22212221

2222+
int xc_domain_get_sci_info(xc_interface *xch, uint32_t domid,
2223+
uint64_t *paddr, uint32_t *func_id)
2224+
{
2225+
struct xen_domctl domctl = {};
2226+
2227+
memset(&domctl, 0, sizeof(domctl));
2228+
domctl.cmd = XEN_DOMCTL_get_sci_info;
2229+
domctl.domain = domid;
2230+
2231+
if ( do_domctl(xch, &domctl) != 0 )
2232+
return 1;
2233+
2234+
*paddr = domctl.u.sci_info.paddr;
2235+
*func_id = domctl.u.sci_info.func_id;
2236+
return 0;
2237+
}
2238+
22222239
/*
22232240
* Local variables:
22242241
* mode: C

0 commit comments

Comments
 (0)