Below discussion posted in osol-code mailing list tells how to use ddi interface to convert virtual address to physical address in Solaris driver.
====
If you are writing a device driver, or porting one, then you're going about this entirely the wrong way. These APIs should only be used by low level platform code, not from within device drivers. In fact, hat_getkpfnum generates warnings if you use it!
Assuming that this is an ordinary device driver, and not something really unusual (really unusual would mean something like a new MMU layer or somesuch), then you need to use the Solaris DDI DMA interfaces.
ddi_dma_alloc_handle() to get a handle.
ddi_dma_mem_alloc() to allocate memory (unless you already have memory).
ddi_dma_addr_bind_handle() to bind DMA addresses, and get the "cookie" for the corresponding physical address.
ddi_dma_buf_bind_handle() if you're working buf(9S) structures instead of arbitrary memory
This may sound like more work, but the end result is portable and safe, and will even work on amd64 and SPARC systems.
=====
分享到:
相关推荐
For commercial sale, copy and distribute, you should get the warranty and permission of DSWLAB before(for example, if the anti-virus company want to use it to analyses the Trojan horse in batches, he...
ipvsadm -A|E -t|u|f virutal-service-address:port [-s scheduler] [-p [timeout]] [-M netmask] ipvsadm -D -t|u|f virtual-service-address ipvsadm -C ipvsadm -R ipvsadm -S [-n] ipvsadm -a|e -t|u|f ...
C_Netdevice_Tunnel 通过 Virutal Net Device 和 Netfilter Hook 实现 UDP 隧道此隧道中只能通过以下数据包: ARP 请求... 准备2台电脑:电脑A和电脑B 计算机 A:真实 IP 地址 192.168.1.1 计算机 B : 真实 IP 地址 192
对ipvsadm 的命令参考,并根据自己使用的经验,进行了一个简单的翻译,希望对ipvsadm 的使用者有一定的帮助。 为了更好的让大家理解这份命令手册,将手册里面用到的几个术语...ipvsadm -A|E -t|u|f virutal-service-add
虚拟助手可能使用Python的库如`SpeechRecognition`进行语音识别,将用户的语音输入转化为文字,然后使用`gTTS`(Google Text-to-Speech)库将机器的回应转化为语音输出。这样,用户可以通过自然对话与虚拟助手互动...
VirtualBox虚拟机是一款非常实用的电脑虚拟运行环境架构工具。VirtualBox虚拟机的主要作用是为用户在PC端构建一个非常方便的测试软件和硬件的平台!它能够根据用户的参数设置来调用电脑配置资源,最大限度地模拟软件...
Java Platform Standard Edition Java Virutal Machine Guide.pdf Java Platform Standard Edition JRockit to HogSpot Migration Guide.pdf Java Platform Standard Edition HotSpot Virtual Machine Garbage ...
《使用Virtual PC安装虚拟Linux详解》 在信息技术领域,虚拟化技术已经成为系统管理的重要手段,它允许我们在同一台计算机上运行多个操作系统,而不会互相干扰。Microsoft Virtual PC(VPC)就是这样一款强大的虚拟...
如果在结果中找到了"Virutal",那么可以推断系统正在运行在一个虚拟机上,因为这是虚拟化软件通常会暴露的线索。 另一方面,如果"Virutal"关键字未被发现,那么根据这个简单的判断逻辑,系统很可能是在物理机上运行...
senchaVScode-1.0.1.vsix Virutal Studio Code 的Extjs插件, 破解方法:https://www.jianshu.com/p/767c4343bc41
1. 使用易语言的“调用命令行程序”命令,执行一个搜索命令,比如 `dir /s /b Virutal*`,这将查找所有包含"Virutal"的文件。 2. 分析返回的命令输出,检查是否有包含关键字的文件名。 3. 如果找到匹配的文件名,...
VisualVM 提供在 Java 虚拟机 (Java Virutal Machine, JVM) 上运行的 Java 应用程序的详细信息。在 VisualVM 的图形用户界面中,您可以方便、快捷地查看多个 Java 应用程序的相关信息。
VisualVM 提供在 Java 虚拟机 (Java Virutal Machine, JVM) 上运行的 Java 应用程序的详细信息。在 VisualVM 的图形用户界面中,您可以方便、快捷地查看多个 Java 应用程序的相关信息。
VisualVM 提供在 Java 虚拟机 (Java Virutal Machine, JVM) 上运行的 Java 应用程序的详细信息。在 VisualVM 的图形用户界面中,您可以方便、快捷地查看多个 Java 应用程序的相关信息。
在本案例中,我们关注的是"Virutal"这个特殊关键字。在很多虚拟机环境中,比如VMware、VirtualBox等,会在系统信息中包含这个关键字,因为它与虚拟化技术有关。 易语言作为中文编程语言,其语法简单明了,非常适合...
Delphi下优秀的免費VCL控件,代码质量高,使用灵活、功能强大、性能非常好,可以用于表达Treeview和表格类数据。它的代码现在托管在google code上。...http://mosir.org/html/y2012/the-usage-of-virutal-treeview.html
Azure管理 该工具目前仅处于开发阶段,可以通过Azure Cloud Shell或Windows Terminal提供简单的Azure租户管理。 关注更新和更改 ...#Virutal Machine Configuration #$vmsize #$VMType #$vmname
### Xen架构概述 Xen架构是一种开放源代码的虚拟化技术,主要应用于服务器虚拟化领域。本文将基于Xen架构概述文档(版本1.2,发布于2008年2月13日)对Xen架构进行详细介绍,并解释其工作机制。...
Ubuntu炊具 这是受ubuntu-old-hashioned和ubuntu-bartender启发的自动Ubuntu UWP构建系统。 这允许自动构建Ubuntu UWP,并输出本地构建( .appxbundle )和仅上传包( .appxupload )。... 启用了WSL和Virutal