summaryrefslogtreecommitdiff
path: root/target-ia64/firmware.c
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2007-12-20 19:34:38 +0800
committerAvi Kivity <avi@qumranet.com>2007-12-20 14:40:33 +0200
commit3e84c457147bcf4dc50a1fc8c18714d71462fdfa (patch)
treeb1a36d035b7659e5d4f614b8946ec741e1bbe1f1 /target-ia64/firmware.c
parent30bb3aafc1f7091b0bbeb8a475a86d113f978bf7 (diff)
Ia64: Add one empty entry in hob
In order to adapt the requirement of open guest firmware. Since open guest firmware use hard-code to check hob entries, so add one empty entry to workaround it. Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'target-ia64/firmware.c')
-rw-r--r--target-ia64/firmware.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/target-ia64/firmware.c b/target-ia64/firmware.c
index 7b1a65dad..24693504e 100644
--- a/target-ia64/firmware.c
+++ b/target-ia64/firmware.c
@@ -72,6 +72,7 @@ typedef enum {
HOB_TYPE_PAL_VM_INFO,
HOB_TYPE_PAL_VM_PAGE_SIZE,
HOB_TYPE_NR_VCPU,
+ HOB_TYPE_NR_NVRAM,
HOB_TYPE_MAX
} hob_type_t;
@@ -191,6 +192,13 @@ get_hob_size(void* hob_buf)
return phit->length;
}
+static int
+add_max_hob_entry(void* hob_buf)
+{
+ long max_hob = 0;
+ return hob_add(hob_buf, HOB_TYPE_MAX, &max_hob, sizeof(long));
+}
+
static int
build_hob(void* hob_buf, unsigned long hob_buf_size,
unsigned long dom_mem_size, unsigned long vcpus)
@@ -216,6 +224,10 @@ build_hob(void* hob_buf, unsigned long hob_buf_size,
goto err_out;
}
+ if (add_max_hob_entry(hob_buf) < 0) {
+ Hob_Output("Add max hob entry failed, buffer too small");
+ goto err_out;
+ }
return 0;
err_out: