diff options
author | Warner Losh <imp@FreeBSD.org> | 2022-08-12 04:59:51 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2022-08-13 03:47:02 +0000 |
commit | f8a199f28f9de46fe7360c3a4a0e19e71be72721 (patch) | |
tree | 61f7c4c945cf7b08b6a128f3569617b5e29536d8 /stand/i386 | |
parent | b9fd884a8d0b249f77519a2c7f156b786fcc1c62 (diff) | |
download | src-f8a199f28f9de46fe7360c3a4a0e19e71be72721.tar.gz src-f8a199f28f9de46fe7360c3a4a0e19e71be72721.zip |
Diffstat (limited to 'stand/i386')
-rw-r--r-- | stand/i386/loader/Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile index 539c736af38f..723220484e67 100644 --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -19,8 +19,22 @@ PROG= ${LOADER}.sym INTERNALPROG= NEWVERSWHAT?= "bootstrap loader" x86 VERSION_FILE= ${.CURDIR}/../loader/version -LOADERSIZE?= 508000 # Largest known safe size for loader.bin - +# +# There's 640k - 40k maximum space, less however much memory the BIOS uses. A +# non-random survey suggests that 20k-25k is a good value for 'most' machines. +# We also need to subtract maximum stack usage (20-25k). +# +# So 640k - 40k - 25k - 25k = 550k = 563,200 bytes, but use 550,000 below for +# some extra buffer for more complex setups and/or wider BIOS lomem variation. +# +# Some systems use more stack or have BIOS resere more RAM (or both), and will +# need to set this lower in /etc/loader.conf if the above buffer is too small. +# +# sudo dd if=/dev/mem bs=1 iseek=0x413 count=2 | hd -d +# +# will tell you how many kiB of lomem are available. +# +LOADERSIZE?= 550000 # Largest known safe size for loader.bin .PATH: ${BOOTSRC}/i386/loader |