diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/lib/tables.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c index 1779bb3..ea834a5 100644 --- a/arch/x86/lib/tables.c +++ b/arch/x86/lib/tables.c @@ -3,6 +3,8 @@ * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> */ +#define LOG_CATEGORY LOGC_BOARD + #include <common.h> #include <bloblist.h> #include <log.h> @@ -96,13 +98,20 @@ int write_tables(void) return log_msg_ret("bloblist", -ENOBUFS); } rom_table_end = table->write(rom_table_start); - rom_table_end = ALIGN(rom_table_end, ROM_TABLE_ALIGN); + if (!rom_table_end) { + log_err("Can't create configuration table %d\n", i); + return -EINTR; + } if (IS_ENABLED(CONFIG_SEABIOS)) { table_size = rom_table_end - rom_table_start; high_table = (u32)(ulong)high_table_malloc(table_size); if (high_table) { - table->write(high_table); + if (!table->write(high_table)) { + log_err("Can't create configuration table %d\n", + i); + return -EINTR; + } cfg_tables[i].start = high_table; cfg_tables[i].size = table_size; |