nios2: basic build, non-functional
Basic build framework for Nios2. Everything is stubbed out, we just want to have a build going so that we can start to parallelize implementation tasks. This patch is not intended to be functional, but should be able to produce a binary for all the nanokernel-based sanity checks. Change-Id: I12dd8ca4a2273f7662bee46175822c9bbd99202a Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
6a578ad14f
commit
9433895954
43 changed files with 1275 additions and 0 deletions
79
include/arch/nios2/arch.h
Normal file
79
include/arch/nios2/arch.h
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright (c) 2016 Intel Corporation
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Nios II specific nanokernel interface header
|
||||
* This header contains the Nios II specific nanokernel interface. It is
|
||||
* included by the generic nanokernel interface header (nanokernel.h)
|
||||
*/
|
||||
|
||||
#ifndef _ARCH_IFACE_H
|
||||
#define _ARCH_IFACE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define STACK_ALIGN 4
|
||||
|
||||
#define _NANO_ERR_HW_EXCEPTION (0) /* MPU/Bus/Usage fault */
|
||||
#define _NANO_ERR_INVALID_TASK_EXIT (1) /* Invalid task exit */
|
||||
#define _NANO_ERR_STACK_CHK_FAIL (2) /* Stack corruption detected */
|
||||
#define _NANO_ERR_ALLOCATION_FAIL (3) /* Kernel Allocation Failure */
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
#include <stdint.h>
|
||||
#include <irq.h>
|
||||
#include <arch/nios2/asm_inline.h>
|
||||
|
||||
/* STUB. Eventually port ARC/ARM interrupt stuff */
|
||||
#define _ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)
|
||||
|
||||
static ALWAYS_INLINE unsigned int _arch_irq_lock(void)
|
||||
{
|
||||
/* STUB */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE void _arch_irq_unlock(unsigned int key)
|
||||
{
|
||||
/* STUB */
|
||||
ARG_UNUSED(key);
|
||||
}
|
||||
|
||||
int _arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
|
||||
void (*routine)(void *parameter), void *parameter,
|
||||
uint32_t flags);
|
||||
void _arch_irq_enable(unsigned int irq);
|
||||
void _arch_irq_disable(unsigned int irq);
|
||||
|
||||
struct __esf {
|
||||
/* XXX - not defined yet */
|
||||
uint32_t placeholder;
|
||||
};
|
||||
|
||||
typedef struct __esf NANO_ESF;
|
||||
extern const NANO_ESF _default_esf;
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue