Trusted Firmware Deep Dive. Dan Handley Charles Garcia-Tobin

Size: px
Start display at page:

Download "Trusted Firmware Deep Dive. Dan Handley Charles Garcia-Tobin"

Transcription

1 Trusted Firmware Deep Dive Dan Handley Charles Garcia-Tobin 1

2 Agenda Architecture overview Memory usage Code organisation Cold boot deep dive PSCI deep dive 2

3 Example System Architecture Normal World Secure World EL0 Guest A App 1 Guest A App 2 Guest B App 1 Guest B App 2 Trusted App 1 Trusted App 2 Secure EL0 EL1 Guest Linux Kernel A Guest Linux Kernel B Trusted OS Boot Firmware Secure EL1 EL2 UEFI Hypervisor Key SMC EL3 Execution EL3 Runtime EL3 Firmware (Secure Monitor) Boot Firmware Secure EL1 / EL0 Execution EL2 Execution EL1 / EL0 Execution SMC Calling Convention Interface (ARM DEN 0028A) is gateway to: Runtime EL3 Firmware Trusted OS / TEE services Power State Coordination Interface (PSCI) (ARM DEN 0022B.b) Transported by SMC calls Also see ARMv8-A Architecture Manual (AR150-DA-70000) 3

4 Example System Architecture Normal World Secure World EL0 Guest A App 1 Guest A App 2 Guest B App 1 Guest B App 2 Trusted App 1 Trusted App 2 Secure EL0 EL1 EL2 UEFI Guest Linux Kernel A Guest Linux Kernel B Trusted OS ARM Trusted Hypervisor Firmware Boot Firmware Secure EL1 Key SMC EL3 Execution EL3 Runtime EL3 Firmware (Secure Monitor) Boot Firmware Secure EL1 / EL0 Execution EL2 Execution EL1 / EL0 Execution SMC Calling Convention Interface (ARM DEN 0028A) is gateway to: Runtime EL3 Firmware Trusted OS / TEE services Power State Coordination Interface (PSCI) (ARM DEN 0022B.b) Transported by SMC calls Also see ARMv8-A Architecture Manual (AR150-DA-70000) 4

5 ARM Trusted Firmware Architecture Normal World Secure World UEFI - BL3 3 EDK2 Core I/O Drivers UEFI Secure Boot Other Tests Test Suite BL3 3_ALT Interrupt Handler PSCI Tests EL1 Arch Context Save/Restore Exception Trapper EL2 Arch Context Save/Restore Test Secure EL1 Payload - BL3 2 PSCI Test S-EL1 Arch Context Save/Restore Service Router Other Test Interrupt Handler Runtime Arch + Platform Init Trusted Boot Firmware - BL2 Boot Time Arch + Platform Init Trusted Board Boot 2 NV Storage Driver Boot ROM - BL1 EL3 Firmware - BL3 1 (Secure Monitor) PSCI SMC Interface Service Router Other EL3 Interfaces World Switcher Interrupt Handler Boot Time Arch + Platform Init Cold/Warm Boot Detection Trusted Board Boot 1 EL3 Arch Context Save/Restore Pwr Ctrl Driver Runtime Arch + Platform Init Temp SMC Handler Glossary BL - Boot Loader EDK2 - EFI Development Kit 2 EL - Exception Level NV - Non-Volatile PSCI - Power State Control Interface SMC - Secure Monitor Call UEFI - Unified Enhanced Firmware Interface EL3 Execution Secure EL1 Execution EL2 Execution EL1 Execution Key External Interface Potential Interface Interface Usage 5

6 ARM Trusted Firmware Architecture Normal World Trusted World UEFI - BL3 3 EDK2 Core I/O Drivers UEFI Secure Boot Other Tests Test Suite BL3 3_ALT Interrupt Handler PSCI Tests EL1 Arch Context Save/Restore Exception Trapper EL2 Arch Context Save/Restore Test Secure EL1 Payload - BL3 2 PSCI Test S-EL1 Arch Context Save/Restore Service Router Other Test Interrupt Handler Runtime Arch + Platform Init Trusted Boot Firmware - BL2 Boot Time Arch + Platform Init Trusted Board Boot 2 NV Storage Driver Boot ROM - BL1 Not Available Yet EL3 Firmware - BL3 1 (Secure Monitor) PSCI SMC Interface Service Router Other EL3 Interfaces World Switcher Interrupt Handler Boot Time Arch + Platform Init Cold/Warm Boot Detection Trusted Board Boot 1 Partially Available EL3 Arch Context Save/Restore Pwr Ctrl Driver Runtime Arch + Platform Init Temp SMC Handler Glossary BL - Boot Loader EDK2 - EFI Development Kit 2 EL - Exception Level NV - Non-Volatile PSCI - Power State Control Interface SMC - Secure Monitor Call UEFI - Unified Enhanced Firmware Interface EL3 Execution Secure EL1 Execution EL2 Execution EL1 Execution Key External Interface Potential Interface Interface Usage 6

7 ARM Trusted Firmware Boot Flow Normal World Trusted World To Hypervisor / Linux Kernel Other Tests Test Suite BL3 3_ALT Interrupt Handler PSCI Tests EL1 Arch Context UEFI - BL3 3 BL3 Save/Restore 3 EDK2 Core (Alternative) Exception Trapper I/O Drivers BL3 UEFI Secure 3 EL2 Arch Context Boot Save/Restore Test Secure EL1 Payload - BL3 2 PSCI Test S-EL1 Arch Context Save/Restore Service Router Other Interrupt BL3 Test 2 Handler Runtime Arch + Platform Init Trusted Boot Firmware - BL2 Boot Time Arch + Platform Init BL2 Trusted Board Boot 2 NV Storage Driver 2 nd level Boot Loader (BL2) loads all 3 rd level images EL3 Firmware - BL3 1 (Secure Monitor) PSCI EL3 Arch Context Save/Restore SMC Interface Service Router BL3 1 Other EL3 Interfaces Pwr Ctrl Driver World Switcher Interrupt Handler Runtime Arch + Platform Init Boot ROM - BL1 Boot Time Arch + Platform Init Cold/Warm Boot Detection BL1 Trusted Board Boot 1 Temp SMC Handler 1 st level Boot Loader (BL1) loads 2 nd level image RESET Glossary BL - Boot Loader EDK2 - EFI Development Kit 2 EL - Exception Level NV - Non-Volatile PSCI - Power State Control Interface SMC - Secure Monitor Call UEFI - Unified Enhanced Firmware Interface EL3 Execution Secure EL1 Execution EL2 Execution EL1 Execution Key External Interface Potential Interface Interface Usage 7

8 Current Memory Usage on FVP Storage Secure ROM BL1 code Semi-hosting BL1, BL2, BL3 1 and Linux kernel code. NOR UEFI code Virtio Block Linux file system Intend to use this for BL images instead of semihosting 8

9 Current Memory Usage on FVP Storage Secure ROM BL1 code Semi-hosting BL1, BL2, BL3 1 and Linux kernel code. NOR UEFI code Virtio Block Linux file system Intend to use this for BL images instead of semihosting Execution Secure ROM BL1 code Secure SRAM BL1 data (bottom) BL2 code & data (top) BL3 1 code & data (middle, above BL1) Secure DRAM Hand-off structures between BL images When secure_memory parameter is defined, will need to program TZC to access DRAM NOR Early UEFI code DRAM UEFI code and data Linux code and data 9

10 Code Organisation arch - Architecture specific code (just AArch64 for now) plat - Platform specific code (i.e. porting layer) bl<x> - BL specific code common - architecture/platform neutral code used by all BLs lib - library functionality common to all other code drivers - e.g. CCI, UART, FVP power controller include docs fdts - not necessarily the final home for these! Conforms to Linux coding standard 10

11 11 COLD BOOT DEEP DIVE

12 CPU States Running. CPU is executing normally Idle. States where OS is aware of CPU being idle Execution resumes if new OS thread needs scheduling or interrupt is received Idle Standby. Typically entered via WFI/WFE and exited via wake-up event All caches and memories required for execution remain powered on and coherent All CPU state (context) is preserved Execution resumes from line after WFI/WFE Idle Retention. Similar to standby except cannot access debug registers Idle Power Down. CPU is powered off CPU state at each EL must be saved Execution starts at the reset vector, after which CPU state at each EL must be restored Local caches may be off Off. States where the OS is not using the CPU for scheduling Execution starts from the reset vector and no CPU state is restored Enabling a CPU in this state requires a Hotplug 12

13 ./bl1/aarch64/bl1_entrypoint.s 13

14 ./bl1/aarch64/bl1_entrypoint.s Always do basic CPU init 14

15 ./bl1/aarch64/bl1_entrypoint.s If PSCI provided an entrypoint, then jump to BL3 1 (either hotplug or resume from idle) 15

16 ./bl1/aarch64/bl1_entrypoint.s If there's no entrypoint and this is the primary CPU, then continue with cold boot 16

17 ./bl1/aarch64/bl1_entrypoint.s Otherwise put the secondary CPU in a safe state (e.g. On FVP, power off CPU) 17

18 ./plat/fvp/aarch64/bl1_plat_helpers.s 18

19 ./plat/fvp/aarch64/bl1_plat_helpers.s Initialize the secure memory used by BL1 (On FVP, just zero out the entrypoint mailboxes) 19

20 ./plat/fvp/aarch64/bl1_plat_helpers.s Create a small stack in "always uncached" memory to allow "C" code execution as soon as possible 20

21 ./plat/fvp/aarch64/bl1_plat_helpers.s "early" means "before MMU is enabled" In this case, just calculate extents of memory 21

22 ./plat/fvp/aarch64/bl1_plat_helpers.s Now create simple page tables and enable MMU / caches 22

23 ./plat/fvp/aarch64/bl1_plat_helpers.s Create a stack in normal memory 23

24 ./plat/fvp/aarch64/bl1_plat_helpers.s Branch to main "C" function, bl1_main() 24

25 ./bl1/bl1_main.c 25

26 ./bl1/bl1_main.c Do remaining architectural / platform setup now we are executing in normal memory with MMU / caches enabled E.g. control registers, generic timer, CCI snoops, console,... 26

27 ./bl1/bl1_main.c Calculate where to load BL2, load it, then run it 27

28 BL2 and BL3 1 Entrypoints are similar to BL1's platform_cold_boot_init() Create a small stack in coherent / always uncached memory) Early platform setup (e.g. unpack image hand-off information) Platform-specific architectural setup (e.g. enable MMU / caches) Create a stack in normal memory Branch to main "C" function for remaining platform / arch setup BL2 loads BL3 <X> images similarly to how BL1 loads BL2 BL2 passes information about BL3 3 (e.g. UEFI) to BL3 1, before running BL3 1 Means that BL3 1 can jump to BL3 3 without going back to BL2 Has to go via BL1 SMC handler to jump from Secure EL1 to EL3 See SynchronousExceptionA64 in./bl1/aarch64/early_exceptions.s 28

29 BL3 1 Initialization Can override any BL1 initialization Reinitializes exception vectors, MMU, control registers, etc... Installs runtime SMC handler Initializes platform for normal world software Initializes GIC, runtime services (e.g. PSCI) Returns from exception into normal world boot loader, BL3 3 (e.g UEFI) 29

30 30 PSCI DEEP DIVE

31 PSCI Status Work in progress. Key functions for boot and hotplug are functional. Idle is next on the radar PSCI_VERSION CPU_ON CPU_SUSPEND CPU_OFF AFFINTY_INFO MIGRATE PSCI Function MIGRATE_INFO_TYPE SYSTEM_OFF SYSTEM_RESET Implementation Status OK OK NOK (code present not ready) OK OK Not present Not present Not present Not present 31

32 PSCI Topology PSCI needs to build a map of system topology How many clusters, cores per cluster etc Used for last man tracking Topology information is provided by the platform using the following functions: int plat_get_max_afflvl() int plat_get_aff_count(unsigned int aff_lvl, unsigned long mpidr) unsigned int plat_get_aff_state(unsigned int aff_lvl, unsigned long mpidr) 32

33 PSCI Topology plat_get_max_afflvl() Returns highest affinity level implemented by the platform e.g. For FVP models: int plat_get_max_afflvl() { return MPIDR_AFFLVL1; } 33

34 PSCI Topology plat_get_aff_count(aff_lvl, mpidr) Given an MPIDR and a level of affinity return how many instances are implemented at that affinity level For example consider 2x3 system: 2 clusters, 2 cores in cluster 0, and 3 in cluster 1 mpidr aff_lvl Return Value 0000 (Cluster 0, Core 0) 0001 (Cluster 0, Core 1) 0 2 (two affinity level 0 instances, or cores, in cluster 0) 1 2 (There are two affinity level 1 instances or clusters in the system) 0100 (Cluster 1, Core 0) 0101 (Cluster 1, Core 1) 0 3 (three affinity level 0 instances, or cores, in cluster 1) 1 2 (There are two affinity level 1 instances or clusters in the system) 34

35 PSCI Topology plat_get_aff_state(aff_lvl, mpidr) Returns whether an affinity instance is present or absent You can use it to deal with hierarchies that are asymmetric For example a cluster and a single core sharing an interconnect Saves on having to take locks for affinity levels that don t exist 35

36 FVP topology FVP model sets up topology information as part of cold boot path (called from primary CPU) bl31_entrypoint bl31_main bl31_platform_setup plat_setup_topology runtime_svc_init psci_setup Bl31/AArch64/bl31_entrypoint.S Plat/fvp/bl31_plat_setup.c Plat/fvp/Fvp_topology.c Bl31/bl31_main.c plat_setup_topology() sets up necessary data to allow the following to work plat_get_max_aff_lvl(), plat_get_aff_count(), plat_get_aff_state() BL3 1 then moves on to set up PSCI 36

37 PSCI Deep Dive After cold boot path calls plat_setup_topology(), it calls psci_setup() This functions create a topology map for the system based on the platform specific functions Map is an array of aff_map_node pointers typedef struct { unsigned long mpidr; unsigned char state; char level; unsigned int data; bakery_lock lock; } aff_map_node; //mpidr of node //[present absent] [PSCI state] //aff level //cookie (holds index into //non-secure data for CPU_ON/CPU_SUSPEND //Lock for node (bakery_lock will be replaced with a more abstract lock API) See psci_setup.c/psci_common.c/psci_private.h 37

38 PSCI Topology psci_aff_map holds topology tree (array of aff_map_node (s)) Held in device ordered memory Array is populated in a breadth first way Aff 3 entities Aff 2 entities Aff 1 entities Aff 0 entities e.g. for a 2x2 system Cluster 0 Cluster 1 CPU 0.0 CPU 0.1 CPU 1.0 CPU 1.1 Additional affinity information arrays: psci_aff_limits : indices to start and end of each affinty level in topology tree psci_ns_entry_info: array of ns_entry_info. Structure to hold entry information into EL[2 1] for CPU_ON/CPU_SUSPEND psci_secure_context: array of secure_context. Structure to hold secure context information that needs saving when powering down 38

39 PSCI Topology psci_setup_up completes by: Initialising the state of the primary CPU (and containing higher affinity levels, e.g cluster) to PSCI_STATE_ON All others default to PSCI_STATE_OFF Calls into platform to set up platform specific PSCI operations plat\fvp\fvp_pm.c int platform_setup_pm(plat_pm_ops **plat_ops) { *plat_ops = &fvp_plat_pm_ops; return 0; } static plat_pm_ops fvp_plat_pm_ops = { 0, // standby (not used in FVP) fvp_affinst_on, // cpu_on will come here fvp_affinst_off, // cpu_off will come here fvp_affinst_suspend, // cpu_suspend fvp_affinst_on_finish, fvp_affinst_suspend_finish, }; // called on wake up path of cpu being turned on // called on wake up path of cpu waking from suspend 39

40 psci_cpu_off common/psci/psci_entry.s psci_cpu_off: func_prologue sub sp, sp, #0x10 stp x19, x20, [sp, #0] mov x19, sp bl read_mpidr bl platform_set_coherent_stack << Switch stack bl psci_cpu_off mov x1, #PSCI_E_SUCCESS cmp x0, x1 b.eq final_wfi mov sp, x19 ldp x19, x20, [sp,#0] add sp, sp, #0x10 func_epilogue ret 40

41 psci_cpu_off common/psci/psci_entry.s psci_cpu_off: func_prologue sub sp, sp, #0x10 stp x19, x20, [sp, #0] mov x19, sp bl read_mpidr bl platform_set_coherent_stack bl psci_cpu_off << do work of switching off mov x1, #PSCI_E_SUCCESS cmp x0, x1 b.eq final_wfi mov sp, x19 ldp x19, x20, [sp,#0] add sp, sp, #0x10 func_epilogue ret 41

42 psci_cpu_off common/psci/psci_main.c int psci_cpu_off(void) { int target_afflvl = get_max_afflvl(); mpidr = read_mpidr(); /* * Traverse from the highest to the lowest affinity level. When the * lowest affinity level is hit, all the locks are acquired. State * management is done immediately followed by cpu, cluster... *..target_afflvl specific actions as this function unwinds back. */ rc = psci_afflvl_off(mpidr, target_afflvl, MPIDR_AFFLVL0); if (rc!= PSCI_E_SUCCESS) { assert(rc == PSCI_E_DENIED); } } return rc; 42

43 psci_afflvl_off FVP success Take Cluster Node Lock Not at AffinityLevel0 so recurse down a level Take CPU Node Lock cpustate = CPU_OFF if last man cluster state = OFF psci_afflvl0_off( ) flush PoU fvp_affinst_off(..,afflevel0, ) take core out of coherency prevent IRQ spurious wakeups power power controller Release CPU Node Lock psci_afflvl1_off( ) if cluster_state == OFF flush to PoC fvp_affinst_off(..,afflevel1, ) disable cci power power controller Release Cluster Node Lock Affinity Level 1/Cluster Affinity Level 0/CPU //bl31/common/psci_afflvl_off.c //plat/fvp/fvp_pm.c //bl31/common/psci_afflvl_off.c //plat/fvp/fvp_pm.c Affinity Level 1/Cluster 43

44 psci_afflvl_off common/psci/psci_aff_lvl_off.c int psci_afflvl_off(unsigned long mpidr,int { cur_afflvl, int tgt_afflvl) bakery_lock_get(mpidr, &aff_node->lock); /* Keep the old state and the next one handy */ prev_state = psci_get_state(aff_node->state); next_state = PSCI_STATE_OFF; /* * We start from the highest affinity level * and work our way * downwards to the lowest i.e. MPIDR_AFFLVL0. */ if (aff_node->level == tgt_afflvl) { } else { psci_change_state(mpidr, tgt_afflvl, get_max_afflvl(), next_state); rc = psci_afflvl_off(mpidr, level - 1, tgt_afflvl); prev_state); } if (rc!= PSCI_E_SUCCESS) { } psci_set_state(aff_node->state, goto exit; rc = psci_afflvl_off_handlers[level](mpidr, aff_node); if (rc!= PSCI_E_SUCCESS) { } exit: psci_set_state(aff_node->state, prev_state); goto exit; bakery_lock_release(mpidr, &aff_node->lock); return rc; When we get to CPU } Level (Aff0) we set state. This also sets higher affinity level states if last man 44

45 psci_afflvl_off common/psci/psci_aff_lvl_off.c int psci_afflvl_off(unsigned long mpidr,int cur_afflvl, int tgt_afflvl) { bakery_lock_get(mpidr, &aff_node->lock); /* Keep the old state and the next one handy */ prev_state = psci_get_state(aff_node->state); next_state = PSCI_STATE_OFF; /* * We start from the highest affinity level * and work our way * downwards to the lowest i.e. MPIDR_AFFLVL0. */ if (aff_node->level == tgt_afflvl) { psci_change_state(mpidr, tgt_afflvl, get_max_afflvl(), next_state); } else { rc = psci_afflvl_off(mpidr, level - 1, tgt_afflvl); prev_state); } if (rc!= PSCI_E_SUCCESS) { } psci_set_state(aff_node->state, goto exit; rc = psci_afflvl_off_handlers[level](mpidr, aff_node); if (rc!= PSCI_E_SUCCESS) { } exit: } psci_set_state(aff_node->state, prev_state); goto exit; bakery_lock_release(mpidr, &aff_node->lock); return rc; Handlers do actual powering down 45

46 psci_cpu_off common/psci/psci_entry.s psci_cpu_off: func_prologue sub sp, sp, #0x10 stp x19, x20, [sp, #0] mov x19, sp bl read_mpidr bl platform_set_coherent_stack bl psci_cpu_off mov x1, #PSCI_E_SUCCESS cmp x0, x1 b.eq final_wfi << all OK final WFI mov sp, x19 ldp x19, x20, [sp,#0] add sp, sp, #0x10 func_epilogue ret 46

47 psci_cpu_off common/psci/psci_entry.s psci_cpu_off: func_prologue sub sp, sp, #0x10 stp x19, x20, [sp, #0] mov x19, sp bl read_mpidr bl platform_set_coherent_stack bl psci_cpu_off mov x1, #PSCI_E_SUCCESS cmp x0, x1 b.eq final_wfi mov sp, x19 << else switch stack back and return ldp x19, x20, [sp,#0] add sp, sp, #0x10 func_epilogue ret 47

48 psci_cpu_on common/psci/psci_main.c int psci_cpu_on(unsigned long target_cpu, unsigned long entrypoint, unsigned long context_id) { int rc; unsigned int start_afflvl, target_afflvl; /* Determine if the cpu exists of not */ rc = psci_validate_mpidr(target_cpu, MPIDR_AFFLVL0); if (rc!= PSCI_E_SUCCESS) { goto exit; } start_afflvl = get_max_afflvl(); target_afflvl = MPIDR_AFFLVL0; rc = psci_afflvl_on(target_cpu, entrypoint, context_id, start_afflvl, target_afflvl); Basic error checking Heavy lifting exit: } return rc; 48

49 psci_afflvl_on FVP success Take Cluster Node Lock Take CPU Node Lock Affinity Level 1/Cluster Affinity Level 0/CPU psci_afflvl1_on( ) fvp_affinst_on(..,afflevel1, ) basic validation psci_afflvl0_on( ) Affinity Level 1/Cluster //bl31/common/psci_afflvl_on.c //plat/fvp/fvp_pm.c //bl31/common/psci_afflvl_on.c store ns_entry_point and context_id (passed from by OSPM) fvp_affinst_on(..,afflevel0, ) //plat/fvp/fvp_pm.c Wait for any pending off to complete (CPU that you are turning ON, Set up a mailbox so booting core takes warm boot path program power controller could have been turning itself OFF) Affinity Level 0/CPU Change CPU Node state to ON_PENDING Change Cluster Node state to ON_PENDING Release CPU Node Lock Release Cluster Node Lock Affinity Level 0/CPU Affinity Level 1/Cluster Affinity Level 0/CPU Affinity Level 1/Cluster 49

50 psci_afflvl_on common/psci/psci_aff_lvl_on.c Set Hierarchy to ON_PENDING int psci_afflvl_on(unsigned long target_cpu, unsigned long entrypoint, unsigned long context_id, int current_afflvl, int target_afflvl) { for (level = current_afflvl; level >= target_afflvl; level--) { aff_node = psci_get_aff_map_node if (aff_node) } Lock bakery_lock_get(mpidr, &aff_node->lock); Call each level s on handler for (level = current_afflvl; } level >= target_afflvl; level--) { psci_afflvl_on_handlers[level](target_cpu, aff_node, entrypoint, context_id); } /* * State management: Update the states */ psci_change_state(target_cpu, target_afflvl, get_max_afflvl(), PSCI_STATE_ON_PENDING); exit: for (level = target_afflvl; Unlock level <= current_afflvl; level++) { bakery_lock_release(mpidr, &aff_node->lock); 50

51 fvp_affinst_on plat/fvp/fvp_pm.c int fvp_affinst_on(unsigned long mpidr, unsigned long sec_entrypoint, unsigned long ns_entrypoint, unsigned int afflvl, unsigned int state) { Ensure entry point is valid if (ns_entrypoint < DRAM_BASE) { rc = PSCI_E_INVALID_PARAMS; goto exit; } if (afflvl!= MPIDR_AFFLVL0) goto exit; Deal with potential race with CPU_OFF /* * Ensure that we do not cancel an inflight * power off request * for the target cpu. That would leave * it in a zombie wfi */ do { psysr = fvp_pwrc_read_psysr(mpidr); } while (psysr & PSYSR_AFF_L0); Set up warm boot linear_id = platform_get_core_pos(mpidr); fvp_mboxes = (mailbox *) (TZDRAM_BASE + MBOX_OFF); fvp_mboxes[linear_id].value = sec_entrypoint; flush_dcache_range( (unsigned long) &fvp_mboxes[linear_id], sizeof(unsigned long)); Program power controller fvp_pwrc_write_pponr(mpidr); 51

52 ./bl1/aarch64/bl1_entrypoint.s If PSCI provided an entrypoint, then jump to BL3 1 (either hotplug or resume from idle) 52

53 common/psci/psci_entry.s Jump into OSPM entry point Call psci_afflvl_power_on_finish on coherent stacks 53

54 psci_afflvl_power_on_finish Take CPU Node Lock psci_afflvl0_on_finish( ) //bl31/common/psci_common.c //bl31/common/psci_afflvl_on.c fvp_affinst_on_finish(..,afflevel0, ) //plat/fvp/fvp_pm.c turn on intra cluster coherency zero out mailbox, enable GIC, enable access to system counter install exception handlers,enable mmu and caching, EL3 setup psci_get_ns_entry_info() //bl31/common/psci_common.c set up return non-secure Exception Level Take Cluster Node Lock Affinity Level 0/CPU psci_afflvl1_on_finish( ) //bl31/common/psci_afflvl_on.c fvp_affinst_on_finish(..,afflevel1, ) //plat/fvp/fvp_pm.c enable CCI Affinity Level 1/Cluster update CPU Node State to ON update cluster Node State to ON Release Cluster Node Lock Affinity Level 0/CPU Affinity Level 1/Cluster Affinity Level 1/Cluster Release CPU Node Lock Affinity Level 0/CPU 54

55 Further reading GitHub Usage Guide Porting Guide SMC Calling Convention PSCI spec ARMv8 ARM 55

ARM Trusted Firmware ARM UEFI SCT update

ARM Trusted Firmware ARM UEFI SCT update presented by ARM Trusted Firmware ARM UEFI SCT update UEFI US Fall Plugfest September 20-22, 2016 Presented by Charles García-Tobin (ARM) Updated 2011-06-01 Agenda ARM Trusted Firmware What and why UEFI

More information

ARM Trusted Firmware From Embedded to Enterprise. Dan Handley

ARM Trusted Firmware From Embedded to Enterprise. Dan Handley ARM Trusted Firmware From Embedded to Enterprise Dan Handley Agenda Quick recap Project news Security hardening AArch32 support ENGINEERS AND DEVICES WORKING TOGETHER Other enhancements Translation table

More information

Enabling Arm DynamIQ support. Dan Handley (Arm) Ionela Voinescu (Arm) Vincent Guittot (Linaro)

Enabling Arm DynamIQ support. Dan Handley (Arm) Ionela Voinescu (Arm) Vincent Guittot (Linaro) Enabling Arm DynamIQ support Dan Handley (Arm) Ionela Voinescu (Arm) Vincent Guittot (Linaro) Agenda DynamIQ introduction DynamIQ and Arm Trusted Firmware OS Power Management with DynamIQ L3 partial power-down

More information

ARM Trusted Firmware Evolution HKG15 February Andrew Thoelke Systems & Software, ARM

ARM Trusted Firmware Evolution HKG15 February Andrew Thoelke Systems & Software, ARM ARM Trusted Evolution HKG15 February 2015 Andrew Thoelke Systems & Software, ARM 1 ARM Trusted for 64-bit ARMv8-A A refresher Standardized EL3 Runtime For all 64-bit ARMv8-A systems Reducing porting and

More information

Designing Security & Trust into Connected Devices

Designing Security & Trust into Connected Devices Designing Security & Trust into Connected Devices Eric Wang Sr. Technical Marketing Manager Tech Symposia China 2015 November 2015 Agenda Introduction Security Foundations on ARM Cortex -M Security Foundations

More information

The Role UEFI Technologies Play in ARM Platform Architecture

The Role UEFI Technologies Play in ARM Platform Architecture presented by The Role UEFI Technologies Play in ARM Platform Architecture Spring 2017 UEFI Seminar and Plugfest March 27-31, 2017 Presented by Dong Wei (ARM) Updated 2011-06- 01 UEFI Plugfest March 2017

More information

Dynamic secure firmware configuration. Dan Handley (Arm)

Dynamic secure firmware configuration. Dan Handley (Arm) Dynamic secure firmware configuration Dan Handley (Arm) Recap BUD17 had a session to discuss possible secure world use of kernel Device Tree (DT) Like the kernel, it s desirable to have a single set of

More information

Designing Security & Trust into Connected Devices

Designing Security & Trust into Connected Devices Designing Security & Trust into Connected Devices Rob Coombs Security Marketing Director TechCon 11/10/15 Agenda Introduction Security Foundations on Cortex-M Security Foundations on Cortex-A Use cases

More information

ACPI-next C-States Charles Garcia-Tobin Oct 2013

ACPI-next C-States Charles Garcia-Tobin Oct 2013 1 ACPI-next C-States Charles Garcia-Tobin Oct 2013 ACPI-Next C-states Numerical non-equivalency Types of states Topology awareness Additional Information: Version, BreakEven, S/R, Cache Device, Power Resource,

More information

SMP bring up on ARM SoCs

SMP bring up on ARM SoCs Embedded Linux Conference 2014 SMP bring up on ARM SoCs Gregory CLEMENT Bootlin gregory.clement@bootlin.com - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com

More information

ARM Trusted Firmware: Changes for Axxia

ARM Trusted Firmware: Changes for Axxia ARM Trusted Firmware: Changes for Axxia atf_84091c4_axxia_1.39 Clean up klocwork issues, Critical and Error only, and only in code added to support Axxia. atf_84091c4_axxia_1.38 Allow non-secure access

More information

How to get realistic C-states latency and residency? Vincent Guittot

How to get realistic C-states latency and residency? Vincent Guittot How to get realistic C-states latency and residency? Vincent Guittot Agenda Overview Exit latency Enter latency Residency Conclusion Overview Overview PMWG uses hikey960 for testing our dev on b/l system

More information

Tailoring TrustZone as SMM Equivalent

Tailoring TrustZone as SMM Equivalent presented by Tailoring TrustZone as SMM Equivalent Tony C.S. Lo Senior Manager American Megatrends Inc. UEFI Plugfest March 2016 www.uefi.org 1 Agenda Introduction ARM TrustZone SMM-Like Services in TrustZone

More information

Cortex-A15 MPCore Software Development

Cortex-A15 MPCore Software Development Cortex-A15 MPCore Software Development Course Description Cortex-A15 MPCore software development is a 4 days ARM official course. The course goes into great depth and provides all necessary know-how to

More information

UEFI ARM Update. Presented by Mitch Ishihara. UEFI Plugfest October presented by

UEFI ARM Update. Presented by Mitch Ishihara. UEFI Plugfest October presented by UEFI ARM Update Presented by Mitch Ishihara presented by UEFI Plugfest October 2014 Agenda Economics Objectives Status Overview Specifications Implementation Testing Technology Resources www.uefi.org 2

More information

UEFI updates, Secure firmware and Secure Services on Arm

UEFI updates, Secure firmware and Secure Services on Arm presented by UEFI updates, Secure firmware and Secure Services on Arm Spring 2018 UEFI Seminar and Plugfest March 26-30, 2018 Presented by Dong Wei & Matteo Carlini (Arm) Agenda UEFI and SBBR/EBBR Updates

More information

64 bit Bare Metal Programming on RPI-3. Tristan Gingold

64 bit Bare Metal Programming on RPI-3. Tristan Gingold 64 bit Bare Metal Programming on RPI-3 Tristan Gingold gingold@adacore.com What is Bare Metal? Images: Wikipedia No box What is Bare Metal? No Operating System Your application is the OS Why Bare Board?

More information

Trusted Execution Environments (TEE) and the Open Trust Protocol (OTrP) Hannes Tschofenig and Mingliang Pei 16 th July IETF 99 th, Prague

Trusted Execution Environments (TEE) and the Open Trust Protocol (OTrP) Hannes Tschofenig and Mingliang Pei 16 th July IETF 99 th, Prague Trusted Execution Environments (TEE) and the Open Trust Protocol (OTrP) Hannes Tschofenig and Mingliang Pei 16 th July 2017 -- IETF 99 th, Prague 2 What do we mean by security? Communication Security Aims

More information

ARMv8-A Software Development

ARMv8-A Software Development ARMv8-A Software Development Course Description ARMv8-A software development is a 4 days ARM official course. The course goes into great depth and provides all necessary know-how to develop software for

More information

EC H2020 dredbox: Seminar School at INSA Rennes

EC H2020 dredbox: Seminar School at INSA Rennes EC H2020 dredbox: Seminar School at INSA Rennes contact@virtualopensystems.com www.virtualopensystems.com Pierre LUCAS 2017-11-22 Open Part 1: Open Company Overview 2 OpenOpen Confidential & Proprietary

More information

Multitasking on Cortex-M(0) class MCU A deepdive into the Chromium-EC scheduler

Multitasking on Cortex-M(0) class MCU A deepdive into the Chromium-EC scheduler Multitasking on Cortex-M(0) class MCU A deepdive into the Chromium-EC scheduler $whoami Embedded Software Engineer at National Instruments We just finished our first product using Chromium-EC and future

More information

LCA14-107: ACPI upstreaming. Wed-5-Mar, 11:15am, Al Stone, G Gregory, Hanjun Guo

LCA14-107: ACPI upstreaming. Wed-5-Mar, 11:15am, Al Stone, G Gregory, Hanjun Guo LCA14-107: ACPI upstreaming Wed-5-Mar, 11:15am, Al Stone, G Gregory, Hanjun Guo ACPI Upstreaming Staged for 3.15 (in linux-next): Odds and ends: APEI cleanups, white space, minor bugs in ACPI driver Reduced

More information

AC OB S. Multi-threaded FW framework (OS) for embedded ARM systems Torsten Jaekel, June 2014

AC OB S. Multi-threaded FW framework (OS) for embedded ARM systems Torsten Jaekel, June 2014 AC OB S Multi-threaded FW framework (OS) for embedded ARM systems Torsten Jaekel, June 2014 ACOBS ACtive OBject (operating) System Simplified FW System for Multi-Threading on ARM embedded systems ACOBS

More information

Cortex-A9 MPCore Software Development

Cortex-A9 MPCore Software Development Cortex-A9 MPCore Software Development Course Description Cortex-A9 MPCore software development is a 4 days ARM official course. The course goes into great depth and provides all necessary know-how to develop

More information

AArch64 Virtualization

AArch64 Virtualization Connect AArch64 User Virtualization Guide Version Version 0.11.0 Page 1 of 13 Revision Information The following revisions have been made to this User Guide. Date Issue Confidentiality Change 03 March

More information

Designing Security & Trust into Connected Devices

Designing Security & Trust into Connected Devices Designing Security & Trust into Connected Devices Eric Wang Senior Technical Marketing Manager Shenzhen / ARM Tech Forum / The Ritz-Carlton June 14, 2016 Agenda Introduction Security Foundations on Cortex-A

More information

Porting bhyve on ARM. Mihai Carabas, Peter Grehan BSDCan 2016 University of Ottawa Ottawa, Canada June 10 11, 2016

Porting bhyve on ARM. Mihai Carabas, Peter Grehan BSDCan 2016 University of Ottawa Ottawa, Canada June 10 11, 2016 Porting bhyve on ARM Mihai Carabas, Peter Grehan {mihai,grehan}@freebsd.org BSDCan 2016 University of Ottawa Ottawa, Canada June 10 11, 2016 About me University POLITEHNICA of Bucharest PhD Student: virtualization

More information

ARMv8 port of the Jailhouse hypervisor

ARMv8 port of the Jailhouse hypervisor Security Level: ARMv8 port of the Jailhouse hypervisor Antonios Motakis antonios.motakis@huawei.com Version: V1.0(20160321) Huawei Technologies Duesseldorf GmbH Acknowledgements Jan Kiszka, SIEMENS (Upstream

More information

Software Delegated Exception Interface (SDEI)

Software Delegated Exception Interface (SDEI) Software Delegated Exception Interface (SDEI) Platform Design Document Copyright 2017 ARM or its affiliates. All rights reserved. Document number: ARM DEN 0054A Software Delegated Exception Interface System

More information

Back To The Future: A Radical Insecure Design of KVM on ARM

Back To The Future: A Radical Insecure Design of KVM on ARM Back To The Future: A Radical Insecure Design of KVM on ARM Abstract In ARM, there are certain instructions that generate exceptions. Such instructions are typically executed to request a service from

More information

Lecture 4: Mechanism of process execution. Mythili Vutukuru IIT Bombay

Lecture 4: Mechanism of process execution. Mythili Vutukuru IIT Bombay Lecture 4: Mechanism of process execution Mythili Vutukuru IIT Bombay Low-level mechanisms How does the OS run a process? How does it handle a system call? How does it context switch from one process to

More information

Chap.6 Limited Direct Execution. Dongkun Shin, SKKU

Chap.6 Limited Direct Execution. Dongkun Shin, SKKU Chap.6 Limited Direct Execution 1 Problems of Direct Execution The OS must virtualize the CPU in an efficient manner while retaining control over the system. Problems how can the OS make sure the program

More information

Reliability, Availability, and Serviceability (RAS) on AArch64. Fu Wei (Linaro LEG) Supreeth Venkatesh (ARM)

Reliability, Availability, and Serviceability (RAS) on AArch64. Fu Wei (Linaro LEG) Supreeth Venkatesh (ARM) Reliability, Availability, and Serviceability (RAS) on AArch64 Fu Wei (Linaro LEG) Supreeth Venkatesh (ARM) AGENDA 1. Brief introduction of RAS 2. RAS on AArch64 3. Definition, Importance, History Overview

More information

SoC Idling & CPU Cluster PM

SoC Idling & CPU Cluster PM SoC Idling & CPU Cluster PM Presented by Ulf Hansson Lina Iyer Kevin Hilman Date BKK16-410 March 10, 2016 Event Linaro Connect BKK16 SoC Idling & CPU Cluster PM Idle management of devices via runtime PM

More information

Cortex-A15 MPCore Software Development

Cortex-A15 MPCore Software Development Cortex-A15 MPCore Software Development תיאור הקורס קורסDevelopment Cortex-A15 MPCore Software הינו הקורסהרשמי שלחברת ARM בן 4 ימים, מעמיקמאודומכסהאתכלהנושאיםהקשוריםבפיתוחתוכנה לפלטפורמותמבוססותליבתMPCore.Cortex-A15

More information

BUD17-301: KVM/ARM Nested Virtualization. Christoffer Dall

BUD17-301: KVM/ARM Nested Virtualization. Christoffer Dall BUD17-301: KVM/ARM Nested Virtualization Christoffer Dall Nested Virtualization VM VM VM App App App App App VM App Hypervisor Hypervisor Hardware Terminology Nested VM VM Nested VM L2 App App App App

More information

The Next Steps in the Evolution of Embedded Processors

The Next Steps in the Evolution of Embedded Processors The Next Steps in the Evolution of Embedded Processors Terry Kim Staff FAE, ARM Korea ARM Tech Forum Singapore July 12 th 2017 Cortex-M Processors Serving Connected Applications Energy grid Automotive

More information

Cortex-A5 MPCore Software Development

Cortex-A5 MPCore Software Development Cortex-A5 MPCore Software Development תיאורהקורס קורסDevelopment Cortex-A5 MPCore Software הינו הקורס הרשמי שלחברת ARM בן 4 ימים, מעמיקמאודומכסהאתכלהנושאיםהקשוריםבפיתוחתוכנה לפלטפורמותמבוססותליבת.Cortex-A5

More information

Implementing Secure Software Systems on ARMv8-M Microcontrollers

Implementing Secure Software Systems on ARMv8-M Microcontrollers Implementing Secure Software Systems on ARMv8-M Microcontrollers Chris Shore, ARM TrustZone: A comprehensive security foundation Non-trusted Trusted Security separation with TrustZone Isolate trusted resources

More information

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018 CSCE 311 - Operating Systems Interrupts, Exceptions, and Signals Qiang Zeng, Ph.D. Fall 2018 Previous Class Process state transition Ready, blocked, running Call Stack Execution Context Process switch

More information

Support for high-level languages

Support for high-level languages Outline: Support for high-level languages memory organization ARM data types conditional statements & loop structures the ARM Procedure Call Standard hands-on: writing & debugging C programs 2005 PEVE

More information

embos Real Time Operating System CPU & Compiler specifics for ARM core with ARM RealView Developer Suite 3.0 Document Rev. 1

embos Real Time Operating System CPU & Compiler specifics for ARM core with ARM RealView Developer Suite 3.0 Document Rev. 1 embos Real Time Operating System CPU & Compiler specifics for ARM core with ARM RealView Developer Suite 3.0 Document Rev. 1 A product of SEGGER Microcontroller GmbH & Co. KG www.segger.com 2/25 embos

More information

UEFI in Arm Platform Architecture

UEFI in Arm Platform Architecture presented by UEFI in Arm Platform Architecture Fall 2017 UEFI Seminar and Plugfest October 30 November 3, 2017 Presented by Dong Wei (Arm Limited) UEFI Plugfest October 2017 www.uefi.org 1 Agenda Arm @

More information

ARM64 Server RAS Solutions. Jonathan (Zhixiong) Zhang Cavium Inc.

ARM64 Server RAS Solutions. Jonathan (Zhixiong) Zhang Cavium Inc. ARM64 Server RAS Solutions Jonathan (Zhixiong) Zhang Cavium Inc. Agenda Overview Solutions Building blocks Reflections Overview Reliability, Availability, Serviceability RAS is one of the most important

More information

Four Components of a Computer System

Four Components of a Computer System Four Components of a Computer System Operating System Concepts Essentials 2nd Edition 1.1 Silberschatz, Galvin and Gagne 2013 Operating System Definition OS is a resource allocator Manages all resources

More information

Review: Program Execution. Memory program code program data program stack containing procedure activation records

Review: Program Execution. Memory program code program data program stack containing procedure activation records Threads and Concurrency 1 Review: Program Execution Registers program counter, stack pointer,... Memory program code program data program stack containing procedure activation records CPU fetches and executes

More information

Anne Bracy CS 3410 Computer Science Cornell University

Anne Bracy CS 3410 Computer Science Cornell University Anne Bracy CS 3410 Computer Science Cornell University The slides were originally created by Deniz ALTINBUKEN. P&H Chapter 4.9, pages 445 452, appendix A.7 Manages all of the software and hardware on the

More information

RA3 - Cortex-A15 implementation

RA3 - Cortex-A15 implementation Formation Cortex-A15 implementation: This course covers Cortex-A15 high-end ARM CPU - Processeurs ARM: ARM Cores RA3 - Cortex-A15 implementation This course covers Cortex-A15 high-end ARM CPU OBJECTIVES

More information

Using kgdb and the kgdb Internals

Using kgdb and the kgdb Internals Using kgdb and the kgdb Internals Jason Wessel jason.wessel@windriver.com Tom Rini trini@kernel.crashing.org Amit S. Kale amitkale@linsyssoft.com Using kgdb and the kgdb Internals by Jason Wessel by Tom

More information

ARM CORTEX-R52. Target Audience: Engineers and technicians who develop SoCs and systems based on the ARM Cortex-R52 architecture.

ARM CORTEX-R52. Target Audience: Engineers and technicians who develop SoCs and systems based on the ARM Cortex-R52 architecture. ARM CORTEX-R52 Course Family: ARMv8-R Cortex-R CPU Target Audience: Engineers and technicians who develop SoCs and systems based on the ARM Cortex-R52 architecture. Duration: 4 days Prerequisites and related

More information

Big.LITTLE Processing with ARM Cortex -A15 & Cortex-A7

Big.LITTLE Processing with ARM Cortex -A15 & Cortex-A7 Big.LITTLE Processing with ARM Cortex -A15 & Cortex-A7 Improving Energy Efficiency in High-Performance Mobile Platforms Peter Greenhalgh, ARM September 2011 This paper presents the rationale and design

More information

Reliability, Availability, and Serviceability(RAS) on ARM64. Wei Fu

Reliability, Availability, and Serviceability(RAS) on ARM64. Wei Fu Reliability, Availability, and Serviceability(RAS) on ARM64 Wei Fu AGENDA What is RAS? ARMv8 CPU requirements for RAS BERT and CPER, HEST and GHESv2, EINJ/ERST SW components for RAS(in example) CPU core,

More information

19: I/O. Mark Handley. Direct Memory Access (DMA)

19: I/O. Mark Handley. Direct Memory Access (DMA) 19: I/O Mark Handley Direct Memory Access (DMA) 1 Interrupts Revisited Connections between devices and interrupt controller actually use interrupt lines on the bus rather than dedicated wires. Interrupts

More information

CS162 Operating Systems and Systems Programming Lecture 14. Caching (Finished), Demand Paging

CS162 Operating Systems and Systems Programming Lecture 14. Caching (Finished), Demand Paging CS162 Operating Systems and Systems Programming Lecture 14 Caching (Finished), Demand Paging October 11 th, 2017 Neeraja J. Yadwadkar http://cs162.eecs.berkeley.edu Recall: Caching Concept Cache: a repository

More information

Anne Bracy CS 3410 Computer Science Cornell University

Anne Bracy CS 3410 Computer Science Cornell University Anne Bracy CS 3410 Computer Science Cornell University The slides were originally created by Deniz ALTINBUKEN. P&H Chapter 4.9, pages 445 452, appendix A.7 Manages all of the software and hardware on the

More information

SimBench. A Portable Benchmarking Methodology for Full-System Simulators. Harry Wagstaff Bruno Bodin Tom Spink Björn Franke

SimBench. A Portable Benchmarking Methodology for Full-System Simulators. Harry Wagstaff Bruno Bodin Tom Spink Björn Franke SimBench A Portable Benchmarking Methodology for Full-System Simulators Harry Wagstaff Bruno Bodin Tom Spink Björn Franke Institute for Computing Systems Architecture University of Edinburgh ISPASS 2017

More information

ARM-KVM: Weather Report Korea Linux Forum

ARM-KVM: Weather Report Korea Linux Forum ARM-KVM: Weather Report Korea Linux Forum Mario Smarduch Senior Virtualization Architect m.smarduch@samsung.com 1 ARM-KVM This Year Key contributors Linaro, ARM Access to documentation & specialized HW

More information

csci3411: Operating Systems

csci3411: Operating Systems csci3411: Operating Systems Lecture 3: System structure and Processes Gabriel Parmer Some slide material from Silberschatz and West System Structure System Structure How different parts of software 1)

More information

Embedded Linux Architecture

Embedded Linux Architecture Embedded Linux Architecture Types of Operating Systems Real-Time Executive Monolithic Kernel Microkernel Real-Time Executive For MMU-less processors The entire address space is flat or linear with no memory

More information

real-time kernel documentation

real-time kernel documentation version 1.1 real-time kernel documentation Introduction This document explains the inner workings of the Helium real-time kernel. It is not meant to be a user s guide. Instead, this document explains overall

More information

Precept 2: Non-preemptive Scheduler. COS 318: Fall 2018

Precept 2: Non-preemptive Scheduler. COS 318: Fall 2018 Precept 2: Non-preemptive Scheduler COS 318: Fall 2018 Project 2 Schedule Precept: Monday 10/01, 7:30pm (You are here) Design Review: Monday 10/08, 3-7pm Due: Sunday 10/14, 11:55pm Project 2 Overview Goal:

More information

Real Safe Times in the Jailhouse Hypervisor Unrestricted Siemens AG All rights reserved

Real Safe Times in the Jailhouse Hypervisor Unrestricted Siemens AG All rights reserved Siemens Corporate Technology Real Safe Times in the Jailhouse Hypervisor Real Safe Times in the Jailhouse Hypervisor Agenda Jailhouse introduction Safe isolation Architecture support Jailhouse application

More information

ARM big.little Technology Unleashed An Improved User Experience Delivered

ARM big.little Technology Unleashed An Improved User Experience Delivered ARM big.little Technology Unleashed An Improved User Experience Delivered Govind Wathan Product Specialist Cortex -A Mobile & Consumer CPU Products 1 Agenda Introduction to big.little Technology Benefits

More information

Digging Into The Core of Boot

Digging Into The Core of Boot Digging Into The Core of Boot Yuriy Bulygin Oleksandr Bazhaniuk @c7zero @ABazhaniuk Agenda Intro Recap of MMIO BAR Issues in Coreboot & UEFI Coreboot ACPI GNVS Pointer Issue SMI Handler Issues in Coreboot

More information

Process Time. Steven M. Bellovin January 25,

Process Time. Steven M. Bellovin January 25, Multiprogramming Computers don t really run multiple programs simultaneously; it just appears that way Each process runs to completion, but intermixed with other processes Process 1 6 ticks Process 2 Process

More information

NetBSD on Marvell Armada XP System on a Chip

NetBSD on Marvell Armada XP System on a Chip NetBSD on Marvell Armada XP System on a Chip Zbigniew Bodek zbb@semihalf.com EuroBSDCon 2013, Malta 1 Presentation outline Justification for choice Hardware overview Prerequisites Device drivers Validation

More information

ECE254 Lab3 Tutorial. Introduction to MCB1700 Hardware Programming. Irene Huang

ECE254 Lab3 Tutorial. Introduction to MCB1700 Hardware Programming. Irene Huang ECE254 Lab3 Tutorial Introduction to MCB1700 Hardware Programming Irene Huang Lab3 Requirements : API Dynamic Memory Management: void * os_mem_alloc (int size, unsigned char flag) Flag takes two values:

More information

Real-Time Programming

Real-Time Programming Real-Time Programming Week 7: Real-Time Operating Systems Instructors Tony Montiel & Ken Arnold rtp@hte.com 4/1/2003 Co Montiel 1 Objectives o Introduction to RTOS o Event Driven Systems o Synchronization

More information

12. Interrupts and Programmable Multilevel Interrupt Controller

12. Interrupts and Programmable Multilevel Interrupt Controller 12. Interrupts and Programmable Multilevel Interrupt Controller 12.1 Features Short and predictable interrupt response time Separate interrupt configuration and vector address for each interrupt Programmable

More information

The Early System Start-Up Process. Group Presentation by: Tianyuan Liu, Caiwei He, Krishna Parasuram Srinivasan, Wenbin Xu

The Early System Start-Up Process. Group Presentation by: Tianyuan Liu, Caiwei He, Krishna Parasuram Srinivasan, Wenbin Xu The Early System Start-Up Process Group Presentation by: Tianyuan Liu, Caiwei He, Krishna Parasuram Srinivasan, Wenbin Xu 1 Boot Process Booting is the initialization of a computerized system In Linux,

More information

Cortex-R5 Software Development

Cortex-R5 Software Development Cortex-R5 Software Development Course Description Cortex-R5 software development is a three days ARM official course. The course goes into great depth, and provides all necessary know-how to develop software

More information

Timers 1 / 46. Jiffies. Potent and Evil Magic

Timers 1 / 46. Jiffies. Potent and Evil Magic Timers 1 / 46 Jiffies Each timer tick, a variable called jiffies is incremented It is thus (roughly) the number of HZ since system boot A 32-bit counter incremented at 1000 Hz wraps around in about 50

More information

Background: Operating Systems

Background: Operating Systems Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M030 9 th October 2015 Outline Goals of an operating system Sketch of UNIX User processes, kernel Process-kernel communication Waiting

More information

THE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7

THE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7 THE PROCESS ABSTRACTION CS124 Operating Systems Winter 2015-2016, Lecture 7 2 The Process Abstraction Most modern OSes include the notion of a process Term is short for a sequential process Frequently

More information

System Firmware and Device Firmware Updates using Unified Extensible Firmware Interface (UEFI) Capsules

System Firmware and Device Firmware Updates using Unified Extensible Firmware Interface (UEFI) Capsules presented by System Firmware and Device Firmware Updates using Unified Extensible Firmware Interface (UEFI) Capsules Fall 2018 UEFI Plugfest October 15 19, 2018 Presented by Brian Richardson (Intel) Materials

More information

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Hakim Weatherspoon CS 3410 Computer Science Cornell University Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Deniz Altinbuken, Professors Weatherspoon, Bala, Bracy, and Sirer. C practice

More information

CS162 Operating Systems and Systems Programming Lecture 14. Caching and Demand Paging

CS162 Operating Systems and Systems Programming Lecture 14. Caching and Demand Paging CS162 Operating Systems and Systems Programming Lecture 14 Caching and Demand Paging October 17, 2007 Prof. John Kubiatowicz http://inst.eecs.berkeley.edu/~cs162 Review: Hierarchy of a Modern Computer

More information

ECE 598 Advanced Operating Systems Lecture 11

ECE 598 Advanced Operating Systems Lecture 11 ECE 598 Advanced Operating Systems Lecture 11 Vince Weaver http://www.eece.maine.edu/~vweaver vincent.weaver@maine.edu 23 February 2016 Announcements Homework #5 Posted Some notes, discovered the hard

More information

Intel SoC FPGA Embedded Development Suite (SoC EDS) Release Notes

Intel SoC FPGA Embedded Development Suite (SoC EDS) Release Notes Intel SoC FPGA Embedded Development Suite (SoC EDS) Release Notes Updated for Intel Quartus Prime Design Suite: 18.1 Subscribe Latest document on the web: PDF HTML Contents Contents Intel SoC FPGA Embedded

More information

SMP/BIOS Overview. March 19, 2015

SMP/BIOS Overview. March 19, 2015 SMP/BIOS Overview March 19, 2015!!! SMP/BIOS is currently supported only on Cortex-M3/M4 (Ducati/Benelli) subsystems and Cortex-A15 (DRA7xx/K2/Omap5) subsystems!!! Agenda SMP/BIOS Overview What is SMP/BIOS?

More information

KeyStone II. CorePac Overview

KeyStone II. CorePac Overview KeyStone II ARM Cortex A15 CorePac Overview ARM A15 CorePac in KeyStone II Standard ARM Cortex A15 MPCore processor Cortex A15 MPCore version r2p2 Quad core, dual core, and single core variants 4096kB

More information

ECE254 Lab3 Tutorial. Introduction to Keil LPC1768 Hardware and Programmers Model. Irene Huang

ECE254 Lab3 Tutorial. Introduction to Keil LPC1768 Hardware and Programmers Model. Irene Huang ECE254 Lab3 Tutorial Introduction to Keil LPC1768 Hardware and Programmers Model Irene Huang Lab3 Part A Requirements (1) A function to obtain the task information OS_RESULT os_tsk_get(os_tid task_id,

More information

Bill Bridge. Oracle Software Architect NVM support for C Applications

Bill Bridge. Oracle Software Architect NVM support for C Applications JANUARY 20, 2015, SAN JOSE, CA Bill Bridge PRESENTATION TITLE GOES HERE Place Speaker Photo Here if Available Oracle Software Architect NVM support for C Applications Overview Oracle has developed a NVM

More information

Operating Systems. II. Processes

Operating Systems. II. Processes Operating Systems II. Processes Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Outline Concepts Definitions and basic concepts Process

More information

19: I/O Devices: Clocks, Power Management

19: I/O Devices: Clocks, Power Management 19: I/O Devices: Clocks, Power Management Mark Handley Clock Hardware: A Programmable Clock Pulses Counter, decremented on each pulse Crystal Oscillator On zero, generate interrupt and reload from holding

More information

3. Process Management in xv6

3. Process Management in xv6 Lecture Notes for CS347: Operating Systems Mythili Vutukuru, Department of Computer Science and Engineering, IIT Bombay 3. Process Management in xv6 We begin understanding xv6 process management by looking

More information

An Implementation Of Multiprocessor Linux

An Implementation Of Multiprocessor Linux An Implementation Of Multiprocessor Linux This document describes the implementation of a simple SMP Linux kernel extension and how to use this to develop SMP Linux kernels for architectures other than

More information

Beyond TrustZone Security Enclaves Reed Hinkel Senior Manager Embedded Security Market Develop

Beyond TrustZone Security Enclaves Reed Hinkel Senior Manager Embedded Security Market Develop Beyond TrustZone Security Enclaves Reed Hinkel Senior Manager Embedded Security Market Develop Part2 Security Enclaves Tech Seminars 2017 Agenda New security technology for IoT Security Enclaves CryptoIsland

More information

The Kernel Abstraction

The Kernel Abstraction The Kernel Abstraction Debugging as Engineering Much of your time in this course will be spent debugging In industry, 50% of software dev is debugging Even more for kernel development How do you reduce

More information

Using the UEFI Shell. October 2010 UEFI Taipei Plugfest Insyde Software

Using the UEFI Shell. October 2010 UEFI Taipei Plugfest Insyde Software Using the UEFI Shell October 2010 UEFI Taipei Plugfest 1 San Francisco Cable Car 2 Agenda Insyde UEFI Support UEFI Shell 2.0 What is it? UEFI Shell 2.0 Unique Features Network Browsing Example Application

More information

SMP/BIOS Overview. Nov 18, 2014

SMP/BIOS Overview. Nov 18, 2014 SMP/BIOS Overview Nov 18, 2014!!! SMP/BIOS is currently supported only on Cortex-M3/M4 (Ducati/Benelli) subsystems and Cortex-A15 (Vayu/K2/Omap5) subsystems!!! Agenda SMP/BIOS Overview What is SMP/BIOS?

More information

Introduction to OS. Introduction MOS Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

Introduction to OS. Introduction MOS Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1 Introduction to OS Introduction MOS 1.1 1.3 Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Mahmoud El-Gayyar / Introduction to OS 1 Why an Operating Systems course? Understanding of inner workings of systems

More information

SMP support is provided only by the procnto-smp variant. This is built using source from:

SMP support is provided only by the procnto-smp variant. This is built using source from: SMP Support in the Kernel# SMP support is provided only by the procnto-smp variant. This is built using source from: VARIANT_smp conditional code code in the ker/cpu/smp directory to override uniprocessor

More information

csci3411: Operating Systems

csci3411: Operating Systems csci3411: Operating Systems Lecture 3: System structure and Processes Gabriel Parmer Some slide material from Silberschatz and West System Structure System Structure How different parts of software 1)

More information

The UtePC/Yalnix Memory System

The UtePC/Yalnix Memory System The UtePC/Yalnix Memory System This document describes the UtePC memory management hardware subsystem and the operations that your Yalnix kernel must perform to control it. Please refer to Handout 3 for

More information

Arm Server Ready. Dong Wei

Arm Server Ready. Dong Wei Arm Server Ready Dong Wei Agenda Arm ServerReady Program SBSA/SBBR Updates PCIe Integration Updates UEFI Forum Updates Server Management Strategy ENGINEERS AND DEVICES WORKING TOGETHER Agenda Arm ServerReady

More information

Lecture 5. KVM for ARM. Christoffer Dall and Jason Nieh. 5 November, Operating Systems Practical. OSP Lecture 5, KVM for ARM 1/42

Lecture 5. KVM for ARM. Christoffer Dall and Jason Nieh. 5 November, Operating Systems Practical. OSP Lecture 5, KVM for ARM 1/42 Lecture 5 KVM for ARM Christoffer Dall and Jason Nieh Operating Systems Practical 5 November, 2014 OSP Lecture 5, KVM for ARM 1/42 Contents Virtualization KVM Virtualization on ARM KVM/ARM: System architecture

More information

Syscalls, exceptions, and interrupts, oh my!

Syscalls, exceptions, and interrupts, oh my! Syscalls, exceptions, and interrupts, oh my! Hakim Weatherspoon CS 3410 Computer Science Cornell University [Altinbuken, Weatherspoon, Bala, Bracy, McKee, and Sirer] Announcements P4-Buffer Overflow is

More information

Trustzone Security IP for IoT

Trustzone Security IP for IoT Trustzone Security IP for IoT Udi Maor CryptoCell-7xx product manager Systems & Software Group ARM Tech Forum Singapore July 12 th 2017 Why is getting security right for IoT so important? When our everyday

More information

CPSC/ECE 3220 Fall 2017 Exam Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts.

CPSC/ECE 3220 Fall 2017 Exam Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts. CPSC/ECE 3220 Fall 2017 Exam 1 Name: 1. Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts.) Referee / Illusionist / Glue. Circle only one of R, I, or G.

More information