inline the up_interrupt_context() to avoid unnecessary stack pushes Signed-off-by: chao.an <anchao@xiaomi.com>
113 lines
3.4 KiB
Plaintext
113 lines
3.4 KiB
Plaintext
############################################################################
|
|
# arch/risc-v/src/qemu-rv32/Make.defs
|
|
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright ownership. The
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance with the
|
|
# License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
############################################################################
|
|
|
|
# Specify our HEAD assembly file. This will be linked as
|
|
# the first object file, so it will appear at address 0
|
|
HEAD_ASRC = qemu_rv_head.S
|
|
|
|
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
|
STARTUP_OBJS = crt0$(OBJEXT)
|
|
endif
|
|
|
|
# Specify our general Assembly files
|
|
CMN_ASRCS += riscv_vectors.S riscv_exception_common.S
|
|
|
|
# Specify C code within the common directory to be included
|
|
CMN_CSRCS += riscv_initialize.c riscv_swint.c riscv_mtimer.c
|
|
CMN_CSRCS += riscv_allocateheap.c riscv_createstack.c riscv_exit.c
|
|
CMN_CSRCS += riscv_assert.c riscv_blocktask.c riscv_copystate.c riscv_initialstate.c
|
|
CMN_CSRCS += riscv_modifyreg32.c riscv_puts.c
|
|
CMN_CSRCS += riscv_releasepending.c riscv_reprioritizertr.c
|
|
CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
|
|
CMN_CSRCS += riscv_sigdeliver.c riscv_unblocktask.c riscv_usestack.c
|
|
CMN_CSRCS += riscv_idle.c riscv_tcbinfo.c riscv_cpuidlestack.c
|
|
CMN_CSRCS += riscv_exception.c riscv_getnewintctx.c riscv_doirq.c
|
|
CMN_CSRCS += riscv_saveusercontext.c
|
|
|
|
ifeq ($(CONFIG_SMP), y)
|
|
CMN_CSRCS += riscv_cpuindex.c riscv_cpupause.c riscv_cpustart.c
|
|
CMN_ASRCS += riscv_mhartid.S
|
|
endif
|
|
|
|
ifeq ($(CONFIG_SCHED_BACKTRACE),y)
|
|
CMN_CSRCS += riscv_backtrace.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_STACK_COLORATION),y)
|
|
CMN_CSRCS += riscv_checkstack.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_ARCH_HAVE_VFORK),y)
|
|
CMN_ASRCS += vfork.S
|
|
CMN_CSRCS += riscv_vfork.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_SCHED_THREAD_LOCAL),y)
|
|
CMN_CSRCS += riscv_tls.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_ARCH_FPU),y)
|
|
CMN_ASRCS += riscv_fpu.S
|
|
CMN_CSRCS += riscv_fpucmp.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_ARCH_RV_ISA_A),y)
|
|
CMN_ASRCS += riscv_testset.S
|
|
endif
|
|
|
|
ifeq ($(CONFIG_RISCV_SEMIHOSTING_HOSTFS),y)
|
|
CMN_ASRCS += riscv_semihost.S
|
|
CMN_CSRCS += riscv_hostfs.c
|
|
endif
|
|
|
|
# Specify our C code within this directory to be included
|
|
CHIP_CSRCS = qemu_rv_start.c qemu_rv_irq_dispatch.c qemu_rv_irq.c
|
|
CHIP_CSRCS += qemu_rv_timerisr.c qemu_rv_allocateheap.c
|
|
|
|
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
|
CHIP_CSRCS += qemu_rv_mm_init.c
|
|
endif
|
|
|
|
ifneq ($(CONFIG_BUILD_FLAT),y)
|
|
CMN_CSRCS += riscv_task_start.c
|
|
CMN_CSRCS += riscv_pthread_start.c
|
|
CMN_CSRCS += riscv_signal_dispatch.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_ARCH_USE_MPU),y)
|
|
CMN_CSRCS += riscv_pmp.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_ARCH_USE_MMU),y)
|
|
CMN_CSRCS += riscv_mmu.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_ARCH_KERNEL_STACK),y)
|
|
CMN_CSRCS += riscv_addrenv_kstack.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_ARCH_ADDRENV),y)
|
|
CMN_CSRCS += riscv_addrenv.c riscv_pgalloc.c riscv_addrenv_perms.c
|
|
endif
|
|
|
|
ifeq ($(CONFIG_MM_PGALLOC),y)
|
|
CHIP_CSRCS += qemu_rv_pgalloc.c
|
|
endif
|