diff --git a/hypervisor/pre_build/static_checks.c b/hypervisor/pre_build/static_checks.c index 373bb9c4f..950df9957 100644 --- a/hypervisor/pre_build/static_checks.c +++ b/hypervisor/pre_build/static_checks.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #define CAT__(A,B) A ## B @@ -20,6 +21,14 @@ typedef int32_t CAT_(CTA_DummyType,__LINE__)[(expr) ? 1 : -1] #error "VM number or VCPU number are too big" #endif +#if ((CONFIG_HV_RAM_START & (MEM_2M - 1UL)) != 0UL) +#error "CONFIG_HV_RAM_START must be aligned to 2MB" +#endif + +#if ((CONFIG_HV_RAM_SIZE & (MEM_2M - 1UL)) != 0UL) +#error "CONFIG_HV_RAM_SIZE must be integral multiple of 2MB" +#endif + /* Build time sanity checks to make sure hard-coded offset * is matching the actual offset! */