aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/psci
Commit message (Collapse)AuthorAgeFilesLines
* MFC r345299:Michal Meloun2019-08-092-17/+50
| | | | | | | | | | 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. Notes: svn path=/stable/12/; revision=350824
* Fix a typo on the PSCI smc call wrapper.Luiz Otavio O Souza2018-08-142-2/+2
| | | | | | | | Looks good from: andrew Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=337752
* Use int for the pcpu_ssbd argument. This is included from userland and mayAndrew Turner2018-07-312-3/+3
| | | | | | | | | | | not include the needed headers to get the bool definition. Reported by: manu Pointy hat to: andrew Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=336971
* Implement the SSBD (CVE-2018-3639) workaround on arm64Andrew Turner2018-07-312-0/+12
| | | | | | | | | | | | | | | | | | This calls into the Arm Trusted Firmware to enable and disable the workaround for the Speculative Store Bypass Disable (SSBD) issue, also known as Spectre Variant 4. As this may have a large performance overhead, and how exploitable SSBD is is unknown we follow the Linux lead of allowing the administrator to select between always on, always off, or only enabled in the kernel, with the latter being the default. PR: 228955 Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15819 Notes: svn path=/head/; revision=336967
* psci: Add \n at the end of printfEmmanuel Vadot2018-07-061-1/+1
| | | | | | | | Add a \n at the end of the printf if no PSCI function was found otherwise it mess up the console log. Notes: svn path=/head/; revision=336037
* Move the SMCCC SYSINIT later in the boot so the psci driver has attached.Andrew Turner2018-06-201-1/+1
| | | | | | | Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=335439
* Fix the SMCCC signatures, they are all 32-bit calls. This fixes SMCCCAndrew Turner2018-06-201-3/+3
| | | | | | | | | version detection. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=335438
* Add the SMCCC return codes from ARM DEN 0070A.Andrew Turner2018-06-131-0/+9
| | | | | | | | | While here add a comment with the document the function IDs come from. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=335063
* Add support for the ARM SMC Calling Convention (SMCCC). This is a methodAndrew Turner2018-06-132-0/+156
| | | | | | | | | | | | | | to call into the firmware in a similar way to the existing PSCI, and used PSCI to detect when SMCCC is enabled. There is a function ID space we can use. Currently we only support 3 functions in the ARM Architecture Calls region, however it is expected we will expend these in the future. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=335062
* Move psci_call to a header file so we can use it in other files toAndrew Turner2018-06-132-8/+9
| | | | | | | | | communicate with the firmware. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=335061
* Add a handler for the PSCI_FEATURES function. This needs PSCI 1.0, soAndrew Turner2018-06-132-2/+19
| | | | | | | | | check for this, returning an error if the version is too old. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=335056
* Find and cache the PSCI version on driver attach.Andrew Turner2018-06-131-0/+3
| | | | | | | Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=335055
* Add the PSCI_FEATURES function ID. This is found in PSCI 1.0 and is usedAndrew Turner2018-06-131-0/+2
| | | | | | | | | to query if a given function is implemented and its features. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=335054
* Rework PSCI so it only searches for the call function once.Andrew Turner2018-06-121-42/+64
| | | | | | | | | | | This is in preperation for supporting newer smccc functions that also use the same call method. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D15745 Notes: svn path=/head/; revision=334999
* Add a function to find the PSCI version the firmware implements fromAndrew Turner2018-01-092-2/+12
| | | | | | | | | | outside the PSCI driver. MFC after: 1 week Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=327728
* psci: change bootverbose string to 'PSCI 0.2 compatible'Ed Maste2017-10-191-1/+1
| | | | | | | | | | | | | Prior to r324754 we treated PSCI 0.2 and 1.0 as identical, and r324754 extended that to include all PSCI 1.x revisions. Change the string emitted under bootverbose to reference '0.2 compatible' to avoid confusion when the system includes a later PSCI rev. Discussed with: andrew Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=324758
* Allow later PSCI revisions to also work. The latest ARM Trusted FirmwareAndrew Turner2017-10-191-1/+1
| | | | | | | | | | | reports version 1.1 so the check was failing. As thjis is a minor change from 1.0, and future 1.x revisions are also expected to be backwards compatible just ignore the minor revision in the init handler. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=324754
* Also handle psci 1.0. This can be seen as a bug fix update for the 0.2Andrew Turner2017-10-061-3/+6
| | | | | | | | | | specification we already support, with the only changes in functions we don't currently use. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=324368
* arm: add .arch_extension sec for smc instructionEd Maste2017-06-181-1/+2
| | | | | | | | | | | Clang 4.0 accepts the smc instruction with or without specifying .arch_extension sec, but Clang 5.0 produces an error without it. MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=320065
* Call the PSCI reset from cpu_reset on arm64. When rebooting from DDB theAndrew Turner2017-04-242-1/+8
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=317361
* Add ACPI support to the PSCI driver. This checks the Fixed ACPI DescriptionAndrew Turner2016-12-071-25/+219
| | | | | | | | | | | Table to find if the hardware supports PSCI, and if so what method the kernel should use to interact with it. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=309674
* Create a new PSCI error code and use it to signal that starting the CPU isAndrew Turner2016-10-252-2/+6
| | | | | | | | | impossible as the PSCI firmware is missing. Sponsored by: ABT Systmes Ltd Notes: svn path=/head/; revision=307910
* Start to support PSCI 1.0. For all the functions we currently support thisAndrew Turner2015-08-111-14/+15
| | | | | | | | | | can be seen as the same as 0.2. There are changes with the data passed to CPU_SUSPEND, however we don't yet use this call. Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=286630
* Rework the PSCI cpu on code to allow it to work before device drivers haveAndrew Turner2015-05-241-18/+39
| | | | | | | | started. This allows this functions to be used with the regular ARM SMP initialisation sequence. Notes: svn path=/head/; revision=283363
* Add psci for arm64. This is currently used when rebooting and powering offAndrew Turner2015-04-131-0/+49
| | | | | | | | | in qemu. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=281497
* Add a driver for the ARM Power State Coordination Interface (PSCI). ThisAndrew Turner2015-04-123-0/+435
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 Notes: svn path=/head/; revision=281466