Page MenuHomeFreeBSD

Initialize dump_avail on RISC-V
ClosedPublic

Authored by mhorne063_gmail.com on Feb 12 2019, 9:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 8 2024, 7:05 PM
Unknown Object (File)
Mar 30 2024, 1:40 AM
Unknown Object (File)
Feb 3 2024, 9:13 PM
Unknown Object (File)
Dec 22 2023, 9:49 PM
Unknown Object (File)
Dec 13 2023, 12:05 AM
Unknown Object (File)
Nov 24 2023, 9:51 PM
Unknown Object (File)
Nov 22 2023, 2:10 PM
Unknown Object (File)
Nov 22 2023, 1:39 PM
Subscribers

Details

Summary

The dump_avail[] array contains a set of physical memory ranges which are used to indicate valid physical addresses for kernel memory dumps.

Initialize this alongside phys_avail[] while bootstrapping pmap.

Diff Detail

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

Event Timeline

sys/riscv/riscv/pmap.c
599 ↗(On Diff #53798)

Is there a reason dump_avail[] can't just contain the same ranges as physmap[]?

sys/riscv/riscv/pmap.c
599 ↗(On Diff #53798)

On x86 architectures where they actually test the memory, there could be small holes introduced to phys_avail[] and dump_avail[] that are not included in physmap[]. However, since we don't currently do this and would likely have to restructure this code anyway to support that feature, I don't see any issue with using physmap[] if it seems preferable to you.

sys/riscv/riscv/pmap.c
599 ↗(On Diff #53798)

Right, and here the only divergence between phys_avail[] and physmap[] is the physical memory occupied by the kernel image and preloaded files, so I think you might as well just have dump_avail[] be a copy of physmap[] for now.

Update to simply mirror physmap[].

mhorne063_gmail.com added inline comments.
sys/riscv/riscv/pmap.c
599 ↗(On Diff #53798)

Thanks Mark, the patch is much cleaner now :)

sys/riscv/riscv/pmap.c
636 ↗(On Diff #54591)

I think the assignments to dump_avail[] should logically come after the start == end check.

mhorne063_gmail.com marked an inline comment as done.

Address markj's comment.

This revision is now accepted and ready to land.Mar 2 2019, 7:28 PM
This revision was automatically updated to reflect the committed changes.