首页 > 其他分享 >OS-Application (OSAP)

OS-Application (OSAP)

时间:2024-11-12 15:48:01浏览次数:3  
标签:OSAP Application state objects OS trusted

OSAP is defined as a collection of OS objects(Task, ISR, Alarm, Schedule Table, Trusted Function, Counter, Application-specific hook). An OSAP is assigned to a specific core, and all of its OS objects run on that core. Multiple OSAPs can be defined and are identified by the OSAP ID.

OSAP type

There are two types of OSAP, trusted OSAP and non-trusted OSAP:

OSAP typeDescription
TrustedA trusted OSAP is an OSAP that has no restrictions on access to the memory area or hardware.
If the target supports privileged mode, operation under privileged mode is also allowed.
The trusted OSAP also provides trust functions to other OSAPs.
Non-trustedAn non-trusted OSAP is an OSAP that has restricted access to memory areas and hardware.
If the target supports user mode, non-trusted OSAP operates in user mode.

As far as supported by hardware, the OS module shall not allow non-trusted OSAP to access control registers managed by the OS. 

OSAP specification

OSAP is specified by OsApplication at the time of configuration. In addition, the restart task used by OSAP for processing when protection is violated is also specified by OsRestartTask at the time of configuration. The restart task is one of the tasks belonging to OSAP, and behaves the same as a normal task except that it is started by the OS when OSAP is restarted.

OSAP state 

 The following figure shows the states and the possible transitions:

 

OSAP StateDescription
APPLICATION_ACCESSIBLEA state in which OS objects belonging to OSAP can be used by other OSAPs.
Initialize all OSAP to APPLICATION_ACCESSIBLE when OS is initialized.
APPLICATION_RESTARTINGOSAP is restarting and OS objects belonging to OSAP cannot be used by other OSAPs.
When the OSAP is forcibly terminated by TerminateApplication() or ProtectionHook() and there is a restart request, this state is entered.
APPLICATION_TERMINATEDOSAP is forcibly terminated by TerminateApplication() or ProtectionHook(), and OS objects belonging to OSAP cannot be used by other OSAP.
If there is no restart request, it transitions to this state.
OSAP does not transition from this state to another state.
 Access permissions for each OSAP state

 If the OSAP state is other than the available state, access from OS objects belonging to other OSAP is prohibited. If an OS object belonging to another OSAP makes a service call to an OSAP whose OSAP state is not APPLICATION_ACCESSIBLE, E_OS_ACCESS is returned.

OSAP operations 

APIDescription
GetApplicationIDThis service determines the OS-Application (a unique identifier has to be allocated to each
application) where the caller originally belongs to (was configured to).
GetCurrentApplicationIDThis service determines the OS-Application where the caller of the service is currently
executing. Note that if the caller is not within a CallTrustedFunction() call the value is equal to the result of GetApplicationID().
CallTrustedFunctionA (trusted or non-trusted) OS-Application uses this service to call a trusted function.
CheckObjectAccessThis service determines if the OS-Applications, given by ApplID, is allowed to use the IDs of a
Task, Resource, Counter, Alarm or Schedule Table in API calls.
CheckObjectOwnershipThis service determines to which OS-Application a given Task, ISR, Counter, Alarm or
Schedule Table belongs.
TerminateApplicationThis service terminates the OS-Application to which the calling Task/Category 2 ISR/application
specific error hook belongs.
AllowAccessThis service sets the own state of an OS-Application from APPLICATION_RESTARTING to
APPLICATION_ACCESSIBLE.
GetApplicationStateThis service returns the current state of an OS-Application.
TerminateApplication

 If the Operating System module terminates an OS-Application, then it shall:

  • terminate all running, ready and waiting Tasks/ISRs of the OS-Application AND
  • disable all interrupts of the OS-Application AND
  • stop all active alarms of the OS-Applications AND
  • stop all ScheduleTables of the OS-Application.

 Protection of OS objects belonging to OSAP

OS objects belonging to the OSAP are protected by the OS to prevent unauthorized access from other OSAPs. 

 Access rights to OS objects

The processing unit belonging to OSAP can access all OS objects belonging to the same OSAP. However, access to OS objects that belong to other OSAPs and are not granted access rights is prohibited. In order to access OS objects that belong to other OSAPs, it is necessary to grant access rights at the time of configuration. Tasks are specified by OsTaskAccessingApplication, alarms are specified by OsAlarmAccessingApplication, and counters are specified by OsCounterAccessingApplication. Since the resource does not belong to OSAP, specify the OSAP that can access the resource by OsResourceAccessingApplication.

Trusted Function(TF) 

 A TF provids a service of a trusted OSAP to another OSAP. Use CallTrustedFunction() to call the provided TF. If the TF is called from a non-trusted OSAP the mode can switch from non-privileged to privileged mode.

 

标签:OSAP,Application,state,objects,OS,trusted
From: https://blog.csdn.net/erroror/article/details/143715979

相关文章

  • ansible执行playbook报Host Key checking
    报错信息:(fastapi-ansible)root@WEB:/data/fastapi-ansible/project#ansible-playbook-ihostsping.yamlPLAY[PingTestPlaybook]*********************************************************************************************************************TASK[Pi......
  • Docker使用docker-compose一键部署nacos、Mysql、redis
    下面是一个简单的例子,展示如何通过DockerCompose文件部署Nacos、MySQL和Redis。请确保您的机器上已经安装了Docker和DockerCompose。1,准备好mysql、redis、nacos镜像sudodockerpullmysql:8&&sudodockerpullredis:7.2&&sudodockerpullnacos/nacos-server:v2.4.......
  • 搭建 PostgreSQL 主从架构
    操作场景PostgreSQL是一个开源对象关系型数据库管理系统,并侧重于可扩展性和标准的符合性。PostgreSQL面向企业复杂SQL处理的OLTP在线事务处理场景,支持NoSQL数据类型(JSON/XML/hstore),支持GIS(GeographicInformationSystem或Geo-Informationsystem)地理信息处理,在可靠......
  • 网络为什么要分层:OSI模型与TCP/IP模型
    引言现代网络通信离不开分层模型的支撑,它们为数据传输提供了清晰的结构和接口。常见的网络分层模型有OSI模型和TCP/IP模型,这两者各自为网络协议栈的设计提供了指导。通过网络分层,复杂的网络通信过程被分解成多个独立的层次,每一层专注于完成特定的功能,从而使得网络协议的设计、......
  • CentOS虚拟机无法查看ipv4地址
    CentOS默认没有开启ens33vi/etc/sysconfig/network-scripts/ifcfg-ens33将最后一行的ONBOOT=no修改为ONBOOT=yes重启网卡服务systemctlrestartnetwork然后ipaddr查看ip目前这个是动态ip如果要静态ip继续编辑网卡配置文件ifcfg-ens33,将BOOTPROTO=dhcp修改为BOOT......
  • 使用 PostScript 实现简单的 OCR 处理
    PostScript并不直接支持图像处理,因此我们将展示如何通过一些基本图像绘制和简单字符检测来模拟文字识别的概念。读取图像并转换为灰度图由于PostScript并不原生支持读取图像,这里假设我们可以将图像以数据的形式加载,并通过PostScript的逻辑来绘制出图像的灰度形式。posts......
  • Bracketing Image Restoration and Enhancement with High-Low Frequency Decompositi
    paper通过密集连接的小卷积核实现细节特征(高频特征提取)提取importtorch.nnasnnclassDense(nn.Module):def__init__(self,in_channels):super(Dense,self).__init__()#self.norm=nn.LayerNorm([in_channels,128,128])#Assuminginputsi......
  • 基于HarmonyOS Next的医疗数据防泄漏与身份认证方案:Device Certificate Kit的深度应用
    本文旨在深入探讨华为鸿蒙HarmonyOSNext系统(截止目前API12)的技术细节,基于实际开发实践进行总结。主要作为技术分享与交流载体,难免错漏,欢迎各位同仁提出宝贵意见和问题,以便共同进步。本文为原创内容,任何形式的转载必须注明出处及原作者。在医疗信息化快速发展的今天,医疗......
  • HarmonyOS Next企业级设备认证解决方案:基于Device Certificate Kit的多层级身份验证
    本文旨在深入探讨华为鸿蒙HarmonyOSNext系统(截止目前API12)的技术细节,基于实际开发实践进行总结。主要作为技术分享与交流载体,难免错漏,欢迎各位同仁提出宝贵意见和问题,以便共同进步。本文为原创内容,任何形式的转载必须注明出处及原作者。在企业数字化转型的浪潮中,大量设......
  • HarmonyOS Next在智能家居领域的安全架构:设备身份认证与数据防泄漏方案
    本文旨在深入探讨华为鸿蒙HarmonyOSNext系统(截止目前API12)的技术细节,基于实际开发实践进行总结。主要作为技术分享与交流载体,难免错漏,欢迎各位同仁提出宝贵意见和问题,以便共同进步。本文为原创内容,任何形式的转载必须注明出处及原作者。在智能家居蓬勃发展的今天,各种智......