iPXE
Functions
bios_smbios.c File Reference

System Management BIOS. More...

#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <ipxe/uaccess.h>
#include <ipxe/smbios.h>
#include <realmode.h>
#include <pnpbios.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static int bios_find_smbios (struct smbios *smbios)
 Find SMBIOS.
 PROVIDE_SMBIOS (pcbios, find_smbios, bios_find_smbios)

Detailed Description

System Management BIOS.

Definition in file bios_smbios.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static int bios_find_smbios ( struct smbios smbios) [static]

Find SMBIOS.

Parameters:
smbiosSMBIOS entry point descriptor structure to fill in
Return values:
rcReturn status code

Definition at line 47 of file bios_smbios.c.

References smbios::address, BIOS_SEG, smbios::count, find_smbios_entry(), smbios::len, smbios_entry::major, smbios_entry::minor, phys_to_user(), rc, real_to_user(), smbios_entry::smbios_address, smbios_entry::smbios_count, smbios_entry::smbios_len, SMBIOS_VERSION, and smbios::version.

                                                      {
        struct smbios_entry entry;
        int rc;

        /* Scan through BIOS segment to find SMBIOS entry point */
        if ( ( rc = find_smbios_entry ( real_to_user ( BIOS_SEG, 0 ), 0x10000,
                                        &entry ) ) != 0 )
                return rc;

        /* Fill in entry point descriptor structure */
        smbios->address = phys_to_user ( entry.smbios_address );
        smbios->len = entry.smbios_len;
        smbios->count = entry.smbios_count;
        smbios->version = SMBIOS_VERSION ( entry.major, entry.minor );

        return 0;
}
PROVIDE_SMBIOS ( pcbios  ,
find_smbios  ,
bios_find_smbios   
)