ae64f28344
This is a minimalistic SBI implementation for NuttX. Provides a single service for now: - Access to machine timer Provides a start trampoline to start NuttX in S-mode: - Exceptions / faults are delegated to S-mode. - External interrupts are delegated to S-mode. Machine mode timer is used as follows: - The timer compare match register reload happens in M-mode, via call gate "riscv_sbi_set_timer" - The compare match event is dispatched to S-mode ISR, which will notify the kernel to advance time - Clearing the STIP interrupt does not work from S-mode, so the call gate does this from M-mode The only supported (tested) target for now is MPFS.
38 lines
1.5 KiB
C
38 lines
1.5 KiB
C
/****************************************************************************
|
|
* arch/risc-v/src/nuttsbi/sbi_mexception.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>
|
|
|
|
/****************************************************************************
|
|
* Public Functions
|
|
****************************************************************************/
|
|
|
|
void sbi_mexception(uintptr_t mcause, uintptr_t *mepc)
|
|
{
|
|
(void) mcause;
|
|
(void) mepc;
|
|
}
|