diff options
author | David Brazdil <dbrazdil@google.com> | 2020-03-26 10:09:09 +0000 |
---|---|---|
committer | David Brazdil <dbrazdil@google.com> | 2020-03-26 10:09:18 +0000 |
commit | 933fa55b88a868cc2c035906ae8a57a6889830cc (patch) | |
tree | 0bea25b4f4ea25ba537276807498c97d1812fe34 | |
parent | f49253830eb3f1073f89fafddcf56aaa1c1df490 (diff) | |
download | hafnium-933fa55b88a868cc2c035906ae8a57a6889830cc.tar.gz |
Revert "Panic if manifest isn't aligned."
This reverts commit 1de06beb55e96a1722edf1ca8dfd75337f9a6ab2. Parsing
is now done by libfdt which handles unaligned memory accesses.
Bug: 150587116
Change-Id: I4cfc3f4cc571f5ec7573688c0b780497f6ada82a
-rw-r--r-- | docs/HafniumRamDisk.md | 4 | ||||
-rw-r--r-- | src/init.c | 6 |
2 files changed, 0 insertions, 10 deletions
diff --git a/docs/HafniumRamDisk.md b/docs/HafniumRamDisk.md index c6d45d4e3..6bd9c4f46 100644 --- a/docs/HafniumRamDisk.md +++ b/docs/HafniumRamDisk.md @@ -7,10 +7,6 @@ disk: * kernels for the VMs, whose names are described in the manifest (optional) * initrd of the primary VM, whose name is described in the manifest (optional) -The `manifest.dtb` must be the first file in the RAM disk, to ensure that it is -properly aligned. Hafnium will not be able to read it if it is not aligned to a -4 byte boundary. - Follow the [preparing Linux](PreparingLinux.md) instructions to produce `vmlinuz` and `initrd.img` for a basic Linux primary VM. diff --git a/src/init.c b/src/init.c index 702235b70..f94446117 100644 --- a/src/init.c +++ b/src/init.c @@ -123,12 +123,6 @@ void one_time_init(void) panic("Could not find manifest in initrd."); } - dlog_verbose("Manifest range: %#x - %#x (%d bytes)\n", manifest_it.next, - manifest_it.limit, manifest_it.limit - manifest_it.next); - if (!is_aligned(manifest_it.next, 4)) { - panic("Manifest not aligned."); - } - manifest_ret = manifest_init(&manifest, &manifest_it); if (manifest_ret != MANIFEST_SUCCESS) { panic("Could not parse manifest: %s.", |