API进行查询和设置BIOS性能 [英] APIs for querying and setting bios properties

查看:221
本文介绍了API进行查询和设置BIOS性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

比方说,我想改变我的电脑在Linux BIOS设置(比方说11的Ubuntu如果它很重要。)有哪些类型的API,让你查询和操作BIOS设置?

此外,有什么好的资源做这种类型的开发?


解决方案

  

该CMOS内存中存在正常的地址空间之外,不能
  包括直接执行code。它是可到达的通过IN和OUT
  在端口号70H(112D)和71H(113D)命令。要读取的字节CMOS,
  一个OUT端口70H与字节的地址执行被读取并
  然后从端口71H的IN将检索请求的信息。


您可以使用 INB OUTB 宏阅读和使用这些端口写入获得整个BIOS设置储存在CMOS。对于存储的设置存储格式看看:<一href=\"http://bochs.sourceforge.net/techspec/CMOS-reference.txt\">http://bochs.sourceforge.net/techspec/CMOS-reference.txt

这些映射实际上是依赖于供应商,但其中大部分应该是共同的。

虽然这不是一个API,但这个你可以对CMOS存储器直接访问,使自己的API。对于一个快速程序我会建议得到一个API。看看@尼莫在这种情况下的答案。

Let's say I would like to change a setting in the BIOS of my computer in Linux (let's say Ubuntu 11 if it matters.) What types of APIs exist to allow you query and manipulate BIOS setting?

Further, what are good resources for doing this type of development?

解决方案

The CMOS memory exists outside of the normal address space and cannot contain directly executable code. It is reachable through IN and OUT commands at port number 70h (112d) and 71h (113d). To read a CMOS byte, an OUT to port 70h is executed with the address of the byte to be read and an IN from port 71h will then retrieve the requested information.

You can use the inb and outb macros to read and write from these ports to get the entire BIOS settings stored in the CMOS. For the settings memory format stored have a look at: http://bochs.sourceforge.net/techspec/CMOS-reference.txt

These mappings are actually vendor dependent, but most of them should be common.

Although this is not an API, but with this you can make direct access to the CMOS memory and make your own API. For a quick program i would recommend getting an API. Check out @Nemo's answer in this case.

这篇关于API进行查询和设置BIOS性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆