Commit Graph

9 Commits

Author SHA1 Message Date
Ruslan Bukin
7722d8c7c0 Add generic arm/arm64 secure-monitor SMCCC interface and switch
PSCI code to use it.

This interface will also be used by Intel Stratix 10 platform.

This was not tested on arm due to lack of PSCI-enabled arm hardware
lying around.

Reviewed by:	andrew
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D21439
2019-09-13 15:56:33 +00:00
Michal Meloun
91e4401364 PSCI: Don't take missing implementation of psci get_version() as fatal.
Minimalistic PSCI implementation in U-Boot doesn't implement get_version()
method for some SoC. In this case, use PSCI version declared by 'psci' node
in DT as fallback.

MFC after:	2 weeks
2019-03-19 15:42:11 +00:00
Andrew Turner
9e8cb3d226 Move psci_call to a header file so we can use it in other files to
communicate with the firmware.

Sponsored by:	DARPA, AFRL
2018-06-13 15:24:07 +00:00
Andrew Turner
5add83935a Add a handler for the PSCI_FEATURES function. This needs PSCI 1.0, so
check for this, returning an error if the version is too old.

Sponsored by:	DARPA, AFRL
2018-06-13 12:33:47 +00:00
Andrew Turner
811880f2a4 Add the PSCI_FEATURES function ID. This is found in PSCI 1.0 and is used
to query if a given function is implemented and its features.

Sponsored by:	DARPA, AFRL
2018-06-13 12:26:37 +00:00
Andrew Turner
8ab09f8a4e Add a function to find the PSCI version the firmware implements from
outside the PSCI driver.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2018-01-09 15:57:09 +00:00
Andrew Turner
574a7c6c47 Call the PSCI reset from cpu_reset on arm64. When rebooting from DDB the
kernel calls this directly so the event handler is not called, meaning
the computer fails to reboot.

Tested by:	cognet
MFC after:	1 week
Sponsored by:	DARPA, AFRL
2017-04-24 11:06:10 +00:00
Andrew Turner
c2dd354bf4 Create a new PSCI error code and use it to signal that starting the CPU is
impossible as the PSCI firmware is missing.

Sponsored by:	ABT Systmes Ltd
2016-10-25 14:18:27 +00:00
Andrew Turner
46b1fe9224 Add a driver for the ARM Power State Coordination Interface (PSCI). This
handles versions 0.1 and 0.2 of the standard on 32-bit ARM.

With this driver we can shutdown in QEMU. Further work is needed to
turn secondary cores on on boot and to support later revisions of the
specification.

Submitted by:	Robin Randhawa <Robin.Randhawa at ARM.com>
Sponsored by:	The FreeBSD Foundation
2015-04-12 13:00:58 +00:00