Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing SCMI-mediator feature. #216

Open
wants to merge 14 commits into
base: xen-4.19-xt0.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,12 @@ S: Supported
F: xen/arch/arm/include/asm/tee
F: xen/arch/arm/tee/

SCI MEDIATORS
M: Oleksii Moisieiev <[email protected]>
S: Supported
F: xen/arch/arm/sci
F: xen/include/asm-arm/sci

TOOLSTACK
M: Wei Liu <[email protected]>
M: Anthony PERARD <[email protected]>
Expand Down
22 changes: 22 additions & 0 deletions docs/man/xl.cfg.5.pod.in
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,28 @@ Specifies OS ID.

=back

=item B<arm_sci="STRING">

B<Arm only> Set ARM_SCI type for the guest. ARM_SCI is System Control Protocol
allows domain to manage various functions that are provided by HW platform.

=over 4

=item B<none>

Don't allow guest to use ARM_SCI if present on the platform. This is the
default value.

=item B<scmi_smc>

Enables SCMI_SMC support for the guest. SCMI is System Control Management
Inferface - allows domain to manage various functions that are provided by HW
platform, such as clocks, resets and power-domains. Xen will mediate access to
clocks, power-domains and resets between Domains and ATF. Disabled by default.
SCP is used as transport.

=back

=back

=head2 Paravirtualised (PV) Guest Specific Options
Expand Down
3 changes: 3 additions & 0 deletions tools/golang/xenlight/helpers.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions tools/golang/xenlight/types.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tools/include/libxl.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@
*/
#define LIBXL_HAVE_BUILDINFO_ARCH_ARM_SVE_VL 1

/*
* libxl_domain_build_info has the arch_arm.sci field.
*/
#define LIBXL_HAVE_BUILDINFO_ARCH_ARM_SCI 1

/*
* LIBXL_HAVE_SOFT_RESET indicates that libxl supports performing
* 'soft reset' for domains and there is 'soft_reset' shutdown reason
Expand Down
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
2 changes: 0 additions & 2 deletions tools/libs/hypfs/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ char *xenhypfs_read(xenhypfs_handle *fshdl, const char *path)
errno = EISDIR;
break;
case xenhypfs_type_blob:
errno = EDOM;
break;
case xenhypfs_type_string:
ret_buf = buf;
buf = NULL;
Expand Down
Loading