Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 851010 Details for
Bug 1052837
The wrong DMI structures could not be decoded while booting vm with -smbios params
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to help examine the DMI blob built by qemu-kvm
0001-smbios-DEBUG-Print-the-table.patch (text/plain), 3.42 KB, created by
Markus Armbruster
on 2014-01-16 11:05:10 UTC
(
hide
)
Description:
Patch to help examine the DMI blob built by qemu-kvm
Filename:
MIME Type:
Creator:
Markus Armbruster
Created:
2014-01-16 11:05:10 UTC
Size:
3.42 KB
patch
obsolete
>From 8e1a0de9f60951ae9a263a236653214219db8b73 Mon Sep 17 00:00:00 2001 >From: Markus Armbruster <armbru@redhat.com> >Date: Thu, 16 Jan 2014 11:52:57 +0100 >Subject: [PATCH] smbios DEBUG: Print the table > >--- > hw/i386/smbios.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 77 insertions(+) > >diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c >index e8f41ad..90e1e86 100644 >--- a/hw/i386/smbios.c >+++ b/hw/i386/smbios.c >@@ -156,12 +156,89 @@ static void smbios_register_config(void) > > machine_init(smbios_register_config); > >+static void smbios_print_table(void) >+{ >+ size_t len = smbios_entries_len; >+ uint8_t *p = smbios_entries; >+ uint16_t *nent_le16; >+ uint16_t nent, entsz; >+ int i; >+ struct smbios_header *header; >+ struct smbios_field *field; >+ struct smbios_table *table; >+ uint8_t *entry, *data; >+ size_t datasz; >+ >+#define EATB(sz) { \ >+ if (len < (sz)) { \ >+ printf("BUG: need %zu bytes more, got only %zu", sz, len); \ >+ qemu_hexdump((void *)p, stdout, "\t", len); \ >+ return; \ >+ } \ >+ p += (sz); \ >+ len -= (sz); \ >+} >+#define GETB(ptr, sz) { \ >+ (ptr) = (void *)p; \ >+ EATB((sz)); \ >+} >+#define GET(ptr) GETB((ptr), sizeof(*(ptr))) >+ >+ if (!p) { >+ printf("SMBIOS table not defined\n"); >+ return; >+ } >+ printf("SMBIOS table\n\t%zu bytes\n", len); >+ GET(nent_le16); >+ nent = le16_to_cpu(*nent_le16); >+ printf("\t%d entries\n", nent); >+ >+ for (i = 0; i < nent; i++) { >+ printf("entry#%d\n", i); >+ entry = p; >+ GET(header); >+ entsz = le16_to_cpu(header->length); >+ printf("\ttype %d sz %d\n", header->type, entsz); >+ switch (header->type) { >+ case SMBIOS_FIELD_ENTRY: >+ field = (struct smbios_field *)header; >+ EATB(sizeof(*field) - sizeof(*header)); >+ printf("\tfield type %d offset %d\n", >+ field->type, le16_to_cpu(field->offset)); >+ data = p; >+ datasz = entsz - sizeof(*field); >+ break; >+ case SMBIOS_TABLE_ENTRY: >+ table = (struct smbios_table *)header; >+ assert(sizeof(*table) == sizeof(*header)); >+ data = p; >+ datasz = entsz - sizeof(*table); >+ break; >+ default: >+ printf("BUG: invalid type\n"); >+ data = (uint8_t *)header; >+ datasz = entsz; >+ } >+ EATB(datasz); >+ assert(p - entry == entsz); >+ qemu_hexdump((void *)data, stdout, "\t", datasz); >+ } >+ if (len) { >+ printf("BUG: %zu bytes left\n", len); >+ qemu_hexdump((void *)p, stdout, "\t", len); >+ } >+#undef EATB >+#undef GETB >+#undef GET >+} >+ > static void smbios_validate_table(void) > { > if (smbios_type4_count && smbios_type4_count != smp_cpus) { > error_report("Number of SMBIOS Type 4 tables must match cpu count"); > exit(1); > } >+ smbios_print_table(); > } > > /* >-- >1.8.1.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1052837
: 851010