Page MenuHomeFreeBSD

amd64 efirt: initialize vm_pages backing EFI runtime memory
ClosedPublic

Authored by kib on Jun 16 2021, 2:01 AM.
Tags
None
Referenced Files
F96225592: D30785.diff
Tue, Sep 24, 3:25 AM
F96141962: D30785.diff
Mon, Sep 23, 8:15 PM
Unknown Object (File)
Mon, Sep 23, 3:25 AM
Unknown Object (File)
Fri, Sep 20, 5:48 AM
Unknown Object (File)
Fri, Sep 20, 1:50 AM
Unknown Object (File)
Thu, Sep 19, 11:03 PM
Unknown Object (File)
Wed, Sep 18, 7:42 PM
Unknown Object (File)
Tue, Sep 17, 5:49 PM
Subscribers
None

Details

Summary

so that PHYS_TO_VM_PAGE() and consequently physcopyin() work for them

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Jun 16 2021, 2:01 AM
kib created this revision.
kib added a reviewer: markj.
sys/amd64/amd64/efirt_machdep.c
252

p->md_phys + ptoa(idx) can be written as va, or is it intentional? I guess PHYS_TO_VM_PAGE(va) looks a bit suspicious.

258

I don't understand the purpose of introducing vm_page_init_page_partial() if you're going to manually override these fields anyway.

kib marked 2 inline comments as done.Jun 17 2021, 11:02 AM

I considered initializing m->phys_addr for all pages in vm_page_array[]. I decided to not do it for this change because I set up other attributes, the mode is most important. But I think it is useful to have VM_PAGE_TO_PHYS/PHYS_TO_VM_PAGE to work somehow for low addresses.

sys/amd64/amd64/efirt_machdep.c
258

I tried to avoid initializing the same field twice. Well, except the md_mode.

kib marked an inline comment as done.

Use vm_page_init_page().
Re-use va.

This revision is now accepted and ready to land.Jun 17 2021, 1:42 PM