Page MenuHomeFreeBSD

arm64: Fix EFI runtime mappings with 16K pages
AcceptedPublic

Authored by gallatin on Thu, Oct 15, 6:09 PM.
Tags
None
Referenced Files
F176605532: D60749.id189980.diff
Tue, Oct 20, 4:31 AM
F176589004: D60749.id.diff
Tue, Oct 20, 1:30 AM
F176585894: D60749.diff
Tue, Oct 20, 1:02 AM
Unknown Object (File)
Mon, Oct 19, 7:51 AM
Unknown Object (File)
Mon, Oct 19, 2:42 AM
Unknown Object (File)
Sun, Oct 18, 9:00 PM
Unknown Object (File)
Sun, Oct 18, 6:15 PM
Unknown Object (File)
Sat, Oct 17, 7:17 AM
Subscribers

Details

Reviewers
andrew
chs
imp
manu
Summary

Map complete EFI descriptor ranges at the kernel page granularity
and merge compatible entries when 4K EFI regions share a kernel page.
Preserve execution when any sharing region requires it and reject
conflicting mapping attributes without panicing.

This gets my small N1 booting with 16K pages.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Fri, Oct 16, 1:25 AM

This looks good to me. It might be good to explain somewhere that the overlap can happen because EDK2/EFI always boots to 4k page, but we're running with 16k. It's kinda implicit in the comment, but maybe it could be clearer.

FreeBSD/sys/arm64/arm64/efirt_machdep.c
247

Did you actually encounter this situation, or was it merely an abundance of caution?

FreeBSD/sys/arm64/arm64/efirt_machdep.c
247

Just an abundance of caution. Happy to remove if you prefer

FreeBSD/sys/arm64/arm64/efirt_machdep.c
247

Just documented here is perfect. I was wondering if we'd need some kind of test for this, but if it's not seen in the wild, then it's less urgent to have a test.