[BUG] WARNING: SMBIOS table_address overflow 7f752735e020

Heinrich Schuchardt xypron.glpk at gmx.de
Tue May 11 20:55:25 CEST 2021


Hello Simon,

with sandbox_defconfig and 'bootefi hello' I see a message

   WARNING: SMBIOS table_address overflow 7f752735e020

The problem is caused by mmap() being passed the same value 0x10000000
on each call. Only the first call will give you a low address.

It is this call where we need a low address:

state->ram_buf = os_malloc(state->ram_size);

But before that we call

arch/sandbox/cpu/start.c:447
os_argv = os_malloc(size);

due to your patch b308d9fd18fa ("sandbox: Avoid using malloc() for
system state").

I suggest to move state_init() to the top of the function main().

Why are we using both 'return 1' and 'os_exit(1)' in main?
Can't we just use on of them?

--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -439,6 +439,10 @@ int main(int argc, char *argv[])
         int size;
         int ret;

+       ret = state_init();
+       if (ret)
+               goto err;
+
         /*
          * Copy argv[] so that we can pass the arguments in the original
          * sequence when resetting the sandbox.
@@ -453,10 +457,6 @@ int main(int argc, char *argv[])
         gd = &data;
         gd->arch.text_base = os_find_text_base();

-       ret = state_init();
-       if (ret)
-               goto err;
-
         state = state_get_current();
         if (os_parse_args(state, argc, argv))
                 return 1;

Best regards

Heinrich


More information about the U-Boot mailing list