pub const KERNEL_TEXT_ADDR_RANGE: Option<PageRange>;
Expand description

The range of virtual addresses from which we allocate pages for executable .text sections.

This is mostly an architecture-specific design choice (hopefully a temporary one):

  • On aarch64, even with the large code model, we are not (yet) able to generate code with branch instructions (call/jump) that can address instructions more than 128 MiB away from the current instruction. Thus, we restrict the range of .text section locations to ensure they are within 128 MiB. At some point in the future, this will be a limitation, but not for a long, long time.
  • On x86_64, this is not necessary, so the range is None.