smbios: make sure it's at f0000
authorRonald G. Minnich <rminnich@gmail.com>
Thu, 5 Jan 2017 20:44:47 +0000 (12:44 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 9 Jan 2017 23:59:41 +0000 (18:59 -0500)
it's in the spec.

Change-Id: Icd2a4d75c267a65efd234a52faa6d83af3bbf0fe
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/vmm/vmrunkernel.c

index 91bef23..bc4e575 100644 (file)
@@ -817,6 +817,12 @@ int main(int argc, char **argv)
        a += 4096;
 
        if (smbiostable) {
+               if (a > (void *)0xf0000) {
+                       fprintf(stderr, "No room for SMBIOS table: current table pointer is %p\n",
+                               a);
+                       exit(1);
+               }
+               a = (void *)0xf0000;
                fprintf(stderr, "Using SMBIOS table %s\n", smbiostable);
                a += smbios(smbiostable, a);
        }