1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +02:00

Clean up physmap, fix unaligned mapping problems

Convert all physmaps in dmi.c to use aligned readonly maps.
Convert all physmaps in cbtable.c to use unaligned readonly maps.
Make physunmap() a generic architecture-independent wrapper.
Add physunmap_unaligned() to complement physmap*_unaligned().

Corresponding to flashrom svn r1765.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
Carl-Daniel Hailfinger
2014-03-05 00:16:16 +00:00
parent 309dd2c7c2
commit 43eac03945
4 changed files with 51 additions and 21 deletions

2
dmi.c
View File

@ -153,7 +153,7 @@ static void dmi_table(uint32_t base, uint16_t len, uint16_t num)
{
int i = 0, j = 0;
uint8_t *dmi_table_mem = physmap_round("DMI Table", base, len);
uint8_t *dmi_table_mem = physmap_ro("DMI Table", base, len);
if (dmi_table_mem == NULL) {
msg_perr("Unable to access DMI Table\n");
return;