Rename FABRIC series: FABRIC.md->0, FABRIC-2.md->1, FABRIC-3.md->2, FABRIC-4.md unchanged
FABRIC.md -> FABRIC-0.md FABRIC-2.md -> FABRIC-1.md FABRIC-3.md -> FABRIC-2.md (the current/living document) FABRIC-4.md unchanged (new #3 to follow separately) Every cross-reference repo-wide updated to match, including doc-comment citations inside kernel source (.c/.h) files -- done via an ordered placeholder substitution (FABRIC-3.md->placeholder2, FABRIC-2.md-> placeholder1, FABRIC.md->placeholder0, then placeholders resolved to final names) in a single pass per file to avoid double-shifting already-renamed references. One line in capsules/font.4th grew past the 64-char block-format limit as a side effect of the longer filename; shortened it and reverified with mkcapsule --lint (34/34 pass) before rebuilding. Verified 3-arch boot to ok> (amd64/aarch64/riscv64, each in the foreground) after the fix; logs and DoE CSVs from this session's verification runs included per this repo's own audit-artifact convention. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YcT3H2PQeyujrzjqS3Var
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ff2941dfb9
commit
b031b802e3
@@ -164,7 +164,7 @@ static int serial_transmit_empty(void) {
|
||||
*
|
||||
* g_active_vm_name_buf owns the storage -- console_set_vm_name() copies
|
||||
* into it rather than storing the caller's own pointer. Found live
|
||||
* 2026-08-28 (FABRIC-3.md Phase F): mama_word_use() (USE) passes
|
||||
* 2026-08-28 (FABRIC-2.md Phase F): mama_word_use() (USE) passes
|
||||
* entry.name, a local VMRegistryEntry's own field -- once USE returns,
|
||||
* that stack frame is reused and the old raw-pointer version left
|
||||
* g_active_vm_name dangling, corrupting every console tag after the
|
||||
@@ -229,7 +229,7 @@ static void raw_putc(char c) {
|
||||
* framebuffer (vt100_putc) -- mirrors console_putc()'s own serial/framebuffer
|
||||
* split so the prefix reaches both outputs, not serial only. No recursion
|
||||
* into console_putc itself (would re-trigger the line-start prefix check). */
|
||||
/* FABRIC.md 4.4: the bracketed VM name (brackets included) renders in
|
||||
/* FABRIC-0.md 4.4: the bracketed VM name (brackets included) renders in
|
||||
* standard web orange, 0xFFA500 -- not in the classic 16-color ANSI
|
||||
* palette, so sent as a literal 24-bit SGR sequence rather than a palette
|
||||
* index. Same dual serial+framebuffer send pattern as the rest of this
|
||||
|
||||
@@ -73,7 +73,7 @@ static FbState g_fb;
|
||||
* uint32 store), e.g. PixelRedGreenBlueReserved8BitPerColor means byte0=R,
|
||||
* byte1=G, byte2=B, byte3=X -- which as a little-endian uint32 puts R in
|
||||
* bits[7:0], G in bits[15:8], B in bits[23:16]. The two branches below were
|
||||
* previously swapped relative to that (found via FABRIC.md item 4.3.1's
|
||||
* previously swapped relative to that (found via FABRIC-0.md item 4.3.1's
|
||||
* orientation test: corners rendered with R and B channels exchanged).
|
||||
*/
|
||||
static uint32_t pack_pixel(uint32_t rgb)
|
||||
@@ -190,7 +190,7 @@ void fb_draw_glyph(uint32_t px, uint32_t py, uint8_t ch,
|
||||
uint32_t packed = on ? pfg : pbg;
|
||||
uint32_t base_x = px + col * g_fb.scale;
|
||||
/* font_8x16_data stores each glyph's scanlines bottom-to-top
|
||||
* (FABRIC.md item 4.4f) -- row 0 is the glyph's bottom row, so
|
||||
* (FABRIC-0.md item 4.4f) -- row 0 is the glyph's bottom row, so
|
||||
* it maps to the cell's last pixel row, not its first. */
|
||||
uint32_t base_y = py + (15u - row) * g_fb.scale;
|
||||
|
||||
@@ -215,7 +215,7 @@ void fb_draw_glyph(uint32_t px, uint32_t py, uint8_t ch,
|
||||
* --------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* fb_draw_orientation_test — one-time boot diagnostic (FABRIC.md item 4.3.1).
|
||||
* fb_draw_orientation_test — one-time boot diagnostic (FABRIC-0.md item 4.3.1).
|
||||
*
|
||||
* Fills each raster corner with a distinct solid color so a screendump
|
||||
* immediately reveals whether the image is flipped or rotated. Not part of
|
||||
@@ -263,7 +263,7 @@ void fb_draw_orientation_test(void)
|
||||
* show it, but enough scrolls (or scrolling quickly) accumulates visible
|
||||
* pixel overlap between rows.
|
||||
*
|
||||
* Copies through non-volatile pointers (FABRIC.md item 4.4g performance
|
||||
* Copies through non-volatile pointers (FABRIC-0.md item 4.4g performance
|
||||
* fix, 2026-08-11): the GOP framebuffer is mapped write-back, not
|
||||
* cache-disabled MMIO (vmm.c:350-363 -- "QEMU's VGA emulation is coherent
|
||||
* and UC- mapping causes #GP"), so it behaves as ordinary RAM and does not
|
||||
@@ -315,7 +315,7 @@ void fb_scroll_rows(uint32_t pixel_rows, uint32_t bg)
|
||||
}
|
||||
|
||||
/**
|
||||
* fb_scroll_rect — box-confined scroll (FABRIC.md item 4.4t).
|
||||
* fb_scroll_rect — box-confined scroll (FABRIC-0.md item 4.4t).
|
||||
*
|
||||
* Same non-volatile bulk-copy rationale as fb_scroll_rows() above, but
|
||||
* bounded to a caller-supplied rectangle instead of the whole framebuffer --
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* ttf.c — TrueType font parser core (FABRIC.md items 4.3.7, 4.3.7a)
|
||||
* ttf.c — TrueType font parser core (FABRIC-0.md items 4.3.7, 4.3.7a)
|
||||
*
|
||||
* sfnt directory + head/maxp/loca/glyf/cmap(format 4) table parsing, plus
|
||||
* simple- and composite-glyph outline extraction. All multi-byte fields in
|
||||
@@ -26,7 +26,7 @@
|
||||
* an unsigned overflow check; q48_mul does a plain unsigned widen-multiply)
|
||||
* — confirmed by reading that file, not assumed. Per this repo's rule
|
||||
* against modifying a shared/tested module to "fix" it without being
|
||||
* asked, that gap is reported (see FABRIC.md's 4.3.7a completion note),
|
||||
* asked, that gap is reported (see FABRIC-0.md's 4.3.7a completion note),
|
||||
* not patched here. No glyph in the v1 repertoire (§27.6.4) needs a
|
||||
* non-identity composite transform — checked against
|
||||
* fonts/JetBrainsMono-Regular.ttf before writing this, not assumed.
|
||||
|
||||
+12
-12
@@ -55,7 +55,7 @@
|
||||
#define UNDERLINE_ROW 14u
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
* FABRIC.md item 4.4j: TTF glyph backend, active only from
|
||||
* FABRIC-0.md item 4.4j: TTF glyph backend, active only from
|
||||
* vt100_enable_ttf() onward (boot/POST stays font_8x16.c).
|
||||
*
|
||||
* Point size and cell geometry, decided final by item 4.4m (20px text,
|
||||
@@ -81,7 +81,7 @@ static ttf_font_t g_ttf_font;
|
||||
static int g_ttf_ready = 0;
|
||||
static ttf_raster_cache_t g_ttf_cache;
|
||||
|
||||
/* FABRIC.md item 4.4y-revised: Alt+TAB graphics/text toggle. When 0, every
|
||||
/* FABRIC-0.md item 4.4y-revised: Alt+TAB graphics/text toggle. When 0, every
|
||||
* terminal draw call (put_char's glyph blit, erase, scroll) becomes a
|
||||
* pure logical update -- g_vt's cursor/attributes and the scrollback
|
||||
* shadow still advance normally, only the actual framebuffer write is
|
||||
@@ -92,7 +92,7 @@ static ttf_raster_cache_t g_ttf_cache;
|
||||
static int g_terminal_visible = 1;
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
* FABRIC.md items 4.4t/4.4o/4.4u/4.4w/4.4x/4.4z tried a 640x480 CANVAS
|
||||
* FABRIC-0.md items 4.4t/4.4o/4.4u/4.4w/4.4x/4.4z tried a 640x480 CANVAS
|
||||
* box with a separate single-line REPL strip pinned below it -- a
|
||||
* confined region plus independent border-drawing/geometry bookkeeping
|
||||
* for both. Reverted 2026-08-12, simplified back to what this comment
|
||||
@@ -105,7 +105,7 @@ static int g_terminal_visible = 1;
|
||||
* --------------------------------------------------------------------- */
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
* FABRIC.md item 4.4q: REPL scrollback. Text-only (not pixel snapshots --
|
||||
* FABRIC-0.md item 4.4q: REPL scrollback. Text-only (not pixel snapshots --
|
||||
* at 1000 lines x ~cols bytes this is tens of KB; a pixel-snapshot ring
|
||||
* would be roughly three orders of magnitude larger for no benefit, since
|
||||
* the only consumer is a redraw). Only active in TTF mode (allocated in
|
||||
@@ -154,7 +154,7 @@ static uint32_t g_ring_cap = 0; /* active ring capacity -- VT100_BOOT_S
|
||||
static uint32_t g_scroll_offset = 0; /* 0 = live view */
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
* FABRIC.md item 4.4ac: boot-mode scrollback. font_8x16/bitmap-mode boot
|
||||
* FABRIC-0.md item 4.4ac: boot-mode scrollback. font_8x16/bitmap-mode boot
|
||||
* output (POST, capsule birth, self-tests, heartbeat) previously had no
|
||||
* scrollback at all -- g_shadow/g_ring above were only ever allocated in
|
||||
* vt100_enable_ttf(), so anything printed before the REPL took over was
|
||||
@@ -314,7 +314,7 @@ static void draw_cursor_glyph(uint8_t ch)
|
||||
uint32_t f = eff_fg();
|
||||
uint32_t b = eff_bg();
|
||||
|
||||
/* FABRIC.md item 4.4q: mirror every drawn character into the
|
||||
/* FABRIC-0.md item 4.4q: mirror every drawn character into the
|
||||
* scrollback shadow buffer, when active. */
|
||||
if (g_shadow && g_vt.cy < g_vt.rows && g_vt.cx < g_vt.cols) {
|
||||
g_shadow[(size_t)g_vt.cy * g_line_stride + g_vt.cx] = (char)ch;
|
||||
@@ -428,7 +428,7 @@ void vt100_init(void)
|
||||
|
||||
erase_display(2);
|
||||
|
||||
/* FABRIC.md item 4.4ac: allocate boot-mode scrollback now, at the
|
||||
/* FABRIC-0.md item 4.4ac: allocate boot-mode scrollback now, at the
|
||||
* bitmap cell geometry just computed above. Non-fatal on failure, same
|
||||
* pattern as vt100_enable_ttf()'s TTF allocation below: g_shadow/g_ring
|
||||
* stay NULL, draw_cursor_glyph()/scroll_up() already gate on that and
|
||||
@@ -483,7 +483,7 @@ void vt100_enable_ttf(void)
|
||||
g_ttf_ready = 1;
|
||||
}
|
||||
|
||||
/* FABRIC.md item 4.4ac: freeze the boot-mode scrollback buffers (if
|
||||
/* FABRIC-0.md item 4.4ac: freeze the boot-mode scrollback buffers (if
|
||||
* any -- vt100_init() may have failed to allocate them) before they
|
||||
* get overwritten below. g_vt.cols/rows/g_shadow/g_ring/g_line_stride/
|
||||
* g_ring_count/g_ring_head/g_ring_cap still hold boot-mode values at
|
||||
@@ -518,7 +518,7 @@ void vt100_enable_ttf(void)
|
||||
fb_fill_rect(0, 0, fb_width(), fb_height(), g_vt.def_bg);
|
||||
erase_display(2);
|
||||
|
||||
/* FABRIC.md item 4.4q: allocate the scrollback shadow + ring buffers
|
||||
/* FABRIC-0.md item 4.4q: allocate the scrollback shadow + ring buffers
|
||||
* now that cols/rows are fixed for the rest of this session. Failure
|
||||
* is non-fatal -- scrollback just stays unavailable (g_shadow/g_ring
|
||||
* stay NULL, every scrollback call site already checks), REPL text
|
||||
@@ -607,7 +607,7 @@ static void scrollback_redraw(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* FABRIC.md item 4.4y-revised: Alt+TAB graphics/text toggle, a two-state
|
||||
/* FABRIC-0.md item 4.4y-revised: Alt+TAB graphics/text toggle, a two-state
|
||||
* machine (VISIBLE <-> HIDDEN) with exactly one transition function --
|
||||
* both the physical Alt+TAB interception (repl.c) and the ALT+TAB FORTH
|
||||
* word (keyboard_words.c) call this same function, so there is exactly
|
||||
@@ -689,7 +689,7 @@ static void advance_cursor(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* FABRIC.md item 4.4q: push the rows about to be discarded into the
|
||||
/* FABRIC-0.md item 4.4q: push the rows about to be discarded into the
|
||||
* scrollback ring before the pixel scroll happens, then shift the shadow
|
||||
* buffer to match. `n` is clamped to g_vt.rows -- scrolling further than
|
||||
* a full screen at once cannot happen through this code path (advance_cursor
|
||||
@@ -739,7 +739,7 @@ static void scroll_up(uint32_t lines)
|
||||
* Erase operations
|
||||
* --------------------------------------------------------------------- */
|
||||
|
||||
/* FABRIC.md item 4.4i found this drawing a per-cell blank glyph
|
||||
/* FABRIC-0.md item 4.4i found this drawing a per-cell blank glyph
|
||||
* (font_8x16.c-specific, and inconsistent with erase_display(2)'s
|
||||
* full-screen case just below, which already used a plain rect fill).
|
||||
* 4.4j fixes both problems at once: a blank cell is visually identical to
|
||||
|
||||
Reference in New Issue
Block a user