How tzvisor/ltzvisor works
LTZVisor is a TrustZone-assisted hypervisor for running secure and non-secure guests side by side. The documented workflow initializes platform hardware, starts the secure guest, and prepares non-secure guest context; the README describes bare-metal and OS guest options, though the sampled API shows scheduling and restart are incomplete. Board support, interrupt handling, timers, and the secure blink demo are represented as product branches. Source excerpts are limited, so unsampled relationships are omitted rather than inferred.
Main entry points: ltzvisor_api.c Hypervisor API · blink.c Secure guest · ltzvisor.c Hypervisor core · gic.c Interrupt controller
Components 22
Hypervisor
- Hypervisor core
src/core/ltzvisor.c - Hypervisor API
src/core/ltzvisor_api.c - Non-secure config
src/ns_guest/ltzvisor_nsguest_config.c
CPU and interrupts
- CPU support
src/arch/armv7/cpu_helper.c - Guest context
src/arch/armv7/inc/cpu_vcpu.h - Monitor exceptions
src/arch/armv7/cpu_handlers.c
Platform support
- Interrupt controller
src/drivers/gic.c - Common GIC
src/drivers/common/gic.c - Board initialization
src/boards/zybo/board.c - Zynq hardware
src/boards/zybo/ltzvisor_hw.c - UART driver
src/drivers/zynq/xilinx_uart.c - ZYBO timer
src/boards/zybo/zynq_ttc.c - ZedBoard timer
src/boards/zedboard/zynq_ttc.c - ZC702 timer
src/boards/zc702/zynq_ttc.c - Zynq timer driver
src/drivers/zynq/zynq_ttc.c - Formatted output
src/lib/printk.c
Guest software
- Secure guest
src/s_guest/BareApp/blink.c - Secure guest hardware
src/s_guest/BareApp/portable/hw_zynq.c - Secure guest ISR
src/s_guest/BareApp/portable/s_isr.c - Non-secure guest
src/ns_guest
Other components
- System boot
- Guest operating systems
Connections 18
- System boot → Hypervisor core: starts
README.md - Hypervisor core → Hypervisor API: initializes
src/core/ltzvisor.c - Hypervisor API → Secure guest: enters
src/core/ltzvisor_api.c - Hypervisor API → Guest context: sets context
src/core/ltzvisor_api.c - Hypervisor API → Non-secure config: uses config
- Hypervisor API → Zynq hardware: initializes hardware
src/core/ltzvisor_api.c - Hypervisor core → Non-secure guest: hosts
README.md - Hypervisor core → Secure guest: hosts
README.md - Secure guest → Secure guest hardware: initializes
src/s_guest/BareApp/blink.c - Secure guest → Formatted output: prints
src/s_guest/BareApp/blink.c - Secure guest → Guest operating systems: alternatives include
README.md - Non-secure guest → Guest operating systems: supports
README.md - Hypervisor API → CPU support: restores CP15
src/core/ltzvisor_api.c - Interrupt controller → Zynq timer driver: dispatches timer IRQ
src/drivers/gic.c - Board initialization → Zynq hardware: configures platform
- Zynq hardware → Interrupt controller: initializes interrupts
- Secure guest hardware → ZYBO timer: uses timer
- ZYBO timer → Interrupt controller: raises interrupts