Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153981587
D17073.id47800.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17073.id47800.diff
View Options
Index: sys/arm/arm/physmem.c
===================================================================
--- sys/arm/arm/physmem.c
+++ sys/arm/arm/physmem.c
@@ -48,8 +48,8 @@
* that can be allocated, or both, depending on the exclusion flags associated
* with the region.
*/
-#define MAX_HWCNT 10
-#define MAX_EXCNT 10
+#define MAX_HWCNT 16
+#define MAX_EXCNT 16
#if defined(__arm__)
#define MAX_PHYS_ADDR 0xFFFFFFFFull
@@ -359,7 +359,8 @@
/*
* Add an exclusion region.
*/
-void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags)
+void
+arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags)
{
vm_offset_t adj;
@@ -371,8 +372,9 @@
pa = trunc_page(pa);
sz = round_page(sz + adj);
- if (excnt < nitems(exregions))
- excnt = insert_region(exregions, excnt, pa, sz, exflags);
+ if (excnt >= nitems(exregions))
+ panic("failed to exclude region %#lx-%#lx", pa, pa + sz);
+ excnt = insert_region(exregions, excnt, pa, sz, exflags);
}
size_t
Index: sys/arm64/arm64/machdep.c
===================================================================
--- sys/arm64/arm64/machdep.c
+++ sys/arm64/arm64/machdep.c
@@ -982,6 +982,7 @@
void
initarm(struct arm64_bootparams *abp)
{
+ struct efi_fb *efifb;
struct efi_map_header *efihdr;
struct pcpu *pcpup;
char *env;
@@ -1031,6 +1032,13 @@
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];
pcpu_init(pcpup, 0, sizeof(struct pcpu));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 26, 6:09 AM (3 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32167844
Default Alt Text
D17073.id47800.diff (1 KB)
Attached To
Mode
D17073: Exclude the EFI framebuffer from phys_avail[].
Attached
Detach File
Event Timeline
Log In to Comment