Skip to content

Commit

Permalink
xen/arm: add SCI mediator support for DomUs
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
oleksiimoisieiev committed Sep 30, 2024
1 parent 4a28169 commit 2eb8c90
Show file tree
Hide file tree
Showing 8 changed files with 367 additions and 14 deletions.
3 changes: 3 additions & 0 deletions tools/include/xenctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,9 @@ int xc_domain_getvnuma(xc_interface *xch,
int xc_domain_soft_reset(xc_interface *xch,
uint32_t domid);

int xc_domain_get_sci_info(xc_interface *xch, uint32_t domid,
uint64_t *paddr, uint32_t *func_id);

#if defined(__i386__) || defined(__x86_64__)
/*
* PC BIOS standard E820 types and structure.
Expand Down
18 changes: 18 additions & 0 deletions tools/libs/ctrl/xc_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -2180,6 +2180,24 @@ int xc_domain_soft_reset(xc_interface *xch,
domctl.domain = domid;
return do_domctl(xch, &domctl);
}

int xc_domain_get_sci_info(xc_interface *xch, uint32_t domid,
uint64_t *paddr, uint32_t *func_id)
{
struct xen_domctl domctl = {};

memset(&domctl, 0, sizeof(domctl));
domctl.cmd = XEN_DOMCTL_get_sci_info;
domctl.domain = domid;

if ( do_domctl(xch, &domctl) != 0 )
return 1;

*paddr = domctl.u.sci_info.paddr;
*func_id = domctl.u.sci_info.func_id;
return 0;
}

/*
* Local variables:
* mode: C
Expand Down
Loading

0 comments on commit 2eb8c90

Please sign in to comment.