AArch64 EL2 hypervisor for QEMU virt that boots at EL2
1

Configure Feed

Select the types of activity you want to include in your feed.

ariel / core / image.c
541 B 21 lines
1#include "hv/arch.h" 2#include "hv/image.h" 3 4struct hv_image_span hv_image_span(void) 5{ 6 struct hv_image_span span; 7 span.start = (uint64_t)(uintptr_t)__image_start; 8 span.end = (uint64_t)(uintptr_t)__image_end; 9 span.size = span.end - span.start; 10 return span; 11} 12 13bool hv_image_contains(uint64_t addr, uint64_t len) 14{ 15 struct hv_image_span span = hv_image_span(); 16 uint64_t end; 17 if (len == 0u || hv_add_overflow_u64(addr, len, &end)) { 18 return false; 19 } 20 return addr >= span.start && end <= span.end; 21}