Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get the list of all BIOS interrupts present on the current system programmatically?

I'm looking for a list of BIOS interrupts supplied by my PC.

To get the most common BIOS calls, there are various public resources, but I was hoping for a list of all (possibly not very public) BIOS calls for my PC.

Is there a program to do this, or any way I could write one (preferably in assembly or C)?

My goal is to avoid BIOS disassembling. I am also aware that BIOSes are relatively similar in their low-level API, and thus also the list of the API calls are similar.

like image 653
S.S. Anne Avatar asked Jan 01 '23 02:01

S.S. Anne


1 Answers

"Ralf Brown's interrupt list" might be helpful for you.

That site lists most interrupts commonly used on x86 systems:

Not only BIOS interrupts are listed, but also MS-DOS interrupts and interrupts used by common programs. This includes a section listing Linux system calls (interrupt 0x80).

... i.e. please don't include ...

Unfortunately, you will have to separate "common" BIOS interrupts, interrupts only present in certain BIOSes and MS-DOS interrupts yourself.

However, the for many interrupts the list says something like: "Only present in BIOSes made by Example Software Inc."

... my recent edit ...

If I understand you correctly, you want to have some kind of API that tells you which interrupts are present on a certain system.

Unfortunately, such an API does not exist:

The BIOS is not necessarily one single piece of software. Instead, some hardware components (such as a graphics card) may have their own firmware.

The firmware of such a component typically doesn't have own interrupts, but it may add functionality to the BIOS interrupts by changing the interrupt vector.

The firmware of a graphics card may add a function AX=5678h to int 10h by changing the interrupt vector so it points to the following piece of code:

new_int_10_vector:
    cmp ax, 5678h
    je new_function

    ; (In reality, the next line is not as simple as shown here)
    jmp original_int_10_vector

new_function:
    ; Perform the "new" function "AX=5678h" of "int 10h"
    ; ...
    iret

If modern BIOS suppliers wanted to introduce a function that lists all supported functions (the function you are looking for), they would have a problem:

How should the BIOS detect that the firmware of the graphics card adds the additional function AX=5678h to int 10h?

like image 136
Martin Rosenau Avatar answered Jan 05 '23 19:01

Martin Rosenau