当前位置:网站首页>【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", 边栏推荐
- Daily sql--statistics the total salary of employees in the past three months (excluding the latest month)
- MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段
- Pinduoduo API interface
- 已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
- 技能在赛题解析:交换机防环路设置
- Resolved EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
- 淘宝sku API 接口(PHP示例)
- 进制转换间的那点事
- Discourse 的关闭主题(Close Topic )和重新开放主题
- 矩阵分析——矩阵分解
猜你喜欢

Spatial Pyramid Pooling -Spatial Pyramid Pooling (including source code)

《Show and Tell: A Neural Image Caption Generator》论文解读

1688 product interface

抖音获取douyin分享口令url API 返回值说明

抖音API接口

实现通用的、高性能排序和快排优化

Attitude solution - gyroscope + Euler method

unable to extend table xxx by 1024 in tablespace xxxx

每日sql--统计员工近三个月的总薪水(不包括最新一个月)

公牛10-11德里克·罗斯最强赛季记录
随机推荐
Redis + lua implements distributed interface current limiting implementation scheme
Daily SQL - find each of the students school gpa minimum (window)
ROS 服务通信理论模型
《猪猪1984》NFT 作品集将上线 The Sandbox 市场平台
【深度学习】什么是互信息最大化?
每日sql-统计各个专业人数(包括专业人数为0的)
SQL滑动窗口
皮质-皮质网络的多尺度交流
Redis源码:Redis源码怎么查看、Redis源码查看顺序、Redis外部数据结构到Redis内部数据结构查看源码顺序
Unity程序员如何提升自己的能力
Strongly recommend an easy-to-use API interface
技能在赛题解析:交换机防环路设置
buu—Re(5)
如何选择专业、安全、高性能的远程控制软件
联想集团:2022/23财年第一季度业绩
网络电话软件或迎整顿 “免费”通话须迈安全关
PIXHAWK飞控使用RTK
Cobbleland 博览会 基础系列 1
sql--Users who have purchased more than 3 times (inclusive) within 7 days (including the current day), and the purchase amount in the past 7 days exceeds 1,000
Taobao API common interface and acquisition method