Page MenuHomeFreeBSD

Exclude the EFI framebuffer from phys_avail[].
ClosedPublic

Authored by markj on Sep 7 2018, 5:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 15 2024, 1:59 AM
Unknown Object (File)
Dec 20 2023, 12:34 AM
Unknown Object (File)
Dec 13 2023, 4:36 PM
Unknown Object (File)
Nov 30 2023, 5:12 AM
Unknown Object (File)
Nov 27 2023, 8:02 AM
Unknown Object (File)
Nov 24 2023, 6:57 PM
Unknown Object (File)
Nov 22 2023, 4:46 PM
Unknown Object (File)
Nov 22 2023, 3:18 PM
Subscribers

Details

Summary

On at least the ThunderX, the EFI memory map covers the framebuffer,
causing the kernel to treat it as regular memory. Explicitly exclude it
during boot.

Also bump the number of excluded regions, as I'm hitting the limit.
Modify arm_physmem_exclude_region() to panic if the limit is hit instead
of silently failing.

Test Plan

The framebuffer is at 0x1000000. I see the same region excluded when I boot Ubuntu on this hardware.

[root@markj /usr/src]# sysctl vm.phys_segs
vm.phys_segs:
SEGMENT 0:

start:     0xd00000
end:       0x10000000
domain:    0
free list: 0xffff000000ce2900

SEGMENT 1:

start:     0x101d5000
end:       0xfffec000
domain:    0
free list: 0xffff000000ce2900

SEGMENT 2:

start:     0x100000000
end:       0xfff100000
domain:    0
free list: 0xffff000000ce2900

SEGMENT 3:

start:     0x10000400000
end:       0x10f17ff3000
domain:    0
free list: 0xffff000000ce2900

SEGMENT 4:

start:     0x10febc43000
end:       0x10ffe71d000
domain:    0
free list: 0xffff000000ce2900

SEGMENT 5:

start:     0x10ffffff000
end:       0x11000000000
domain:    0
free list: 0xffff000000ce2900

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added reviewers: emaste, andrew, ian.

I would commit the efifb bit separately from the rest of the diff.

sys/arm64/arm64/machdep.c
1038–1039 ↗(On Diff #47798)

Should we check for efifb != NULL before dereferencing it? We only pass in the fb info if loader detects one.

sys/arm64/arm64/machdep.c
1038–1039 ↗(On Diff #47798)

Oops, definitely.

markj marked 2 inline comments as done.

Check for a null efifb.

This revision is now accepted and ready to land.Sep 8 2018, 8:52 AM
This revision was automatically updated to reflect the committed changes.