2

In Windows, how can I see the capacity of the ROM chip installed on my computer to store UEFI/BIOS? I would prefer a way using a Windows tool or command without installing any other application.

4
  • 2
    Why do you want to know?
    – user
    Sep 2, 2014 at 14:21
  • 2
    To clarify my previous comment: Usually when people ask something like this, there is an underlying task that they are trying to perform, and they are so focused on what they believe to be the path to the solution that they fail to recognize that there is a much more generic way of looking at it all. Also known as the XY problem. If you tell us what you are really trying to accomplish by finding out the size of the motherboard firmware ROM, it's quite possible that we will be able to provide a better answer to what you are trying to do.
    – user
    Sep 2, 2014 at 14:37
  • 1
    I would like to thank you for your interest you showed to my question. I am not trying to solve any problem on my computer, I am just asking it by curiosity. We can find the size of our HDD, ram, usb flash drive, etc. But I have never try to find the ROM size of my computer, and while I was trying to find some other details of my computer hardware, I stucked on this. I have been looking for days and I have not found anything at all.
    – TheLinuxGK
    Sep 2, 2014 at 15:12
  • It's a VALID question, why downvote?! Aug 26, 2017 at 17:30

3 Answers 3

5

Reading SMBIOS information

From Wikipedia:

In computing, the System Management BIOS (SMBIOS) specification defines data structures (and access methods) that can be used to read information stored in the BIOS of a computer. Circa 1999, it became part of the domain of the Distributed Management Task Force (DMTF). [...] At approximately the same time Microsoft started to require that OEMs and BIOS vendors support the interface/data-set in order to have Microsoft certification.

Source: System Management BIOS

The SMBIOS information is stored in different data tables; the first one (type 0) contains basic details such as vendor, version, and release date. The size of the physical device containing the BIOS corresponds to a single byte which is located at offest 0x9 of the said table.

The actual size can be calculated by like this:

64K * (value + 1)

A value of 0 means the size is 64 KiB, 1 means 128 KiB, and so on.

As far as I know, Windows doesn't provide a built-in utility which can retrieve specific SMBIOS data such as the ROM size. You can still write a script yourself, though; see below for some working examples. As an alternative you can use a third-party program, e.g. a dmidecode Windows port.


Batch script

@echo off
setlocal enabledelayedexpansion

set key=HKLM\SYSTEM\CurrentControlSet\services\mssmbios\Data

for /f "tokens=3" %%G in (
'reg query "%key%" /v "SMBiosData" ^| findstr /i /c:"REG_"'
) do (
set "size=%%~G"
set /a size=64 * 0x!size:~34,2! + 64
)

echo ROM Size: %size% KiB
PAUSE
exit /b

VBScript

Set tables = GetObject("winmgmts:\\.\root\wmi").ExecQuery _
    ("SELECT * FROM MSSmBios_RawSMBiosTables")

For Each obj In tables
    WScript.Echo "ROM Size: " & (64 * obj.SMBiosData(9) + 64) & " KiB"
Next

PowerShell

$tables = Get-WmiObject -ComputerName . -Namespace root\wmi -Query "
    SELECT * FROM MSSmBios_RawSMBiosTables"

foreach ($obj in $tables)
{
    echo $("ROM Size: " + (64 * $obj.SMBiosData[9] + 64) + " KiB")
}

Remarks

Windows Management Instrumentation (WMI) is the preferred method for reading SMBIOS information in Windows.

Source: Device\PhysicalMemory Object

The [SMBIOS] driver also stores this information in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Mssmbios\Data. Although SMBIOS information is stored in the registry at this location, consumers should continue to use WMI or the GetSystemFirmwareTable() API to retrieve SMBIOS data. There is no guarantee that this information will be stored at this registry subkey for every subsequent release of Windows.

Source: SMBIOS Support in Windows

Further reading

1
2

I don't think you can, at least not in any general fashion.

Basically, that's because the size of the BIOS code doesn't provide any useful information to you, the user. The BIOS in an IBM PC-compatible computer has a few main responsibilities, most of which apply to other platforms as well but may be implemented differently:

  • It performs the Power-On Self Test (POST)
  • It does basic hardware detection and initialization
  • It sets up the basic execution environment, the specifics of which go back to the original IBM 5150 PC from 1981 (the CPU is in real mode, several CPU registers are initialized to known values, and several CPU flags are set to known values)
  • It provides an operating system with (very primitive) hardware access and detection facilities; these are not used by modern operating systems, either due to technical restrictions of the CPU (no easy way to switch out of long mode, for example) or because of performance constraints (switching back and forth to real or V86 mode to execute the 16-bit BIOS code takes a long time, so it's faster to remain in protected or long mode and just do it yourself in the OS instead)
  • It loads the first stage boot loader of the operating system to a known, fixed location in RAM, and transfers execution to it
  • It provides a user interface for setting up basic system settings; strictly speaking this is optional, and BIOSes of the 1980s often did not provide such an interface, instead relying on software shipped separately or on hardware DIP switches for configuring even such basic system settings as type of graphics card and amount of RAM installed

Not in any of this is there any benefit to the user of knowing how much code is used to implement these tasks. Back in the early days (we're talking DOS before around Windows 3.0 to 3.1 here, so early 1980s to early 1990s), the BIOS was often relied upon to perform basic functions and thus BIOS code size could potentially correspond at least in part to performance, but in modern computers, the BIOS has been relegated to basically the role of an operating system bootstrapper and low-level hardware configuration interface. Also, in the computers of that era, if the BIOS code was replacable at all, that was by physically removing and reinstalling ROM chips on the motherboard; flash upgradable BIOSes are a much later invention.

You compare this with finding the size of storage devices or RAM. The difference is that being able to tell the size of those actually tells you, the user, something worth knowing: the amount of storage space available, on a per-device basis or in aggregate, is a determining factor for how much data you will be able to store on the computer, and the size of the RAM is one of the determining factors for how much data you can work with at the same time and how fast working with that data will be.

You can, in principle, go to a particular motherboard manufacturer's web site and look around for downloadable BIOS update images. The size of those image files will, with a very high degree of certainty, correspond to the size of the flash ROM chip holding the BIOS code on that particular motherboard. I think a common size today is on the order of a few megabytes; the original IBM 5150 PC BIOS was 8 KB and starting with the XT (IBM 5160) this was raised to 32 KB in IBMs. I read somewhere an anecdote that the early cleanroom IBM PC BIOS clones at least once had the people involved wondering if they were missing something as they were able to do it in significantly less code.

And of course, that completely ignores the possibility of there being other firmware in the system besides the PC BIOS. Graphics cards, network cards, disk controller cards, and all sorts of other peripherals provide their own BIOSes which from an implementation point of view are completely separate from the PC BIOS on the motherboard, just like a web browser is (or should be) completely separate from the operating system.

2
  • I downloaded a file for BIOS upgrade for my Acer Notebook. It is a compressed file and it is 2,19 MB (2.304.094 byte). If I unzip it, it is 2,90 MB (3.046.834 byte). So I guess my ROM is about 3 MB.
    – TheLinuxGK
    Sep 3, 2014 at 8:43
  • There’s probably no 3 MiB Flash ROM. AFAIK they only come in multiples of 2. (Also, the size is typically indicated in Bit.)
    – Daniel B
    Sep 3, 2014 at 9:42
-2

In linux you can find flash rom' s capacity with lots of ways. dmidecode command provides a lot of useful information about the BIOS including its chip capacity. I finally found that it is 1 MB. I suggest everyone to either take a look at their motherboard or try a live CD with linux.

3
  • You have asked for a Windows-specific solution and @and31415 provided it in his answer. I don't understand why you have accepted your own answer even though it doesn't answer the original question, but another one does?
    – gronostaj
    Feb 21, 2015 at 13:17
  • Sorry, but I think for a less experienced user this would be an easier solution. I unaccepted my answer and accepted the other (I didn't notice that I had not checked the other).
    – TheLinuxGK
    Feb 22, 2015 at 7:26
  • It looks like you were looking for a Windows solution and later discovered that a Linux solution might actually be better. Since you already got several answers to your original question, it wouldn't be appropriate to expand that, and your answer doesn't meet the criteria of your question. So even though it's a good answer, it isn't appropriate here. Suggestion: post a new question asking for a Linux solution, and self-answer with this one (and delete it from here).
    – fixer1234
    Oct 9, 2015 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .