x86: Use high_table_malloc() for tables passing to SeaBIOS
authorBin Meng <bmeng.cn@gmail.com>
Wed, 11 May 2016 14:45:02 +0000 (07:45 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 23 May 2016 07:18:00 +0000 (15:18 +0800)
Now that we already reserved high memory for configuration tables,
call high_table_malloc() to allocate tables from the region.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/lib/tables.c

index 1213a9c..f92111e 100644 (file)
@@ -5,7 +5,6 @@
  */
 
 #include <common.h>
-#include <malloc.h>
 #include <asm/sfi.h>
 #include <asm/mpspec.h>
 #include <asm/smbios.h>
@@ -81,9 +80,8 @@ void write_tables(void)
 
 #ifdef CONFIG_SEABIOS
                table_size = rom_table_end - rom_table_start;
-               high_table = (u32)memalign(ROM_TABLE_ALIGN, table_size);
+               high_table = (u32)high_table_malloc(table_size);
                if (high_table) {
-                       memset((void *)high_table, 0, table_size);
                        table_write_funcs[i](high_table);
 
                        cfg_tables[i].start = high_table;