调用Uefi第一个驱动--hello world
来源:互联网 发布:导师睡研究生知乎 编辑:程序博客网 时间:2024/06/01 15:45
前面写了一个hello world驱动,现在简单调用一下
-----------------testlib.c文件----------------------------
#include <uefi.h>
#include <library/uefilib.h>
#include <library/basememorylib.h>
#include <library/uefiapplicationentrypoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
//#include <protocol/firstdriver.h>
#include <firstdriver/firstdriver.h>
EFI_STATUS EFIAPI UefiMain(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
{
EFI_STATUS Status = EFI_SUCCESS;
EFI_FIRSTDRIVER_PROTOCOL *gf;
Status = gBS->LocateProtocol(
&gEfifirstdriverProtocolGuid,
NULL,
&gf
);
if(EFI_SUCCESS == Status)
{
Print(L"success to locate protocol\n");
}
else
{
Print(L"failed to locate protocvol\n");
}
gf->Func1(gf);
Print(L"ia in protocol is %d\n",gf->ia);
return Status;
}
testlib.dsc的 [libraryclass] 块中加上
firstdriver|firstdriver/firstdriver/firstdriver.inf
-------------------testlib.inf-------------------------
[Packages]
MdePkg/MdePkg.dec
firstdriver/firstdriver.dec
[LibraryClasses]
UefiApplicationEntryPoint
UefiLib
[Protocols]
gEfifirstdriverProtocolGuid
- 调用Uefi第一个驱动--hello world
- 第一个设备驱动--Hello,world
- 驱动开发(第一个程序Hello World)
- 第一个hello world 驱动实验总结
- 第一个模块,hello world 驱动编写
- Linux第一个驱动:Hello World
- 第一个hello world驱动模块
- 第一个Uefi驱动--helloworld
- Linux驱动开发学习 第一个驱动程序 hello world
- ubuntu下我的第一个Hello World驱动
- 内核驱动的第一个程序——hello world
- linux设备驱动第一个模块hello,world
- OK6410学习之第一个驱动hello world
- 我的第一个Linux驱动hello world问题记录
- 第一个驱动程序---Hello world
- 第一个“Hello World”程序
- 第一个atlas "Hello world"
- 第一个dojo hello world
- Thinking in React (组件拆分原理)
- 工作五年,你应该知道的事和一定会遇到的极品
- 对于UITableViewCell
- ThinkPHP3.2 分页
- iOS工程如何支持64-bit
- 调用Uefi第一个驱动--hello world
- android-circlebutton介绍
- eclipse阅读spring源码
- MySql与Java的时间类型
- [整理]Android Studio 常见问题及解决方案
- 堆栈
- linux下获取内存使用率及cpu使用率
- 其实都是那么平凡
- JSP 页面缓存以及清除缓存