Пример #1
0
/*
 * Find the root structure
 */
static void dmi_find_header(void)
{
    size_t dptr;

    /* Search for _SM_ or _DMI_ structure */
    for (dptr = 0xf0000 ; dptr < 0x100000 ; dptr += 16) {
	if (is_smbios(dptr)) {
	    dmi = (const struct dmi_header *)(dptr + 16);
	    break;
	} else if (is_old_dmi(dptr)) {
	    dmi = (const struct dmi_header *)dptr;
	    break;
	}
    }
}
Пример #2
0
void dump_dmi(struct backend *be)
{
    size_t dptr;

    cpio_mkdir(be, "dmi");

    /* Search for _SM_ or _DMI_ structure */
    for (dptr = 0xf0000 ; dptr < 0x100000 ; dptr += 16) {
	if (is_smbios(dptr)) {
	    dump_smbios(be, dptr);
	    dptr += 16;		/* Skip the subsequent DMI header */
	} else if (is_old_dmi(dptr)) {
	    dump_old_dmi(be, dptr);
	}
    }
}