SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Presented by
Date
OP-TEE
ARMv8-A PM integration
programmer’s view
Jorge A. Ramirez-Ortiz
4 Feb 2015
1
Agenda
●power management in arm64
●software stack
●psci requirements
●OP-TEE - system view
●psci - developer’s view
●use cases
oCPU_ON/CPU_OFF/CPU_SUSPEND
2
Power Management in AArch64
■arm32 lack of established firmware interfaces
○platform specific code maintained in BSP trees
○the code can’t be upstreamed
■arm64 - clean sheet
○single tree strategy
○delegate the platform specific code to firmware
○define a generic interface to coordinate power control
across the concurrent supervisory systems
●idle, hotplug, system shutdown/reset, migration
○leave peripheral and DVFS to the supervisory sw
ARM recommends:
○Secure world: controls the power states
○Normal world: implements the policy in power and performance management
Rich OS
Secure World
cpu hotplug
secondary boot
idle management
bigLittle migration
3
AArch64 software stack
1.Normal World
a.RichOS kernels on EL1/EL2
b.Hypervisors on EL2
1.Secure World
a.Secure platform firmware
b.Trusted/Secure OS
PSCI details the interface between the Secure
and normal worlds
smc: requires EL3 being implemented.
hyp: option when EL3 is not present but EL2 is
The communication between the Secure Platform Firmware and the Secure OS is vendor dependent.
-OP-TEE integrates with the ARM Trusted Firmware as a runtime service
-https://github.com/ARM-software/arm-trusted-firmware/tree/master/services/spd/opteed
4
Power State Coordination IF requirements
■Core idle management - not peripherals
○standby,
○retention,
○power down
■hotplug: switch processors on/off
■bigLittle TrustedOS migration
■save and restore execution states
■system shutdown and reset hooks:
○each silicon vendor must provide
its SoC implementation
1.standard function identifiers: no longer configurable via device tree
a.different ids for 32-bit PSCI and 64-bit PSCI functions allow
for different ATF implementations
1.added the following functions
a.PSCI_VERSION
b.AFFINITY_INFO
c.MIGRATE_INFO_TYPE *
d.MIGRATE_INFO_UP_CPU
e.SYSTEM_OFF
f.SYSTEM_RESET
1.All functions except MIGRATE/MIGRATE_INFO_UP_CPU are
compulsory
1.various return code changes.
PSCI v0.2
5
OP-TEE - Systems View
■OP-TEE OS runs in AArch32
■the OP-TEE linux driver uses smc32
○driver is out of tree
■the PSCI linux driver uses smc32/smc64
○driver is in kernel.org
■STANDALONE ■ARMv8-A: ARM-TF runtime service
6
PSCI - developer’s view
Linux Kernel
EL1
ARM-TF
smc interface
psci service
dispatcher
platform code
OP-TEE
s-EL1
psci
1
2
opteed
psci
-{0.1, 0.2}
-32/64 calls
dtb
ARM-TF uses the opteed vector table provided during
OP-TEE initialization to be able to call the TrustedOS
(functions are platform dependent)
vector_std_smc_entry
vector_fast_smc_entry
vector_cpu_on_entry
vector_cpu_off_entry
vector_cpu_resume_entry
vector_cpu_suspend_entry
vector_fiq_entry
vector_system_off_entry
vector_system_reset_entry
static const struct thread_handlers handlers = {
.std_smc = main_tee_entry,
.fast_smc = main_tee_entry,
.fiq = main_fiq,
.svc = tee_svc_handler,
.abort = tee_pager_abort_handler,
.cpu_on = cpu_on_handler,
.cpu_off = main_cpu_off_handler,
.cpu_suspend = main_cpu_suspend_handler,
.cpu_resume = main_cpu_resume_handler,
.system_off = main_system_off_handler,
.system_reset = main_system_reset_handler,
};
platform dependent
optee dispatcher
aff {0}
aff {0, 1, 2}
7
AArch64 - use case CPU_ON
LINUX 3.19
NS-EL1
ARM-TF
EL3
smp.c psci.c
__cpu_up
boot_secondary
cpu_psci_cpu_boot
psci_cpu_on (secondary_entry)
smc//hyp
OP-TEE
S-EL1
CPU 1CPU 0
psci_afflvl_on.c
plat/../plat_pm.c
opteed_pm.c
psci_main.c
PMIC
RAM
NS- EL1
entry point
head.S: secondary_entry
psci_afflvl_on.c: psci_afflv{x}_on_finish
plat/../plat_pm.c
{0}
aff {0, 1, 2}
psci_common.c
platform handler
opteed_pm.c
aff {0, 1, 2}
{0}
8
AArch64 - use case CPU_OFF
LINUX 3.19
NS-EL1
ARM-TF
EL3
smp.c psci.c
cpu_die
cpu_psci_cpu_die
psci_cpu_off(POWER_DOWN)
smc//hyp
OP-TEE
S-EL1
psci_afflvl_off.c
psci_main.c
arm32/plat../main.c
plat/../plat_pm.c
opteed_pm.c
aff {0, 1, 2}
{0}
__cpu_die
cpu_psci_cpu_kill
psci_affinity_info(mpidr, 0)
smc//hyp
[1] After performing the platform operations, the trusted
firmware framework enters the WFI loop for the CPU; this
allows the external power controller to power it down.
[2] the cpu_kill kernel interface only checks the status of
the CPU (identified via the mpidr) and does not perform any
power actions with the PMIC.
this call does not return
9
AArch64 - use case CPU_SUSPEND
LINUX 3.19
NS-EL1
ARM-TF
EL3
suspend.c psci.c
cpu_suspend
cpu_psci_cpu_suspen
d
psci_cpu_suspend(STANDBY, entry)
smc//hyp
OP-TEE
S-EL1
plat/../plat_pm.c
psci_main.c
OP_TEE doesn’t need to
implement support for STANDBY
since the firmware will not call
Only STANDBY supported in kernel PSCI interface: all core
context is maintained by the processor and state is entered by
executing WFI in EL3. Changing from standby to running does
not require a reset of the processor.
Other PM states are currently implemented in NS-EL1 (Linux
kernel)
power_state: platform specific id understood by the firmware
(passed to the RichOS in firmware tables/dt)
aff {0, 1, 2}
10
Juno Platform: Soc Power Control
http://infocenter.arm.com/help/topic/com.arm.doc.dto0038a/DTO0038A_juno_arm_development_platform_soc_technical_overview.pdf
11
Power domains
Power modes
Juno Platform: Software Overview
WFI
https://github.com/ARM-software/arm-trusted-firmware
SCPI - system control and power interface
MHU hardware
(mailbox)
https://github.com/ARM-software/linux/blob/1.4-Juno/drivers/mailbox/arm_mhu.c
https://github.com/ARM-software/linux/blob/1.4-
Juno/drivers/mailbox/scpi_protocol.c
The SCPI is the generic runtime interface to the SCP from the AP
through the MHU. It includes:
●Inquiring capabilities of the system and individual devices
●Obtaining and setting the state of the entire system and individual
devices under SCP control. This includes a thermal sensor interface.
●Obtaining and setting the performance level of the processors and
GPUs, that is, Digital Voltage and Frequency Scaling(DVFS).
●Watchdog services to non-trusted AP software. The AP non-trusted
world does not have direct access to a hardware watchdog in the ADP
hardware architecture. The SCP has access to a hardware watchdog
and uses this to help implement the interface.
●Reporting fault conditions.
PSCI
12
13

Weitere ähnliche Inhalte

Was ist angesagt?

Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
Rashila Rr
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)
Gavin Guo
 

Was ist angesagt? (20)

Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with schedulerLCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 
Function Level Analysis of Linux NVMe Driver
Function Level Analysis of Linux NVMe DriverFunction Level Analysis of Linux NVMe Driver
Function Level Analysis of Linux NVMe Driver
 
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM SystemsXPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
 
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPIKernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Tour
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
LCA13: Power State Coordination Interface
LCA13: Power State Coordination InterfaceLCA13: Power State Coordination Interface
LCA13: Power State Coordination Interface
 
Spi drivers
Spi driversSpi drivers
Spi drivers
 
Introduction to Linux Drivers
Introduction to Linux DriversIntroduction to Linux Drivers
Introduction to Linux Drivers
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
 
Power Management from Linux Kernel to Android
Power Management from Linux Kernel to AndroidPower Management from Linux Kernel to Android
Power Management from Linux Kernel to Android
 

Andere mochten auch

HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
Linaro
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
Linaro
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEE
Linaro
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
Linaro
 

Andere mochten auch (20)

LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted Firmware
 
HKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting ReviewHKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting Review
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
 
SFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driverSFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driver
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEE
 
SFO15-205: OP-TEE Content Decryption with Microsoft PlayReady on ARM
SFO15-205: OP-TEE Content Decryption with Microsoft PlayReady on ARMSFO15-205: OP-TEE Content Decryption with Microsoft PlayReady on ARM
SFO15-205: OP-TEE Content Decryption with Microsoft PlayReady on ARM
 
SFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEESFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEE
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
 
BKK16-309A Open Platform support in UEFI
BKK16-309A Open Platform support in UEFIBKK16-309A Open Platform support in UEFI
BKK16-309A Open Platform support in UEFI
 
BKK16-505 Kernel and Bootloader Consolidation and Upstreaming
BKK16-505 Kernel and Bootloader Consolidation and UpstreamingBKK16-505 Kernel and Bootloader Consolidation and Upstreaming
BKK16-505 Kernel and Bootloader Consolidation and Upstreaming
 
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and ProgressBKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
 
Q2.12: Idling ARMs in a busy world: Linux Power Management for ARM Multiclust...
Q2.12: Idling ARMs in a busy world: Linux Power Management for ARM Multiclust...Q2.12: Idling ARMs in a busy world: Linux Power Management for ARM Multiclust...
Q2.12: Idling ARMs in a busy world: Linux Power Management for ARM Multiclust...
 
LAS16-306: Exploring the Open Trusted Protocol
LAS16-306: Exploring the Open Trusted ProtocolLAS16-306: Exploring the Open Trusted Protocol
LAS16-306: Exploring the Open Trusted Protocol
 
BKK16-201 Play Ready OPTEE Integration with Secure Video Path lhg-1
BKK16-201 Play Ready OPTEE Integration with Secure Video Path lhg-1BKK16-201 Play Ready OPTEE Integration with Secure Video Path lhg-1
BKK16-201 Play Ready OPTEE Integration with Secure Video Path lhg-1
 
Specification-Based Test Program Generation for ARM VMSAv8-64 MMUs
Specification-Based Test Program Generation for ARM VMSAv8-64 MMUsSpecification-Based Test Program Generation for ARM VMSAv8-64 MMUs
Specification-Based Test Program Generation for ARM VMSAv8-64 MMUs
 
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s goingKernel Recipes 2016 - Kernel documentation: what we have and where it’s going
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going
 
BKK16-404A PCI Development Meeting
BKK16-404A PCI Development MeetingBKK16-404A PCI Development Meeting
BKK16-404A PCI Development Meeting
 

Ähnlich wie HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware

Information Gathering 2
Information Gathering 2Information Gathering 2
Information Gathering 2
Aero Plane
 

Ähnlich wie HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware (20)

LCA13: CPUIDLE: One driver to rule them all?
LCA13: CPUIDLE: One driver to rule them all?LCA13: CPUIDLE: One driver to rule them all?
LCA13: CPUIDLE: One driver to rule them all?
 
Nvidia tegra K1 Presentation
Nvidia tegra K1 PresentationNvidia tegra K1 Presentation
Nvidia tegra K1 Presentation
 
SoC Idling for unconf COSCUP 2016
SoC Idling for unconf COSCUP 2016SoC Idling for unconf COSCUP 2016
SoC Idling for unconf COSCUP 2016
 
Q2.12: Power Management Across OSs
Q2.12: Power Management Across OSsQ2.12: Power Management Across OSs
Q2.12: Power Management Across OSs
 
LCA13: ARMv8 Status and Updates
LCA13: ARMv8 Status and UpdatesLCA13: ARMv8 Status and Updates
LCA13: ARMv8 Status and Updates
 
Linux : PSCI
Linux : PSCILinux : PSCI
Linux : PSCI
 
Information Gathering 2
Information Gathering 2Information Gathering 2
Information Gathering 2
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
 
Juniper Trouble Shooting
Juniper Trouble ShootingJuniper Trouble Shooting
Juniper Trouble Shooting
 
ELC North America 2021 Introduction to pin muxing and gpio control under linux
ELC  North America 2021 Introduction to pin muxing and gpio control under linuxELC  North America 2021 Introduction to pin muxing and gpio control under linux
ELC North America 2021 Introduction to pin muxing and gpio control under linux
 
C C N A Day2
C C N A  Day2C C N A  Day2
C C N A Day2
 
Important cisco-chow-commands
Important cisco-chow-commandsImportant cisco-chow-commands
Important cisco-chow-commands
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
Ccna day2
Ccna day2Ccna day2
Ccna day2
 
Ccna 2
Ccna 2Ccna 2
Ccna 2
 
Ccna day2
Ccna day2Ccna day2
Ccna day2
 
Ccna day2-140715152313-phpapp02
Ccna day2-140715152313-phpapp02Ccna day2-140715152313-phpapp02
Ccna day2-140715152313-phpapp02
 
Ccna day2
Ccna day2Ccna day2
Ccna day2
 
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SAN19-118
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SAN19-118Reliability, Availability, and Serviceability (RAS) on ARM64 status - SAN19-118
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SAN19-118
 
Gl embedded starterkit_ethernet
Gl embedded starterkit_ethernetGl embedded starterkit_ethernet
Gl embedded starterkit_ethernet
 

Mehr von Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

Mehr von Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Kürzlich hochgeladen

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Kürzlich hochgeladen (20)

%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 

HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware

  • 1. Presented by Date OP-TEE ARMv8-A PM integration programmer’s view Jorge A. Ramirez-Ortiz 4 Feb 2015 1
  • 2. Agenda ●power management in arm64 ●software stack ●psci requirements ●OP-TEE - system view ●psci - developer’s view ●use cases oCPU_ON/CPU_OFF/CPU_SUSPEND 2
  • 3. Power Management in AArch64 ■arm32 lack of established firmware interfaces ○platform specific code maintained in BSP trees ○the code can’t be upstreamed ■arm64 - clean sheet ○single tree strategy ○delegate the platform specific code to firmware ○define a generic interface to coordinate power control across the concurrent supervisory systems ●idle, hotplug, system shutdown/reset, migration ○leave peripheral and DVFS to the supervisory sw ARM recommends: ○Secure world: controls the power states ○Normal world: implements the policy in power and performance management Rich OS Secure World cpu hotplug secondary boot idle management bigLittle migration 3
  • 4. AArch64 software stack 1.Normal World a.RichOS kernels on EL1/EL2 b.Hypervisors on EL2 1.Secure World a.Secure platform firmware b.Trusted/Secure OS PSCI details the interface between the Secure and normal worlds smc: requires EL3 being implemented. hyp: option when EL3 is not present but EL2 is The communication between the Secure Platform Firmware and the Secure OS is vendor dependent. -OP-TEE integrates with the ARM Trusted Firmware as a runtime service -https://github.com/ARM-software/arm-trusted-firmware/tree/master/services/spd/opteed 4
  • 5. Power State Coordination IF requirements ■Core idle management - not peripherals ○standby, ○retention, ○power down ■hotplug: switch processors on/off ■bigLittle TrustedOS migration ■save and restore execution states ■system shutdown and reset hooks: ○each silicon vendor must provide its SoC implementation 1.standard function identifiers: no longer configurable via device tree a.different ids for 32-bit PSCI and 64-bit PSCI functions allow for different ATF implementations 1.added the following functions a.PSCI_VERSION b.AFFINITY_INFO c.MIGRATE_INFO_TYPE * d.MIGRATE_INFO_UP_CPU e.SYSTEM_OFF f.SYSTEM_RESET 1.All functions except MIGRATE/MIGRATE_INFO_UP_CPU are compulsory 1.various return code changes. PSCI v0.2 5
  • 6. OP-TEE - Systems View ■OP-TEE OS runs in AArch32 ■the OP-TEE linux driver uses smc32 ○driver is out of tree ■the PSCI linux driver uses smc32/smc64 ○driver is in kernel.org ■STANDALONE ■ARMv8-A: ARM-TF runtime service 6
  • 7. PSCI - developer’s view Linux Kernel EL1 ARM-TF smc interface psci service dispatcher platform code OP-TEE s-EL1 psci 1 2 opteed psci -{0.1, 0.2} -32/64 calls dtb ARM-TF uses the opteed vector table provided during OP-TEE initialization to be able to call the TrustedOS (functions are platform dependent) vector_std_smc_entry vector_fast_smc_entry vector_cpu_on_entry vector_cpu_off_entry vector_cpu_resume_entry vector_cpu_suspend_entry vector_fiq_entry vector_system_off_entry vector_system_reset_entry static const struct thread_handlers handlers = { .std_smc = main_tee_entry, .fast_smc = main_tee_entry, .fiq = main_fiq, .svc = tee_svc_handler, .abort = tee_pager_abort_handler, .cpu_on = cpu_on_handler, .cpu_off = main_cpu_off_handler, .cpu_suspend = main_cpu_suspend_handler, .cpu_resume = main_cpu_resume_handler, .system_off = main_system_off_handler, .system_reset = main_system_reset_handler, }; platform dependent optee dispatcher aff {0} aff {0, 1, 2} 7
  • 8. AArch64 - use case CPU_ON LINUX 3.19 NS-EL1 ARM-TF EL3 smp.c psci.c __cpu_up boot_secondary cpu_psci_cpu_boot psci_cpu_on (secondary_entry) smc//hyp OP-TEE S-EL1 CPU 1CPU 0 psci_afflvl_on.c plat/../plat_pm.c opteed_pm.c psci_main.c PMIC RAM NS- EL1 entry point head.S: secondary_entry psci_afflvl_on.c: psci_afflv{x}_on_finish plat/../plat_pm.c {0} aff {0, 1, 2} psci_common.c platform handler opteed_pm.c aff {0, 1, 2} {0} 8
  • 9. AArch64 - use case CPU_OFF LINUX 3.19 NS-EL1 ARM-TF EL3 smp.c psci.c cpu_die cpu_psci_cpu_die psci_cpu_off(POWER_DOWN) smc//hyp OP-TEE S-EL1 psci_afflvl_off.c psci_main.c arm32/plat../main.c plat/../plat_pm.c opteed_pm.c aff {0, 1, 2} {0} __cpu_die cpu_psci_cpu_kill psci_affinity_info(mpidr, 0) smc//hyp [1] After performing the platform operations, the trusted firmware framework enters the WFI loop for the CPU; this allows the external power controller to power it down. [2] the cpu_kill kernel interface only checks the status of the CPU (identified via the mpidr) and does not perform any power actions with the PMIC. this call does not return 9
  • 10. AArch64 - use case CPU_SUSPEND LINUX 3.19 NS-EL1 ARM-TF EL3 suspend.c psci.c cpu_suspend cpu_psci_cpu_suspen d psci_cpu_suspend(STANDBY, entry) smc//hyp OP-TEE S-EL1 plat/../plat_pm.c psci_main.c OP_TEE doesn’t need to implement support for STANDBY since the firmware will not call Only STANDBY supported in kernel PSCI interface: all core context is maintained by the processor and state is entered by executing WFI in EL3. Changing from standby to running does not require a reset of the processor. Other PM states are currently implemented in NS-EL1 (Linux kernel) power_state: platform specific id understood by the firmware (passed to the RichOS in firmware tables/dt) aff {0, 1, 2} 10
  • 11. Juno Platform: Soc Power Control http://infocenter.arm.com/help/topic/com.arm.doc.dto0038a/DTO0038A_juno_arm_development_platform_soc_technical_overview.pdf 11 Power domains Power modes
  • 12. Juno Platform: Software Overview WFI https://github.com/ARM-software/arm-trusted-firmware SCPI - system control and power interface MHU hardware (mailbox) https://github.com/ARM-software/linux/blob/1.4-Juno/drivers/mailbox/arm_mhu.c https://github.com/ARM-software/linux/blob/1.4- Juno/drivers/mailbox/scpi_protocol.c The SCPI is the generic runtime interface to the SCP from the AP through the MHU. It includes: ●Inquiring capabilities of the system and individual devices ●Obtaining and setting the state of the entire system and individual devices under SCP control. This includes a thermal sensor interface. ●Obtaining and setting the performance level of the processors and GPUs, that is, Digital Voltage and Frequency Scaling(DVFS). ●Watchdog services to non-trusted AP software. The AP non-trusted world does not have direct access to a hardware watchdog in the ADP hardware architecture. The SCP has access to a hardware watchdog and uses this to help implement the interface. ●Reporting fault conditions. PSCI 12
  • 13. 13