[roll] Roll fuchsia [memalloc] Make Pool::RestrictTotalRam() less destructive

The current implementation of kernel.memory-limit-mb turned out not to
play nicely with trampoline booting. Previously we would drop all
bookkeeping for RAM past the cut-off. Moreover, with trampoline booting
we would later consult this bookkeeping to reallocate page tables to
prepare, just in case the original page tables ended up in the would-be
fixed-address load image. If the bootloader loaded us high enough, the
GDT and boot stack could end up past this cut-off, thus ending up
unmapped after the installation of the new page tables.

We address this by making the implementation of kernel.memory-limit-mb
less destructive, allocating the memory past the cut-off instead of
dropping it. This way the Pool doesn't lose any bookkeeping and we still
have the full view of RAM when we install new page tables ahead of
trampoline booting. At the point of hand-off we then drop all such RAM.

This is handled by Pool::RestrictTotalRam(), which we also more clearly
rename to TruncateTotalRam().

Original-Fixed: 363284143
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1120681
Original-Revision: b25b8ceaebc353de571c9a1f6a261cc9847b8512
GitOrigin-RevId: 335bff9538197df2721ca6d589fea983fc06b368
Change-Id: I525bc4169a14132118222a337d3f1cbe72fa59d2
1 file changed
tree: be4d50b68983ca0ea912e66921f3b7b285bf0b03
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.