lib/hexdump: remove hexdump32 and use hexdump instead

hexdump and hexdump32 do similar things, but hexdump32 is mostly a
reimplementation that has additional support to configure the console
log level, but has a very unexpected len parameter that isn't in bytes,
but in DWORDs.
With the move to hexdump() the console log level for the hexdump is
changed to BIOS_DEBUG.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6138d17f0ce8e4a14f22d132bf5c64d0c343b80d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54925
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Held 2021-05-25 19:15:11 +02:00
parent a30641295a
commit 2a29d45350
3 changed files with 1 additions and 20 deletions

View File

@ -29,7 +29,6 @@ int checkstack(void *top_of_stack, int core);
* https://packages.debian.org/jessie/amd64/vim-common/filelist
*/
void hexdump(const void *memory, size_t length);
void hexdump32(char LEVEL, const void *d, size_t len);
/*
* hexstrtobin - Turn a string of ASCII hex characters into binary

View File

@ -48,21 +48,3 @@ void hexdump(const void *memory, size_t length)
}
}
}
void hexdump32(char LEVEL, const void *d, size_t len)
{
size_t count = 0;
while (len > 0) {
if (count % 8 == 0) {
printk(LEVEL, "\n");
printk(LEVEL, "%p:", d);
}
printk(LEVEL, " 0x%08lx", *(unsigned long *)d);
count++;
len--;
d += 4;
}
printk(LEVEL, "\n\n");
}

View File

@ -371,7 +371,7 @@ void perform_raminit(int s3resume)
} else {
printk(BIOS_ERR, "Could not parse MRC_VAR data\n");
hexdump32(BIOS_ERR, mrc_var, sizeof(*mrc_var) / sizeof(u32));
hexdump(mrc_var, sizeof(*mrc_var));
}
const int cbmem_was_initted = !cbmem_recovery(s3resume);