feat(mkcapsule): no upper bound on capsule block numbers

Blocks 0..2047, the VM's fast RAM, are the only ones a capsule may not
claim (docs/v4.0.0/NUCLEUS.md 5.2).  The ceiling of 5120 matched no device.
All 36 capsule files still lint clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-05 15:18:30 -04:00
co-authored by Claude Opus 5.5
parent d4bd6e9601
commit 903321e548
3 changed files with 13 additions and 7 deletions
+6 -4
View File
@@ -405,11 +405,13 @@ static int validate_forth_blocks(const char *fpath,
block_num = (int)strtol((const char *)(data + start + 6), NULL, 10);
line_in_block = 0;
/* Block number must be in user space: [2048, 5120) */
if (block_num < 2048 || block_num >= 5120) {
/* Blocks 0..2047 are the VM's fast RAM and the only ones a
* capsule may not claim; there is no upper bound
* (docs/v4.0.0/NUCLEUS.md 5.2). */
if (block_num < 2048) {
fprintf(stderr,
"mkcapsule: ERROR: %s:%d: block %d out of user range "
"[2048, 5120)\n",
"mkcapsule: ERROR: %s:%d: block %d is in the VM's fast "
"RAM (0..2047)\n",
fpath, file_line, block_num);
errors++;
}