svn commit: r338538 - head/sys/arm64/arm64
Mark Johnston
markj at FreeBSD.org
Sat Sep 8 21:52:46 UTC 2018
Author: markj
Date: Sat Sep 8 21:52:44 2018
New Revision: 338538
URL: https://svnweb.freebsd.org/changeset/base/338538
Log:
Exclude the EFI framebuffer from phys_avail[] on arm64.
On the ThunderX the region occupied by the framebuffer is included in
the EFI map, so explicitly add it to the set of regions that aren't
managed by the physical memory allocator.
PR: 231064
Reviewed by: andrew
Approved by: re (gjb)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17073
Modified:
head/sys/arm64/arm64/machdep.c
Modified: head/sys/arm64/arm64/machdep.c
==============================================================================
--- head/sys/arm64/arm64/machdep.c Sat Sep 8 21:51:47 2018 (r338537)
+++ head/sys/arm64/arm64/machdep.c Sat Sep 8 21:52:44 2018 (r338538)
@@ -982,6 +982,7 @@ cache_setup(void)
void
initarm(struct arm64_bootparams *abp)
{
+ struct efi_fb *efifb;
struct efi_map_header *efihdr;
struct pcpu *pcpup;
char *env;
@@ -1030,6 +1031,13 @@ initarm(struct arm64_bootparams *abp)
arm_physmem_exclude_regions(mem_regions, mem_regions_sz,
EXFLAG_NODUMP | EXFLAG_NOALLOC);
#endif
+
+ /* Exclude the EFI framebuffer from our view of physical memory. */
+ efifb = (struct efi_fb *)preload_search_info(kmdp,
+ MODINFO_METADATA | MODINFOMD_EFI_FB);
+ if (efifb != NULL)
+ arm_physmem_exclude_region(efifb->fb_addr, efifb->fb_size,
+ EXFLAG_NOALLOC);
/* Set the pcpu data, this is needed by pmap_bootstrap */
pcpup = &__pcpu[0];
More information about the svn-src-all
mailing list