Page MenuHomeFreeBSD

amd64 acpi_wakeup: map 1:1 whole low 4G for initial page table
ClosedPublic

Authored by kib on Sep 11 2021, 6:42 PM.
Tags
None
Referenced Files
F131760726: D31916.diff
Fri, Oct 10, 11:11 PM
Unknown Object (File)
Thu, Oct 2, 10:07 PM
Unknown Object (File)
Mon, Sep 29, 3:44 PM
Unknown Object (File)
Jul 4 2025, 8:24 AM
Unknown Object (File)
Jul 1 2025, 12:35 PM
Unknown Object (File)
Jun 27 2025, 11:45 AM
Unknown Object (File)
Jun 22 2025, 4:20 PM
Unknown Object (File)
Jun 15 2025, 12:16 AM
Subscribers

Details

Summary

This is required since kernel text might be physically located anywhere below 4G.

Also avoid touching unowned low memory when booted from UEFI.

PR: 258432

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Sep 11 2021, 6:42 PM
kib created this revision.

Do not forget to install KVA mappings into the trampoline page table.

kib added a reviewer: markj.
markj added inline comments.
sys/x86/acpica/acpi_wakeup.c
507

Why do we set PG_U here?

This revision is now accepted and ready to land.Sep 13 2021, 12:41 PM
sys/x86/acpica/acpi_wakeup.c
507

I do not think there is a reason now. It might be there was some reason before, if e.g. vm86 mode was used on the wakeup path [Or any other trampoline from real mode to final protection mode, we are consistent to set PG_U on all trampoline ptes, I believe] So it probably was moved from i386 to amd64 and live there since.

I have another change to the acpi_wakeup.c in pipe, after that I might look into coalescing code that creates page table for low 4G 1:1.