Skip to content

Commit 3979869

Browse files
mingqiangchiacrnsi
authored andcommitted
hv:merge static_checks.c
now there are 2 static_checks.c, ./arch/x86/static_checks.c ./common/static_checks.c they are used for static checks when build time, this check should not belong to any HV layer from modularization view, then add and move it to pre_build folder. Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com> modified: Makefile deleted: common/static_checks.c renamed: arch/x86/static_checks.c -> pre_build/static_checks.c
1 parent d971796 commit 3979869

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

hypervisor/Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ C_SRCS += arch/x86/vmx.c
185185
C_SRCS += arch/x86/cpu_state_tbl.c
186186
C_SRCS += arch/x86/pm.c
187187
S_SRCS += arch/x86/wakeup.S
188-
C_SRCS += arch/x86/static_checks.c
189188
C_SRCS += arch/x86/trampoline.c
190189
S_SRCS += arch/x86/sched.S
191190
C_SRCS += arch/x86/guest/vcpuid.c
@@ -224,8 +223,6 @@ C_SRCS += common/trusty_hypercall.c
224223
C_SRCS += common/schedule.c
225224
C_SRCS += common/vm_load.c
226225
C_SRCS += common/ptdev.c
227-
C_SRCS += common/static_checks.c
228-
229226
ifdef STACK_PROTECTOR
230227
C_SRCS += common/stack_protector.c
231228
endif
@@ -263,6 +260,8 @@ ifneq ($(CONFIG_RELEASE),y)
263260
CFLAGS += -DHV_DEBUG -DPROFILING_ON -fno-omit-frame-pointer
264261
endif
265262
S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(S_SRCS))
263+
PRE_BUILD_SRCS += pre_build/static_checks.c
264+
PRE_BUILD_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(PRE_BUILD_SRCS))
266265

267266
DISTCLEAN_OBJS := $(shell find $(BASEDIR) -name '*.o')
268267
VERSION := $(HV_OBJDIR)/include/version.h
@@ -302,7 +301,7 @@ else
302301
endif
303302

304303
.PHONY: all
305-
all: lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin
304+
all: pre_build lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin
306305

307306
ifeq ($(FIRMWARE),sbl)
308307
install: lib $(HV_OBJDIR)/$(HV_FILE).32.out
@@ -322,6 +321,9 @@ else
322321
endif
323322
endif
324323

324+
.PHONY: pre_build
325+
pre_build: $(PRE_BUILD_OBJS)
326+
325327
.PHONY: header
326328
header: $(VERSION) $(HV_OBJDIR)/$(HV_CONFIG_H) $(TARGET_ACPI_INFO_HEADER)
327329

hypervisor/common/static_checks.c

Lines changed: 0 additions & 13 deletions
This file was deleted.

hypervisor/arch/x86/static_checks.c renamed to hypervisor/pre_build/static_checks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ CTASSERT(CPU_CONTEXT_OFFSET_LDTR - CPU_CONTEXT_OFFSET_EXTCTX_START
6868
CTASSERT((sizeof(struct trusty_startup_param)
6969
+ sizeof(struct trusty_key_info)) < 0x1000U);
7070
CTASSERT(NR_WORLD == 2);
71+
CTASSERT(sizeof(struct vhm_request) == (4096U/VHM_REQUEST_MAX));

0 commit comments

Comments
 (0)