util/intelmetool: Fix warning building with 32-bit
On a 32-bit system, pointers are 32-bit wide, and not 64-bit, resulting
in the warning below.
```
mmap.c: In function ‘map_physical_exact’:
mmap.c:26:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
virt_addr = mmap((void*)mapto, len, PROT_WRITE | PROT_READ,
^
```
Fix this by using compatible types.
Change-Id: I4ede26127efcbd5668b978e6880a0535607e373d
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/17970
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
010ecf8009
commit
1e7911e8aa
3 changed files with 13 additions and 13 deletions
|
|
@ -82,7 +82,7 @@ static void dump_me_memory() {
|
|||
uint32_t me_clone = 0x60000000;
|
||||
uint8_t *dump;
|
||||
|
||||
dump = map_physical_exact(me_clone, me_clone, 0x2000000);
|
||||
dump = map_physical_exact((off_t)me_clone, (void *)me_clone, 0x2000000);
|
||||
zeroit(dump, 0x2000000);
|
||||
printf("Send magic command for memory clone\n");
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ static int activate_me() {
|
|||
pci_fill_info(sb, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_SIZES | PCI_FILL_CLASS);
|
||||
|
||||
rcba_phys = pci_read_long(sb, 0xf0) & 0xfffffffe;
|
||||
rcba = map_physical(rcba_phys, size);
|
||||
rcba = map_physical((off_t)rcba_phys, size);
|
||||
|
||||
//printf("RCBA at 0x%08" PRIx32 "\n", (uint32_t)rcba_phys);
|
||||
fd2 = *(uint32_t *)(rcba + FD2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue