没有在UEFI SPEC中找到一个非常清晰的Device Path的定义。
关于Device Path,UEFI SPEC中有如下的描述:
A Device Path is constructed and used by the firmware to convey the location of important devices, such as the boot device and console, consistent with the software-visible topology of the system.
A Device Path is used to define the programmatic path to a device.
A Device Path is designed to make maximum leverage of the ACPI name space.
The Device Path also is used to fill in the gaps where ACPI defers to buses with standard enumeration algorithms.
The Device Path is also used to define the location on a medium where a file should be, or where it was loaded from.
A special case of the Device Path can also be used to support the optional booting of legacy operating systems from legacy media.
总的来说,Device Path主要描述的是设备或总线或legacy启动项。
直观的来说,Device Path可以看成是一个字符串,下面是进入UEFI Shell时的打印:
其中的红框部分就是一个个Device Path的字符串表示。
通过UEFI提供的接口ConvertDevicePathToText(),可以将Device Path结构体转换成CHAR16字符串并打印。
Device Path Protocol是Device Path在UEFI下的另一种,也是最常用的表示。(字符串形式的只是打印出来给人看的)
每一个代表实际物理设备或者逻辑设备的Handle都会安装Device Path Protocol。
Device Path Protocol在UEFI下的通用结构体如下:
/**
This protocol can be used on any device handle to obtain generic path/location
information concerning the physical device or logical device. If the handle does
not logically map to a physical device, the handle may not necessarily support
the device path protocol. The device path describes the location of the device
the handle is for. The size of the Device Path can be determined from the structures
that make up the Device Path.
**/
typedef struct {
UINT8 Type; ///< 0x01 Hardware Device Path.
///< 0x02 ACPI Device Path.
///< 0x03 Messaging Device Path.
///< 0x04 Media Device Path.
///< 0x05 BIOS Boot Specification Device Path.
///< 0x7F End of Hardware Device Path.
UINT8 SubType; ///< Varies by Type
///< 0xFF End Entire Device Path, or
///< 0x01 End This Instance of a Device Path and start a new
///< Device Path.
UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define
///< type of data. Size of data is included in Length.
} EFI_DEVICE_PATH_PROTOCOL;
它是一个可变结构体,因为有不同种类的Device Path,它们的大小各不相同。
目前的UEFI版本(2.6版本)定义了6种Device Path,分别是:
对于不同的Device Path,它们的通用结构的取值也不一样,下面是具体的值:
需要说明下:
1. 一个Device Path可能说由多个Device Path组成的,则各个组成部分被称为Device Path Node;
2. 每个Device Path都由End of Hardware Device Path结尾;
3. End of Hardware Device Path由两种类型,一种是End of This Instance of a Device Path(Sub-Type是0x01),另一种是End Entire Device Path(Sub-Type是0xFF),前者用在Device Path Node的最后,后者用在整个Device Path的最后:
在UEFI中有指定的函数来判断这两种End of Hardware Device Path:
BOOLEAN
EFIAPI
IsDevicePathEnd (
IN CONST VOID *Node
)
{
ASSERT (Node != NULL);
return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_ENTIRE_DEVICE_PATH_SUBTYPE);
}
BOOLEAN
EFIAPI
IsDevicePathEndInstance (
IN CONST VOID *Node
)
{
ASSERT (Node != NULL);
return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_INSTANCE_DEVICE_PATH_SUBTYPE);
}
Hardware Device Path描述了与一个设备关联的系统资源,比如共享内存,MMIO,IO等。
Hardware Device Path有多种子类型,比如PCI Device Path:
其它的类型还有:
这里不多做介绍,可以去看UEFI SPEC。
ACPI Device Path包含了ACPI设备ID和其它的一些内容,有_HID、_CID、_UID等ID和_ADR等其它信息。
根据包含的ACPI信息的多少,也有不同的子类型,如:
关于Messaging Device Path,UEFI SPEC的定义如下:
This Device Path is used to describe the connection of devices outside the resource domain of the
system. This Device Path can describe physical messaging information like SCSI ID, or abstract
information like networking protocol IP addresses.
并不是很理解,不过看起来像是一些总线和协议对应的Device Path,它有如下的子类型:
各种意义不明......
Media Device Path表示了能够作为启动项的设备的Device Path。
下面是所有的子类型:
BIOS Boot Specification Device Path与前一种Media Device Path类型,不同的是它表示的是Legacy BIOS启动项设备。
其中的Device Type也有不同的类型:
• 00h = Reserved
• 01h = Floppy
• 02h = Hard Disk
• 03h = CD-ROM
• 04h = PCMCIA
• 05h = USB
• 06h = Embedded network
• 07h..7Fh = Reserved
• 80h = BEV device
• 81h..FEh = Reserved
• FFh = Unknown
回到最开始的UEFI Shell的图中,里面的Device Path:
PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)
它由三个Device Path Node组成,分别是:
1. PciRoot(0x0):一个ACPI Device Path;
2. Pci(0x1,0x1):一个Hardware Device Path,子类型是PCI Device Path;
3. Ata(0x0):一个Messaging Device Path,子类型是ATAPI Device Path;
UEFI SPEC提供了一个工具接口来操作Device Path:
///
/// This protocol is used to creates and manipulates device paths and device nodes.
///
typedef struct {
EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize;
EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath;
EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath;
EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode;
EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance;
EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance;
EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance;
EFI_DEVICE_PATH_UTILS_CREATE_NODE CreateDeviceNode;
} EFI_DEVICE_PATH_UTILITIES_PROTOCOL;
具体各个接口的作用不多做介绍。
另外在EDKII代码中还提供了UefiDevicePathLib,里面也有不少有用的接口。
在【UEFI基础】Protocol介绍中有介绍Device Path的使用示例。
概述???????? 利用Vue2.0模仿微信app,努力做到以假乱真的效果。个人独立开发,本项目可以为初学者带来很好的入门经验,有兴趣的同学可以clone 下来自己完成。。项目目前进度==30%==,后期不断更新,直至整个项目完成。努力和mac微信能够达到 90%的相似度,让它更接近微信App的用户交互体验。仿 mac 版 微信复制代码图片预览项目步骤npm installnpm run...
清华计算机课表本科生课程 在本科期间,除数、理、化、外语等公共基础课外,主要课程包括一批适应性强、覆盖面宽、有利于就业的专业的及代表前沿科技发展的选修课程,覆盖人文社会科学类、自然科学基础类、工程技术基础类、以及专业基础与专业类课程。教育特点是强电与弱电相结合、软件与硬件相结合、组件与系统相结合、信息与能量相结合。 主要课程一览: (1)人文社会科学课:涵盖政治、经济、管理、英语; (...
网络的启动是通过执行脚本: /etc/init.d/networking start 脚本中调用了命令 ifup -a;ls -l /sbin/ifup lrwxrwxrwx 1 admin sysadmin 14 Jan 1 1970 /sbin/ifup -> ../bin/busybox可见,该命令被集成到busbox中去了,如果要看详细的过程那只能看源码了
最近准备对nginx进行更新的时候,发现编译源码丢失了,不知道nginx编译时加载了哪些模块,所以通过nginx的-V参数找到了编译参数。顺便一提的是nginx -V输出是标准错误输出,如需重定向文件,则需要nginx -V 2>>lognginx的命令行参数:Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p pr
版权声明:转载标注一下哦~ https://blog.csdn.net/weixin_43918621/article/details/84729208想要在举办ctf比赛,ctfd是一个很好的开源可用平台。而且是python写的,显得比较高大上咯,这篇文章我就分享一下我的搭建经历,希望可以帮到大家。更新在最后1.优化的方法2.nginx服务器环境:cento...
十四泛型在类定义的时候,其属性的类型没有指定,而是实例化对象的时候由外部来指定的情况(动态的指定数据类型)1.定义泛型格式[访问权限] class 类名称 <泛型类型1,泛型类型2…>[访问权限] 泛型类型标识 变量名称[访问权限] 泛型类型声明 方法名称(){}2.实例化指定泛型Class<Object,Object> object=new Class<Object,Object>();无法指定为基本数据类型,需设置成一个类,Object为数据类型对应的
当场景有大量贴图的时候,我们往往需要花费大量时间在PS上,要将贴图处理成法线贴图,置换贴图...等等,不但蛋疼费时间而且调的往往也不是很好而CrazyBump则彻底解决了这个问题,我也是偶尔在Youtube看老外的教学时发现的,当时就吓尿了,居然还有这等神器!!这就是主角,貌不惊人。我从网上down了一张鹅软石的图然后打开CrazyBump看提示点击左下角的图标
通过spring的学习,结合之前的mybatis,用spring对mybatis进行整合!我将通过建立的mybatis项目去向spring整合过渡一、新建普通maven项目,然后导入依赖<dependencies> <dependency> <groupId>org.projectlombok</groupId...
Anlink前言一、Anlink是什么?二、使用步骤1.下载软件2.安装软件3.如何连接手机4.控制手机的基本操作总结前言从苹果 Mac + iPhone 的接力/通用剪贴板,到华为的多屏协同,越来越多人意识到手机和电脑之间的交互如跨屏控制 / 同步剪贴板等功能确实能提高使用方便程度以及效率的。一、Anlink是什么?示例:Anlink 是基于Scrcpy开发的一款工具,它是一款免费的电脑控制手机软件,它除了能将 Android 手机的画面投屏到电脑屏幕上显示以外,还能通过键盘鼠标来操作手机!
是因为当前用户设置 Virtual Hosts有问题,问题具体描述可以看看http://blog.csdn.net/only09080229/article/details/43304543如何解决这个问题?只要正确设置当前用户的 Virtual Hosts并和用户绑定就行了。例如你想添加一个/Admin 的virtual hosts 并和用户绑定。设置办法见图:步骤一:添加vir
内容 细分建模 1.抱枕 2.沙发 3.大嘴猴 2必做 沙发在透视图中创建一个长方体——》设置分段为4*4*4先后添加一个“编辑网格”修改器、网格平滑修改器——》修改迭代次数为3按住shift键向上拖动复制一个座位沙发垫——》选中下面的长方体选到编...
本文继续记录bt相关的概念内容。启动和运行bt的启动和运行至少涉及3个Line对象:Data feedStrategy(实际上是Strategy的子类)Cerebro(西班牙语中的大脑)Data FeedData feed提供了用于回测的数据,bt支持下列几种data feed:读取CSV格式文件在线获取Yahoo数据获取Pandas Dataframe或者blaze数据Interacive Brokers、Visual Chart和Oanda的实时数据在data feed中