mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
fix "ISO C99 does not support '_Static_assert'"
_Static_assert is supported in C11 standard. Please see N1570(C11 mannual) 6.4.1. replace _Static_assert with ASSERT. Signed-off-by: huihuang shi <huihuang.shi@intel.com>
This commit is contained in:
@@ -7,19 +7,8 @@
|
||||
#include <hypervisor.h>
|
||||
#include <hkdf.h>
|
||||
|
||||
_Static_assert(NR_WORLD == 2, "Only 2 Worlds supported!");
|
||||
|
||||
#define TRUSTY_VERSION 1
|
||||
|
||||
struct trusty_startup_param {
|
||||
uint32_t size_of_this_struct;
|
||||
uint32_t mem_size;
|
||||
uint64_t tsc_per_ms;
|
||||
uint64_t trusty_mem_base;
|
||||
uint32_t reserved;
|
||||
uint8_t padding[4];
|
||||
};
|
||||
|
||||
struct trusty_mem {
|
||||
/* The first page of trusty memory is reserved for key_info and
|
||||
* trusty_startup_param.
|
||||
@@ -44,10 +33,6 @@ static struct key_info g_key_info = {
|
||||
.num_seeds = 1
|
||||
};
|
||||
|
||||
_Static_assert(sizeof(struct trusty_startup_param)
|
||||
+ sizeof(struct key_info) < 0x1000,
|
||||
"trusty_startup_param + key_info > 1Page size(4KB)!");
|
||||
|
||||
#define save_segment(seg, SEG_NAME) \
|
||||
{ \
|
||||
seg.selector = exec_vmread(VMX_GUEST_##SEG_NAME##_SEL); \
|
||||
|
||||
Reference in New Issue
Block a user