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
This commit is contained in:
Mingqiang Chi 2019-05-09 11:25:27 +08:00 committed by ACRN System Integration
parent d9717967d7
commit 397986913e
3 changed files with 7 additions and 17 deletions

View File

@ -185,7 +185,6 @@ C_SRCS += arch/x86/vmx.c
C_SRCS += arch/x86/cpu_state_tbl.c
C_SRCS += arch/x86/pm.c
S_SRCS += arch/x86/wakeup.S
C_SRCS += arch/x86/static_checks.c
C_SRCS += arch/x86/trampoline.c
S_SRCS += arch/x86/sched.S
C_SRCS += arch/x86/guest/vcpuid.c
@ -224,8 +223,6 @@ C_SRCS += common/trusty_hypercall.c
C_SRCS += common/schedule.c
C_SRCS += common/vm_load.c
C_SRCS += common/ptdev.c
C_SRCS += common/static_checks.c
ifdef STACK_PROTECTOR
C_SRCS += common/stack_protector.c
endif
@ -263,6 +260,8 @@ ifneq ($(CONFIG_RELEASE),y)
CFLAGS += -DHV_DEBUG -DPROFILING_ON -fno-omit-frame-pointer
endif
S_OBJS := $(patsubst %.S,$(HV_OBJDIR)/%.o,$(S_SRCS))
PRE_BUILD_SRCS += pre_build/static_checks.c
PRE_BUILD_OBJS := $(patsubst %.c,$(HV_OBJDIR)/%.o,$(PRE_BUILD_SRCS))
DISTCLEAN_OBJS := $(shell find $(BASEDIR) -name '*.o')
VERSION := $(HV_OBJDIR)/include/version.h
@ -302,7 +301,7 @@ else
endif
.PHONY: all
all: lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin
all: pre_build lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin
ifeq ($(FIRMWARE),sbl)
install: lib $(HV_OBJDIR)/$(HV_FILE).32.out
@ -322,6 +321,9 @@ else
endif
endif
.PHONY: pre_build
pre_build: $(PRE_BUILD_OBJS)
.PHONY: header
header: $(VERSION) $(HV_OBJDIR)/$(HV_CONFIG_H) $(TARGET_ACPI_INFO_HEADER)

View File

@ -1,13 +0,0 @@
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <acrn_common.h>
#define CAT__(A,B) A ## B
#define CAT_(A,B) CAT__(A,B)
#define CTASSERT(expr) \
typedef int32_t CAT_(CTA_DummyType,__LINE__)[(expr) ? 1 : -1]
CTASSERT(sizeof(struct vhm_request) == (4096U/VHM_REQUEST_MAX));

View File

@ -68,3 +68,4 @@ CTASSERT(CPU_CONTEXT_OFFSET_LDTR - CPU_CONTEXT_OFFSET_EXTCTX_START
CTASSERT((sizeof(struct trusty_startup_param)
+ sizeof(struct trusty_key_info)) < 0x1000U);
CTASSERT(NR_WORLD == 2);
CTASSERT(sizeof(struct vhm_request) == (4096U/VHM_REQUEST_MAX));