forked from Imagelibrary/rtems
bsps/riscv: bsp_interrupt_is_valid_vector()
Implement this function.
This commit is contained in:
@@ -58,6 +58,8 @@
|
||||
|
||||
#define BSP_INTERRUPT_VECTOR_COUNT RISCV_INTERRUPT_VECTOR_EXTERNAL(RISCV_MAXIMUM_EXTERNAL_INTERRUPTS)
|
||||
|
||||
#define BSP_INTERRUPT_CUSTOM_VALID_VECTOR
|
||||
|
||||
rtems_status_code bsp_interrupt_set_affinity(
|
||||
rtems_vector_number vector,
|
||||
const Processor_mask *affinity
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
@@ -7,7 +9,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2018 embedded brains GmbH
|
||||
* Copyright (C) 2018, 2022 embedded brains GmbH
|
||||
*
|
||||
* Copyright (c) 2015 University of York.
|
||||
* Hesham Almatary <hesham@alumni.york.ac.uk>
|
||||
@@ -274,6 +276,19 @@ void bsp_interrupt_facility_initialize(void)
|
||||
riscv_plic_init(fdt);
|
||||
}
|
||||
|
||||
bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
|
||||
{
|
||||
/*
|
||||
* The PLIC interrupt ID of zero is reserved. For example, this ID is used
|
||||
* to indicate that no interrupt was claimed.
|
||||
*/
|
||||
if (vector == RISCV_INTERRUPT_VECTOR_EXTERNAL(0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return vector < (rtems_vector_number) BSP_INTERRUPT_VECTOR_COUNT;
|
||||
}
|
||||
|
||||
rtems_status_code bsp_interrupt_get_attributes(
|
||||
rtems_vector_number vector,
|
||||
rtems_interrupt_attributes *attributes
|
||||
|
||||
Reference in New Issue
Block a user