Page MenuHomeFreeBSD

stand: impose 510,000 byte limit for /boot/loader and /boot/pxeldr
ClosedPublic

Authored by imp on Aug 10 2022, 11:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 21 2024, 12:23 PM
Unknown Object (File)
Jan 21 2024, 10:47 PM
Unknown Object (File)
Jan 12 2024, 6:58 AM
Unknown Object (File)
Nov 7 2023, 4:42 PM
Unknown Object (File)
Oct 6 2023, 3:25 PM
Unknown Object (File)
Sep 25 2023, 12:06 PM
Unknown Object (File)
Apr 8 2023, 8:37 PM
Unknown Object (File)
Mar 22 2023, 6:37 PM
Subscribers

Details

Summary

The BIOS method of booting imposes an absolute limit of 640k for the
size of the program being run due to btx. In practice, this means that
programs larger than about 500kiB will fail in odd ways as the stack /
heap will overflow.

Pick 510,000 as the cutoff line semi-arbitrarily. loader_lua is now
almost too big and we want to break the build when it crosses this
threshold.

This is at-best a stop-breakage until we have a better way to subset the
boot loader for BIOS booting to allow better, more fined-tuned
/boot/loaders for the many different environments they have to run
in. This likely means we'll have a graphical loader than understands a
few filesystmes for installation, and a non-graphical loader that
understands the most filesystems possible for everything else in the
future. Our build infrastructure needs some work before we can do that,
however.

At this late date, it likely isn't worth the efforts to move parts of
the loader into high memory. There's a number of assumptions about where
the stack is, where buffers reside, etc that are fulfilled when it lives
in the first 640k that would need bounce buffers and/or other counter
measures if we were to split it up. All BIOS calls are done in 16-bit
mode with SEG:OFF addresses, requiring them to be in the first 640k of
RAM.

Sponsored by: Netflix

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46846
Build 43735: arc lint + arc unit