当前位置:网站首页>【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",
边栏推荐
- A used in the study of EEG ultra scanning analysis process
- 淘宝商品详情API接口
- Douyin API interface
- redis + lua实现分布式接口限流实现方案
- daily sql - user retention rate for two days
- 每日sql-员工奖金过滤和回答率排序第一
- OA project meeting notice (query & whether attending & feedback for details)
- 公牛10-11德里克·罗斯最强赛季记录
- When MySQL uses GROUP BY to group the query, the SELECT query field contains non-grouping fields
- Daily sql: request for friend application pass rate
猜你喜欢
随机推荐
Amazon Get AMAZON Product Details API Return Value Description
Get Pinduoduo product information operation details
Douyin API interface
抖音API接口大全
《Show, Attend and Tell: Neural Image Caption Generation with Visual Attention》论文阅读(详细)
C语言每日一练——Day02:求最小公倍数(3种方法)
抖音获取douyin分享口令url API 返回值说明
《Generative Adversarial Networks》
MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段
亚马逊API接口大全
Cobbleland 博览会 基础系列 1
一个小时快速熟悉MySQL基本用法
抖音API接口
常见激活函数及其导数
Discourse's Close Topic and Reopen Topic
NFT 的价值从何而来
STM32CUBEIDE(11)----输出PWM及修改PWM频率与占空比
HCIA knowledge review
Daily sql-employee bonus filtering and answer rate ranking first
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?