mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 09:38:37 +08:00
boards/ostest: remove board ostest implement
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -63,5 +63,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=20
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_OSTEST_FPUSIZE=264
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
||||
@@ -57,5 +57,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=20
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_OSTEST_FPUSIZE=264
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
||||
@@ -61,5 +61,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=20
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_OSTEST_FPUSIZE=264
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
||||
@@ -65,5 +65,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=20
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_OSTEST_FPUSIZE=264
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
||||
@@ -56,5 +56,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=20
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_OSTEST_FPUSIZE=264
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
||||
@@ -63,5 +63,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=20
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_OSTEST_FPUSIZE=264
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
||||
@@ -30,8 +30,4 @@ ifeq ($(CONFIG_ARCH_LEDS),y)
|
||||
CSRCS += c906_leds.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||
CSRCS += c906_ostest.c
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/boards/Board.mk
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/c906/smartl-c906/src/c906_ostest.c
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <syscall.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include "riscv_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
#undef HAVE_FPU
|
||||
#if defined(CONFIG_ARCH_FPU) && \
|
||||
!defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
|
||||
defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
|
||||
defined(CONFIG_SCHED_WAITPID)
|
||||
# define HAVE_FPU 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FPU
|
||||
|
||||
#if CONFIG_TESTING_OSTEST_FPUSIZE != (8 * FPU_XCPT_REGS)
|
||||
# error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static uintptr_t g_saveregs[XCPTCONTEXT_REGS];
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
|
||||
* return the current FPU registers.
|
||||
*/
|
||||
|
||||
void arch_getfpu(FAR uint32_t *fpusave)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
/* Take a snapshot of the thread context right now */
|
||||
|
||||
flags = enter_critical_section();
|
||||
up_saveusercontext(g_saveregs);
|
||||
|
||||
/* Return only the floating register values */
|
||||
|
||||
memcpy(fpusave, &g_saveregs[INT_XCPT_REGS], INT_REG_SIZE * FPU_XCPT_REGS);
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
||||
/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
|
||||
* will compare them and return true if they are identical.
|
||||
*/
|
||||
|
||||
bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
|
||||
{
|
||||
return memcmp(fpusave1, fpusave2, INT_REG_SIZE * FPU_XCPT_REGS) == 0;
|
||||
}
|
||||
|
||||
#endif /* HAVE_FPU */
|
||||
Reference in New Issue
Block a user