On 08/13/2013 08:03 AM, Graeme Gregory wrote:
[023] rsdp : rsdp.aml (36 bytes @ 0x00000000) [reloc: 0x0000000042010000]
This is certainly wrong, I suspect somewhere in here you missed a BLOB_HEADER_SIZE.
I guess all these addresses might be out by 8 bytes?
Graeme
Oh, bugger. That's a really stupid thinko on my part.
I intentionally subtracted the BLOB_HEADER_SIZE from everything which is patently wrong. I'll redo this without subtracting that value.
On 13/08/13 00:10, al.stone@linaro.org wrote:
From: Al Stone ahs3@redhat.com
Signed-off-by: Al Stone al.stone@linaro.org
tools/mab/mab.c | 24 ++++++++++++++++++------ tools/mab/mab.h | 3 ++- 2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/tools/mab/mab.c b/tools/mab/mab.c index 3107088..0480f95 100644 --- a/tools/mab/mab.c +++ b/tools/mab/mab.c @@ -121,6 +121,7 @@ struct table *build_table_entry(char *dir, char *buf) tmp->file_size = -1; /* need to build .aml file first */ tmp->offset = -1;
tmp->paddr = -1; } return tmp;
@@ -295,17 +296,20 @@ void fixup_rsdp(unsigned char *blob, uint64_t paddr) rsdpp->offset + RSDT_ADDR_OFFSET); ltmp = (uint64_t *)(blob + BLOB_HEADER_SIZE + rsdpp->offset + XSDT_ADDR_OFFSET);
- rsdpp->paddr = rsdpp->offset + paddr - BLOB_HEADER_SIZE; p = find_table("xsdt");
E.g., in the line above; the BLOB_HEADER_SIZE should _not_ be subtracted....