Work overtime with time. Ah, it's helpless .... I declare that some conceptual content is partly based on the online content.
1.What is smbios?
A: smbios (System Management BIOS) is a unified specification for the motherboard or system manufacturer to display product management information in a standard format. That is, no matter how you implement it, the results must follow the specifications.
2. What is DMI?
A: DMI (Desktop Management Interface) refers to the desktop management interface, which contains configuration information about system hardware. DMI data should be verified every time the computer starts up. If there is a problem with the data or the hardware changes, the machine will be checked and the tested data will be written to the BIOS chip for storage. So in BIOS setup, refresh the BIOS chip or use a jumper on the motherboard to disable the refresh function of the BIOS chip. The DMI data on this machine will not be updated. If you change the hardware, when you enter windows, the machine continues to work according to the configuration of the data information, and the hardware you have changed may fail or fail to provide good performance.
The main component of DMI is the Management Information Format (MIF) database. This database contains all information about computer systems and accessories. DMI allows you to obtain the serial number, computer vendor, serial port information, and other system accessories.
3. How do smbios-compliant computers access system information in the smbios structure?
1. access through the plug-and-play function interface. This is no longer recommended after smbios2.1. Can the latest smbios support checking smbios spec.
2. Based on the table structure, the table content is the data of the tanle entry point. This method is recommended in Versions later than 2.1.
Here I will first introduce the second method. To access smbios Based on the table structure, first find the entry point structure (EPS) table, and then find the smbios structure table through the data in this table.
For non-EFI systems, access the smbios EPS table is as follows (EFI hopes to have time to explore later ):
1. Find the "_ Sm _" keyword between the physical memory 0x000f0000-0x000fffff.
2. Find the last 16 bytes, and check whether the last five bytes are the keyword "_ DMI _". If yes, the EPS table will find them.
The structure of the smbios EPS table is as follows:
Location Name Length description
00 h keyword 4 byte is fixed as "_ Sm _"
04 H checksum and 1 byte are used to verify data
05 h table structure length 1 byte entry point structure table length
06 h major version 1 byte is used to determine the smbios version
07 h minor version 1 byte is used to determine the smbios version
08 h table structure size 2 byte used for getting the data table structure length through the plug-and-play Interface Method
0ah EPS correction 1 byte
0b-0fh format area 5 byte storage explanation EPS correction information
The 10 h keyword 5 byte is fixed as "_ DMI _"
15 h checksum: 1 byte intermediate entry point structure (IEPs) checksum
16 h structure table length 2 byte smbios structure table length
18 h structure table address 4 byte smbios structure table real memory location
1ch structure table count 2 byte smbios structure table count
1eh smbios BCD correction 1 byte
This is the EPS table we found.
The length and address of the data table can be obtained through 16 h and 18 h in the structure of the EPS table, and the smbios Data Structure table can be accessed through the address. The total number of data table structures can be learned from 1 Ch in the EPS table. The type 0 structure is BIOS information, and the type 1 structure is system information. Each type structure has a structure header (the structure area) as follows:
Location Name Length description
00 H type 1 byte structure type number
01 H length 1 byte length of the current structure, in terms of the structure of the type number
02 h handle 2 byte is used to obtain the smbios structure, its value is not fixed
Each structure is divided into the format area and the string area. The format area is the information of some local structures, and the string area is the area following the format area.The structure length identified at 01 H is only the length of the format area, and the length of the string area is not fixed.Some structures have string regions, while others do not.
The following uses type0 (BIOS information) as an example to describe the format area and string area. The format area of Type 0 is as follows:
Location Name Length description
00 H type 1 byte structure type number, here is 0
01 H length 1 byte type 0 format area length, generally 14 h, also has 13 H
02 h handle 2 byte local structure handle, generally 0000 h
04 h bios vendor information 1 byte here is the BIOS seller information, may be the OEM manufacturer name, generally 01 H, representing the first string in the string area following the format Area
05 h BIOS version 1 byte BIOS version, usually 02 h, representing the second string in the string Area
06 h BIOS start CIDR Block 2 byte is used to calculate the size of the resident BIOS image by (10000h-bios start CIDR Block) × 16
08 h BIOS release date 1 byte is generally 03 h, indicating the third character string in the character Area
09 h BIOS Rom size 1 byte calculation method is (n + 1) × 64 k, n reads the value for this
0ah BIOS features 8 byte BIOS features supported, such as PCI, PCMCIA, Flash, etc.
12 h BIOS feature extensions 0 or more bytes reserve space for supporting feature features in the future
14 h BIOS major release byte recognizes system BIOS major release. For example, if major of revision 10.22 is 0ah, revision 2.1 is 02 h.
15 h BIOS minor release byte recognition minor release, 16 h-> revision 10.22, 01 H-> revision 2.1.
16 h EC firmware major byte recognizes embedded controller firmware. For more information, see 14 h
17 h EC firmware minor byte recognizes embedded controller firmware. For details, refer to 14 h
Followed by the Type 0 (BIOS information) structure area, that is, the Type 0 (BIOS information) string area after the BIOS feature extension area, an example is as follows:
DB 'System BIOS vendor name', 0; string ending with zero, first string: BIOS vendor
DB '4. 04 ', 0; Second: BIOS version
DB '2014/1/0', 0; Third: BIOS release date
Db 0; 0 indicates the end of the region in the entire character
We have noticed that each string ends with h and the entire string area ends with H. For example, let's look at the following:
| -------------------------------- Format region start ---------------------------------------- |
| Byte label bios_info |
| Db 0; indicates BIOS structure type |
| DB 13 h; length of information in bytes |
| DW? ; Reserved for handle |
| DB 01 H; string 1 is the vendor name |
| DB 02 h; string 2 is the BIOS version |
| DW 0e800h; BIOS starting address |
| DB 03 h; string 3 is the BIOS build date |
| DB 1; size of BIOS Rom is 128 K (64 K * (1 + 1) |
| DQ bios_char; BIOS characteristics |
| Db 0; BIOS characteristics extension byte 1 |
| -------------------------- Start of the string region (end of the format region) --------------------------- |
| DB 'System BIOS vendor name', 0; |
| DB '4. 04 ', 0; |
| DB '2014/1/123', 0; |
| Db 0; end of strings |
| -------------------------- String region ends ------------------------------------------------ |
The BIOS feature field indicates that the BiOS supports some features, bit 1 and bit 1 are retained, bit 2 is unknown, and bit 3 indicates whether the BIOS feature field is supported.
Bit 4-bit 19 indicates whether Isa, MCA, Eisa, PCI, PCMCIA, PNP, APM, BIOS refresh, and bios images are supported (copies BIOS read-only content to faster memory ). medium), VL-VESA, escd, boot from Cd, selectable boot, BIOS Rom plug-in, boot from PCMCIA, EDD specifications.
Bit 20-bit 25 indicates support for various types of floppy disks (all are INT 13 H interrupted ), including the NEC 9800 1.2 MB Floppy disk, toshba 1.2 MB Floppy disk, 5.25 "/360kb floppy disk, 5.25"/1.2 MB Floppy disk, 3.5 "/3.5 kb floppy disk, and 2.88"/MB Floppy disk.
Bit 26-bit 29 indicates whether int 5 H (printscreen screenshot Service), int 9 h (8042 keyboard service), and INT 14 h (serial port service) are supported), int 17 h (printer service), int 10 h (CGA/MONO Video Service), NEC PC-98.
Bit 32: 47 is reserved for use by BIOS manufacturers.
Bit 48: 63 is reserved for use by computer system vendors.
BiOS feature extension byte 1 (at 12 h offset) indicates support for other devices, bit 0-bit 1 indicates whether ACPI, USB legacy, AGP, i2o boot, LS-120 superdisk boot, atapi zip driver boot, 1394 boot, smart battery are supported.
BiOS feature extension byte 2 (13 H offset) indicates support for some advanced features. Bit 1-bit3 indicates whether function keys are supported to initialize network service boot, activate target content delivery, and UEFI specifications. Bit 4 indicates that the smbios table describes a virtual machine, and bit is retained.
The above is to understand the structure of smbios, so the method to access smbios is:
1. How can I find the EPS? See the search "_ Sm _". The last 16 bytes have 5 bytes: "_ DMI _". then, find the data table length and address (the memory address of type0) from 16 h and 18 h in the EPS structure. (The number of types can be obtained at 1 Ch ).
2. Check whether the BIOS information exists in the structure area with type0 (whether the structure header is all 00 H ).
3. This read information exists.
4. directly read the string area-> locate the type number by structure (each type ends with 0000 h), and then read the length in the structure, that is, the length of the structure area, then, the length of the structure area is directly moved to the string area.
Read the full text
Category:View BIOS comments