当前位置:网站首页>【sdx62】XBL设置共享内存变量,然后内核层获取变量实现
【sdx62】XBL设置共享内存变量,然后内核层获取变量实现
2022-08-11 06:12:00 【wellnw】
功能描述
由于开发需要,有时候需要在SBL阶段设置一些参数变量,然后给到系统启动之后读取操作
功能分析
查看代码发现,高通默认有测试程序可以写共享内存,代码如下smem_test.c
./boot_images/boot/QcomPkg/QcomTestCommon/SmemTestApp/smem_test.c
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/TestInterface.h>
#include "Protocol/EFISmem.h"
EFI_STATUS
EFIAPI
UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_SMEM_PROTOCOL * smem_protocol;
EFI_STATUS status;
UINT32 * vendor0;
UINT32 * vendor1;
UINT32 * vendor1_b;
UINT32 * vendor1_c;
UINT32 size;
TEST_START("SMEM");
status = gBS->LocateProtocol(&gEfiSMEMProtocolGuid, NULL,
(void**)&smem_protocol);
if(status != EFI_SUCCESS)
{
AsciiPrint("ERROR: LocateProtocol returned %d\n",
边栏推荐
- Taobao product details API interface
- 求过去半年内连续30天以上每天都有1000元以上成交的商铺
- Find the shops that have sold more than 1,000 yuan per day for more than 30 consecutive days in the past six months
- 1688 product interface
- JD.com product details API call example explanation
- Daily sql - judgment + aggregation
- 淘宝API常用接口与获取方式
- 抖音API接口大全
- 【深度学习】什么是互信息最大化?
- 一种用于EEG超扫描研究的分析流程
猜你喜欢
每日sql -查询至少有5名下属的经理和选举
Amazon Get AMAZON Product Details API Return Value Description
Resolved EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
Trill keyword search goods - API
第一个C函数:如何实现板级初始化?
矩阵分析——Jordan标准形
《Show and Tell: A Neural Image Caption Generator》论文解读
Multiscale communication in cortical-cortical networks
SQL滑动窗口
导航定位中的坐标系
随机推荐
使用Keras构建GAN,以Mnist为例
daily sql - query for managers and elections with at least 5 subordinates
抖音API接口
亚马逊API接口大全
概念名词解释
When MySQL uses GROUP BY to group the query, the SELECT query field contains non-grouping fields
SQL sliding window
一张图了解JVM八大原子操作
强烈推荐一款好用的API接口
Redis源码-String:Redis String命令、Redis String存储原理、Redis字符串三种编码类型、Redis String SDS源码解析、Redis String应用场景
Strongly recommend an easy-to-use API interface
Do not add the is prefix to the variables of the boolean type in the POJO class of the Alibaba specification
HCIP WPN experiment
基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
Pinduoduo API interface
radix-4 FFT principle and C language code implementation
Waldom Electronics宣布成立顾问委员会
Douyin API interface
每日sql--统计员工近三个月的总薪水(不包括最新一个月)
Depth (relay supervision)