mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-22 07:20:00 +00:00
Switch the EFI virtual address to a uint64_t
It is defined as a uint64_t in the UEFI spec. As it's not used as a pointer by the kernel follow this and define it as the same in the kernel. Reviewed by: kib, manu, imp Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D29759
This commit is contained in:
parent
2abd4f8581
commit
c78ad207ba
@ -204,7 +204,7 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)
|
||||
descsz)) {
|
||||
if ((p->md_attr & EFI_MD_ATTR_RT) == 0)
|
||||
continue;
|
||||
if (p->md_virt != NULL && (uint64_t)p->md_virt != p->md_phys) {
|
||||
if (p->md_virt != 0 && p->md_virt != p->md_phys) {
|
||||
if (bootverbose)
|
||||
printf("EFI Runtime entry %d is mapped\n", i);
|
||||
goto fail;
|
||||
|
@ -1107,7 +1107,7 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap,
|
||||
type = types[p->md_type];
|
||||
else
|
||||
type = "<INVALID>";
|
||||
printf("%23s %012lx %12p %08lx ", type, p->md_phys,
|
||||
printf("%23s %012lx %012lx %08lx ", type, p->md_phys,
|
||||
p->md_virt, p->md_pages);
|
||||
if (p->md_attr & EFI_MD_ATTR_UC)
|
||||
printf("UC ");
|
||||
|
@ -442,7 +442,7 @@ arm_add_efi_map_entries(struct efi_map_header *efihdr, struct mem_region *mr,
|
||||
type = types[p->md_type];
|
||||
else
|
||||
type = "<INVALID>";
|
||||
printf("%23s %012llx %12p %08llx ", type, p->md_phys,
|
||||
printf("%23s %012llx %012llx %08llx ", type, p->md_phys,
|
||||
p->md_virt, p->md_pages);
|
||||
if (p->md_attr & EFI_MD_ATTR_UC)
|
||||
printf("UC ");
|
||||
|
@ -184,7 +184,7 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)
|
||||
descsz)) {
|
||||
if ((p->md_attr & EFI_MD_ATTR_RT) == 0)
|
||||
continue;
|
||||
if (p->md_virt != NULL && (uint64_t)p->md_virt != p->md_phys) {
|
||||
if (p->md_virt != 0 && p->md_virt != p->md_phys) {
|
||||
if (bootverbose)
|
||||
printf("EFI Runtime entry %d is mapped\n", i);
|
||||
goto fail;
|
||||
|
@ -1046,7 +1046,7 @@ print_efi_map_entry(struct efi_md *p)
|
||||
type = types[p->md_type];
|
||||
else
|
||||
type = "<INVALID>";
|
||||
printf("%23s %012lx %12p %08lx ", type, p->md_phys,
|
||||
printf("%23s %012lx %012lx %08lx ", type, p->md_phys,
|
||||
p->md_virt, p->md_pages);
|
||||
if (p->md_attr & EFI_MD_ATTR_UC)
|
||||
printf("UC ");
|
||||
|
@ -126,8 +126,8 @@ efi_is_in_map(struct efi_md *map, int ndesc, int descsz, vm_offset_t addr)
|
||||
if ((p->md_attr & EFI_MD_ATTR_RT) == 0)
|
||||
continue;
|
||||
|
||||
if (addr >= (uintptr_t)p->md_virt &&
|
||||
addr < (uintptr_t)p->md_virt + p->md_pages * PAGE_SIZE)
|
||||
if (addr >= p->md_virt &&
|
||||
addr < p->md_virt + p->md_pages * PAGE_SIZE)
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ struct efi_md {
|
||||
#define EFI_MD_TYPE_PERSISTENT 14 /* Persistent memory. */
|
||||
uint32_t __pad;
|
||||
uint64_t md_phys;
|
||||
void *md_virt;
|
||||
uint64_t md_virt;
|
||||
uint64_t md_pages;
|
||||
uint64_t md_attr;
|
||||
#define EFI_MD_ATTR_UC 0x0000000000000001UL
|
||||
|
Loading…
Reference in New Issue
Block a user