注册 | 登录




package;import;import android.content.Context;import android.os.Bundle;import android.view.View;import android.v

up vote 2 down vote favorite 2

I am trying to develop a C function for getting some motherboard info (name, id, etc.) but I can't find where these info are stored. I had a look at CPUID but I could't find anything related to the motherboard there (although lots of info regarding the CPU).

Does anyone know from where can I get these info?

Thanks a lot.

c x86 osdev motherboard hardware-id share | improve this question edited Jul 12 '11 at 17:10 bdonlan 146k 20 201 282 asked Jul 12 '11 at 14:21 limp 369 2 7 21 1   unless you are trying to create a boot-able app and get direct access to hardware we need to know the OS that will be running your app –  Djole Jul 12 '11 at 14:49      this is just a bootable binary –  limp Jul 12 '11 at 16:55      @limp, so you're booting straight out of a bootloader, not from windows or etc? –  bdonlan Jul 12 '11 at 17:10 add a comment  | 

2 Answers 2

active oldest votes up vote 4 down vote

CPUID returns information about the CPU itself (hence the name); it does not return information about the motherboard. Your OS will likely have some way of querying ACPI data, which may (if the motherboard's manufacturer bothered to record such information) have what you're looking for; the exact method to do so depends on your OS, however.

If you're coding to the bare metal, your first stop is the ACPI tables. Of particular interest may be the OEMID and OEM Table ID in the DSDT; you might find model information elsewhere as well. Be warned, however, that BIOSes tend to be full of interesting bugs, and there's no guarantee that the manufacturer has filled in anything that's not absolutely necessary to get Windows to boot.

相关推荐:android bundle 在activity之间传递数据 点击一组图片放大,再次点击恢复

android 点击图片放大 ,再次点击恢复原样在这里我使用再启动一个activity实现的,并且归并了一组图片不在需要做n个activity 那样麻烦首先是一组图片放

Non-ACPI systems are generally obsolete, at least for PC hardware. If you're on a non-ACPI system, good luck. There is no standardized location for motherboard identification information on a non-ACPI system. You can try to probe the hardware and guess based on a table of known hardware profiles, but that's the best you can do.

share | improve this answer edited Jul 12 '11 at 17:22 answered Jul 12 '11 at 14:55 bdonlan 146k 20 201 282      +1: Agreed. It's motherboard firmware that's going to have this information, and it must be queried using the appropriate interfaces. –  Aaron Klotz Jul 12 '11 at 15:31      That's a bit vague. How CPU-Z get's this info for instance? If this is ACPI, which table has that (but then, what happens to non-ACPI systems)? –  limp Jul 12 '11 at 16:57      @limp, like I said, we need your OS before giving any specific advice. The exact methods for retrieving hardware information depend on the OS. –  bdonlan Jul 12 '11 at 17:10 add a comment  |  up vote 0 down vote

I would start with the dmidecode source and the standards it references (SMBIOS/DMI).

share | improve this answer answered Jul 12 '11 at 17:15 Nemo 48k 7 78 125 add a comment  | 

Your Answer

  draft saved draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Post as a guest

Name Email

Post as a guest

Name Email discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged c x86 osdev motherboard hardware-id or ask your own question.

相关推荐:Android中实现Gallery 点击放大

Android中实现Gallery 点击放大图片放大的思路:  第一、可以通过Matrix对象来变换图像,在选择的时候放大,在失去焦点的时候,缩小到原来的大小。 

最近在做头像点击放大的功能,跟微信一样的,点击头像的图片显示铺满屏幕的大图.如果直接把图拿到新的activity里显示的话,会非常模糊想知道正常应该是放两张图还是 将钱一张图片做处理 是做怎样










您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱