当前位置:网站首页>【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",
边栏推荐
- 一种用于EEG超扫描研究的分析流程
- SQL sliding window
- OA project meeting notice (query & whether attending & feedback for details)
- docker安装mysql5.7(仅供测试使用)
- 抖音API接口大全
- Do not add the is prefix to the variables of the boolean type in the POJO class of the Alibaba specification
- 软件测试主要做什么工作,难不难?
- Daily sql - judgment + aggregation
- 求过去半年内连续30天以上每天都有1000元以上成交的商铺
- 抖音API接口
猜你喜欢
随机推荐
Daily sql-statistics of the number of professionals (including the number of professionals is 0)
What are the things that should be planned from the beginning when developing a project with Unity?How to avoid a huge pit in the later stage?
How Unity handles C# under the hood
Discourse 的关闭主题(Close Topic )和重新开放主题
第一个C函数:如何实现板级初始化?
实现通用的、高性能排序和快排优化
抖音获取douyin分享口令url API 返回值说明
矩阵分析——Jordan标准形
Douyin API interface
强烈推荐一款好用的API接口
OA project meeting notice (query & whether attending & feedback for details)
梅科尔工作室——BP神经网络
concept noun
《猪猪1984》NFT 作品集将上线 The Sandbox 市场平台
redis + lua实现分布式接口限流实现方案
快速了解集成学习
Strongly recommend an easy-to-use API interface
Douyin share password url API tool
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
获取拼多多商品信息操作详情