Add aarch64 cpukit paravirtualization support

This commit is contained in:
Alex White
2024-09-27 20:01:34 +00:00
committed by Amar Takhar
parent 653dbdcdbf
commit 38bafce42d
3 changed files with 76 additions and 0 deletions
+2
View File
@@ -146,6 +146,7 @@ void _CPU_Context_Initialize(
}
}
#if !defined(RTEMS_PARAVIRT)
void _CPU_ISR_Set_level( uint32_t level )
{
/* Set the mask bit if interrupts are disabled */
@@ -173,6 +174,7 @@ uint32_t _CPU_ISR_Get_level( void )
return ( level & AARCH64_PSTATE_I ) != 0;
}
#endif /* RTEMS_PARAVIRT */
void _CPU_Initialize( void )
{
@@ -0,0 +1,73 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSScoreCPUAArch64Paravirt
*
* @brief This header file provides definitions pertaining to
* paravirtualization of the AArch64 port.
*/
/*
* COPYRIGHT (c) 2023-2024.
* On-Line Applications Research Corporation (OAR).
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RTEMS_PARAVIRT
#error "This file should only be included with paravirtualization is enabled."
#endif
#ifndef _RTEMS_SCORE_PARAVIRT_H
#define _RTEMS_SCORE_PARAVIRT_H
/**
* @defgroup RTEMSScoreCPUAArch64Paravirt AArch64 Paravirtualization Support
*
* @ingroup RTEMSScoreCPUAArch64
*
* @brief This handler encapulates the functionality (primarily conditional
* feature defines) related to paravirtualization on the AArch64.
*
* Paravirtualization on the AArch64 makes the following assumptions:
*
* - RTEMS executes in user space (EL0)
* - Interrupt enable/disable support using the MSR must be disabled
* and replaced with BSP provided methods which are adapted to the
* hosting environment.
*
* @{
*/
/**
* In a paravirtualized environment, RTEMS executes in user space
* and cannot disable/enable external exceptions (e.g. interrupts).
* The BSP which acts as an adapter to the hosting environment will
* provide the interrupt enable/disable methods.
*/
#define AARCH64_DISABLE_INLINE_ISR_DISABLE_ENABLE
/** @} */
#endif
+1
View File
@@ -26,6 +26,7 @@ install:
- cpukit/score/cpu/aarch64/include/rtems/score/cpuimpl.h
- cpukit/score/cpu/aarch64/include/rtems/score/aarch64.h
- cpukit/score/cpu/aarch64/include/rtems/score/cpu_irq.h
- cpukit/score/cpu/aarch64/include/rtems/score/paravirt.h
links: []
source:
- cpukit/score/cpu/aarch64/aarch64-context-validate.S