Move manifest to initrd
Supporting the manifest as part of FDT is problematic for testing
under the Android boot flow because it requires compiling and flashing
a different Hafnium image per test suite. Moving it back to the initrd
allows us to run different test suites against the same Hafnium image,
only by swapping the RAM disks.
Hafnium's one_time_init() routine will now expect to find the manifest
under "manifest.dtb".
Change-Id: Ifabffb50b06ffaba786046733d575adc9d43f4ad
diff --git a/inc/hf/boot_flow.h b/inc/hf/boot_flow.h
index 39d7060..9bf82c1 100644
--- a/inc/hf/boot_flow.h
+++ b/inc/hf/boot_flow.h
@@ -21,8 +21,8 @@
#include "hf/memiter.h"
#include "hf/mm.h"
-bool boot_flow_init(const struct fdt_node *fdt_root, struct manifest *manifest,
- struct boot_params *boot_params);
+bool boot_flow_get_params(struct boot_params *p,
+ const struct fdt_node *fdt_root);
bool boot_flow_update(struct mm_stage1_locked stage1_locked,
const struct manifest *manifest,
diff --git a/inc/hf/fdt.h b/inc/hf/fdt.h
index 8f72856..2dbb1d9 100644
--- a/inc/hf/fdt.h
+++ b/inc/hf/fdt.h
@@ -28,7 +28,7 @@
};
size_t fdt_header_size(void);
-uint32_t fdt_total_size(struct fdt_header *hdr);
+uint32_t fdt_total_size(const struct fdt_header *hdr);
void fdt_dump(const struct fdt_header *hdr);
bool fdt_root_node(struct fdt_node *node, const struct fdt_header *hdr);
bool fdt_find_child(struct fdt_node *node, const char *child);
diff --git a/inc/hf/manifest.h b/inc/hf/manifest.h
index 0e628e5..2609973 100644
--- a/inc/hf/manifest.h
+++ b/inc/hf/manifest.h
@@ -16,7 +16,6 @@
#pragma once
-#include "hf/fdt.h"
#include "hf/memiter.h"
#include "hf/spci.h"
#include "hf/string.h"
@@ -54,6 +53,8 @@
enum manifest_return_code {
MANIFEST_SUCCESS = 0,
+ MANIFEST_ERROR_FILE_SIZE,
+ MANIFEST_ERROR_NO_ROOT_NODE,
MANIFEST_ERROR_NO_HYPERVISOR_FDT_NODE,
MANIFEST_ERROR_NOT_COMPATIBLE,
MANIFEST_ERROR_RESERVED_VM_ID,
@@ -70,6 +71,6 @@
};
enum manifest_return_code manifest_init(struct manifest *manifest,
- const struct fdt_node *fdt_root);
+ struct memiter *manifest_fdt);
const char *manifest_strerror(enum manifest_return_code ret_code);