Repository navigation
Modern - #280
Closed
kaleaditya28897-linux wants to merge 46 commits into
Closed
Modern#280kaleaditya28897-linux wants to merge 46 commits into
kaleaditya28897-linux wants to merge 46 commits into
Conversation
- build/Containerfile: Ubuntu 24.04 + ia16-gcc, nasm, upx, qemu, mtools - scripts/mdbuild.sh, mdtest.sh: build kernel and run QEMU boot test via podman - hdr/version.h: banner text only; INT 21h/30h version values unchanged - README: project goals, compatibility contract, roadmap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the dead 2009 LFN helper code with a working implementation: - lfnapi.c: long/short path translation layered on the existing 8.3 code, Win95 short alias generation (NAME~1.EXT), CP437 <-> UCS-2, find handles, FILETIME conversion. Implements 710D, 7139, 713A, 713B, 7141, 7143, 7147, 714E, 714F, 71A1, 7156, 7160, 716C, 71A0, 71A7, 71A8. Network/redirected drives still get AX=7100h. - fatfs.c: find_free reserves consecutive entries for the long name, directories grow by several clusters if needed, LFN entries are written after the 8.3 entry on create/mkdir/rename; rename can move an entry within its directory (case-only renames). - task.c: release a terminating process' search handles. - Remove the private AH=74h helper API and unused lfn_inode struct. - Enable WITHLFNAPI for FAT32 builds. Tests: tests/lfn boots the kernel in QEMU, runs 68 API checks, then verifies the image from Linux with mtools and fsck.fat. docs/modern-hooks.md documents the INT 2Fh/2Ah contract for the planned supervisor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Container image adds Open Watcom v2, DJGPP (GCC 12.2) and CWSDPMI. - mdbuild.sh builds GCC and Watcom kernels; removes the other compiler's objects/libraries between builds. - Watcom: LFN API left disabled; init and resident code share the 64K TGROUP and the LFN code does not fit. GCC is the reference build. - lfnapi.c: unsigned constants (Watcom -wx clean). - tests/lfn/djtest.c: 32-bit DJGPP program exercising long names via libc (fopen, readdir, rename, stat, getcwd, _truename, O_EXCL...), EXECed by the test shell; both kernels pass the boot test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MDVMM.COM loads from DOS after an XMS driver, moves a 32-bit core into a 16 MB XMS pool, enables paging and resumes DOS in V86 mode. - core (freestanding C + NASM, linked at 0xF0000000, loader independent): position independent start and page tables, GDT/IDT/TSS with I/O bitmap, PIC remapped to 20h, E9h debug log, pool allocator - monitor: IOPL 0, emulates CLI/STI/PUSHF(D)/POPF(D)/INT/IRET(D)/HLT with a virtual IF, reflects IRQs and exceptions into the DOS IVT, emulates INT 15h AH=87h for XMS, keeps A20 on (ports 60h/64h/92h trapped) - API: INT 2Fh AX=DE00h install check, DE01h log string - tests/mdvmm: QEMU boot with HIMEMX + FreeCOM; AUTOEXEC loads MDVMM and runs V86CHK, XMSTEST and the LFN suite inside the VM, powers off via APM from V86 - container: i686 cross gcc, FreeCOM and HIMEMX (FreeDOS 1.4) - lfntest /T: run as a normal program with an exit code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DJGPP programs now run under MDVMM without CWSDPMI. - dpmi.c: one 16/32 bit client at ring 3 (IOPL 3); LDT with 1024 entries; functions 0000-000C, 0100-0102, 0200-0205, 0300-0306 (16 real mode callbacks, raw switch), 0400, 0500-0503, 0600-0604, 0702/0703, 0800/0801, 0900-0902; memory paged from the pool with guard pages; exceptions to client handlers (DPMI 0.9 frame); IRQs to PM handlers from PM and from V86; INT 21h/4Ch from PM or RM releases the client - transitions via breakpoints: HLT stubs in the resident loader (V86) and a ring 3 host code page (PM); nested switches on a frame stack - trap frames save PM segment registers; 'espfix' IRET path so 16 bit client stacks do not see the monitor's ESP[31:16] - identity map above 1.1MB is supervisor only; pool default 32 MB - tests: DJTEST (libc LFN) and DPMITEST (24 MB, SIGSEGV/SIGFPE, PM IRQ0 handler chained to RM, RM callback, DOS memory, descriptors) run under MDVMM with no CWSDPMI on the disk Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to 4 preemptively scheduled DOS sessions sharing one kernel, as in Windows 386 enhanced mode. MDVMM NEW [cmd] forks a session that runs COMSPEC; Ctrl+Alt+F1..F4 switch the screen. - vm.c: private pages above MDVMM's resident block, instance data swapped on every switch, no switch inside DOS critical sections, keystroke queueing, shadow text video - dma.c: ISA DMA virtualization (translated addresses or a bounce buffer below 16MB), so floppy I/O lands in the right session - INT 15h AH=87h translates V86 addresses through the session's pages - kernel: WIN31SUPPORT in the GCC build; the instance table now lists only the swappable data area and private stacks, not the whole DOS data segment (global SFTs/buffers were restored stale on switches) - tests: SESSTEST checks preemption, hotkeys, DMA and file contents Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
modernDOS now boots on UEFI PCs without a CSM. BOOTX64.EFI (x64 UEFI application, PE32+ linked from ELF objects) reads \MODERNDOS\BOOT.IMG, takes the GOP framebuffer and a pool below 4GB, exits boot services, leaves long mode and starts the same MDVMM core as MDVMM.COM. The core provides the PC BIOS DOS needs (bootinfo v3, BOOT_UEFI): - rom.asm at F000:0000: BIOS services are HLT breakpoints handled in bios.c; IRQ0/IRQ1 handlers are real code, so vectors can be hooked; the DPMI stubs live there too, so DPMI works without MDVMM.COM - INT 10h text mode on RAM at B8000h, drawn on the framebuffer by fbcon.c (8x16 font from the Linux kernel, GPL-2.0), mirrored to COM1 - INT 13h on the disk image (floppy 00h), INT 16h/IRQ1 PS/2 keyboard, INT 1Ah/IRQ0 PIT and RTC, INT 11h/12h/14h/15h/17h/18h/19h - boots the image's boot sector at 0000:7C00 tests/uefi/run.sh boots OVMF in QEMU and runs V86CHK, LFNTEST and DJTEST, then types at the FreeCOM prompt via sendkey. The build image gains OVMF; mdtest.sh runs the new test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- UEFI loader: up to 64 MB contiguous DOS extended memory below 4GB (bootinfo v4: xms_phys, xms_size) - virtual BIOS: INT 15h E820h/E801h/88h report it at 1MB, the HMA maps to its first 64K; INT 15h AH=87h moves and DPMI 0800h translate the window (ext_phys). HIMEMX and DOS=HIGH work unchanged. - MDVMM without arguments under an already running monitor (UEFI boot) sets up DOS sessions and stays resident; DE06h returns DX=1 once set up - framebuffer moved to E1000000h: E0000000h is the DPMI host area (the clash hung DPMI exception delivery); address map documented in core.h - tests: the UEFI test runs the full MDVMM set (XMS, DPMI, sessions); SESSTEST watches the focus during the whole foreground run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- pci.c: configuration space (mechanism #1), bus scan, uncached MMIO mappings, microsecond delay - ahci.c: takes over every AHCI port with a SATA disk; IDENTIFY, READ/WRITE DMA (EXT), one polled command at a time, port recovery - bios.c: hard disks 80h+ from native drivers (struct disk): CHS functions (255/63 geometry) and EDD 41h/42h/43h/48h, BDA 40:75h; INT 16h AH=01h no longer yields (DOS polls it on every call for Ctrl+C, which made sessions switch on every DOS call) - MDVMM.COM embeds a core without the UEFI-only parts (nobios.c stubs): 35 KB instead of 54 KB, room under the 64 KB .COM limit - tests: DISKTEST on a 64 MB AHCI disk (MBR, FAT16) as C:, checked from Linux afterwards (fsck, 1 MB pattern file, FROMDOS.TXT) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- nvme.c: NVMe controllers (class 01:08:02): reset, admin queue, one polled I/O queue pair; every active namespace with 512-byte blocks is a BIOS hard disk (after the AHCI ports) - registers above 4GB (64-bit BARs, where OVMF puts NVMe): mmio_map uses 4MB PSE-36 pages (physical bits 32-39 in the PDE), the core keeps 32-bit paging; pci_bar() reads 64-bit BARs, AHCI uses it too - struct disk gains flush(): AHCI FLUSH CACHE (EXT), NVMe Flush; INT 13h disk resets (AH=00h/0Dh) commit the write cache - vm.c: Ctrl+Alt+Fn for the session that is already running left want == cur, which stopped round robin until that session ended - tests: a 96 MB NVMe disk as D: next to the AHCI disk as C:, both checked from Linux after the run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- xhci.c: xHCI controllers (class 0C:03:30): legacy support handoff, reset, command/event rings, device contexts; devices on root ports are addressed, the first HID boot keyboard interface gets eight queued interrupt transfers; event ring polled on timer ticks and INT 16h - usbkbd.c: boot reports -> scancode set 1 make/break codes, modifiers and extended keys; software typematic repeat (500 ms, ~9/s), locks do not repeat - vm.c: vm_key() queues scancodes for the focused session, delivered as a virtual IRQ1 with the byte at port 60h (INT 09h hooks and session hotkeys work); also with one session. HLT with a queued key injects it. - tests: all UEFI test input goes to a USB keyboard on xHCI; exact match of the typed line, a held key must repeat M3 (UEFI boot with native drivers) is complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- virtual BIOS (UEFI boots): VBE 3.0 with one mode, 141h, the GOP framebuffer (32 bpp linear): 4F00h-4F03h, 4F06h, 4F07h; the text console stops drawing while it is set and is redrawn on return - gui/: mdgui, a DJGPP library for 32-bit DPMI programs: picks and sets a 32 bpp LFB mode (DPMI 0800h mapping, own selector), back buffer, present with pixel layout conversion, clipped drawing (fill, lines, frame, gradient, blit), text in the 8x16 font shared with the monitor - tests/gui: GFXTEST draws a known pattern; the harness takes a QEMU screendump and checks pixels, on DOS boots (SeaBIOS VBE, 1024x768) and UEFI boots (virtual BIOS, 1280x800) - docs/gui.md: the M4 plan (M4.1-M4.5) and the graphics layer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- release/build.sh (scripts/mkiso.sh): modernDOS-<version>.iso with a DOS boot floppy (kernel, FreeCOM, HIMEMX, MDVMM, GFXDEMO, README), El Torito floppy emulation for BIOS CD boots and an EFI system partition (El Torito + appended GPT partition) for UEFI from CD or a USB stick written with dd - UEFI boots: native hard disks are read-only unless the boot volume has \MODERNDOS\DISKRW (bootinfo v5 flags), so a real PC's FAT partitions (e.g. its EFI system partition) are safe by default - tests/iso: boots the ISO in QEMU three ways; the UEFI test ESP gets DISKRW; the build image gains xorriso Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- virtual BIOS (UEFI boots): INT 33h mouse driver (mouse.c) fed by USB boot protocol mice; xhci.c configures up to two HID boot interfaces per device (keyboard, mouse); text mode cursor drawn by fbcon as an inverted cell; INT 2Fh AX=DE07h installs the driver after DOS has started (DOS resets INT 23h-3Fh), MDVMM without arguments calls it - mdgui: input layer (input.c): mouse move/down/up from the driver's press/release counters, keys from INT 16h, idle wait; software mouse cursor composed over the presented rows - DOS boots: CTMOUSE (FreeDOS) in the build image and the release floppy - tests: MOUSETEST driven through the QEMU monitor (mouse_move, mouse_button), click position and screenshot checks; exact on UEFI, direction only with CTMOUSE (it accelerates); QEMU limit 300 s, the DOS test's hotkey loop stops after the sessions test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- wm.c: windows with frames, title bars and close buttons, retained client surfaces, z-order and focus (a press raises), moving by the title bar, EV_CLOSE, mouse capture while a button is held, keys to the focused window; damage tracking, repaint of the desktop and the windows bottom to top clipped to the damage, then present - an original flat look: slate title bars, teal when active, red close button, gradient desktop - tests: WMTEST (three overlapping windows), wmdrive.py drags and raises with closed loop pointer steering (relative motion, CTMOUSE acceleration), wmcheck.py checks layout, z-order and pixels; SHOTS=dir keeps all screenshots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ui.c: labels, buttons, checkboxes, single-line text fields, lists with scroll bars, a menu bar with drop-down menus; actions on click, toggle, select, Enter and menu choice; Tab / Shift+Tab focus, keyboard use of every widget, F10 for the menus; unused events go on to the window's own handler - wm.c: popup windows (no title bar, closed by a press outside them) - tests: UITEST, driven by uidrive.py (typing, Tab+Space, list, OK, File/Quit by keyboard), uicheck.py (logged values and screenshot); guidrive.py: shared closed loop mouse steering; DJGPP programs linked with -s (the 1.44 MB test floppy was full) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- MDDESK: a panel with the launcher, a button per open window and a clock; launcher (click or F10): About (display, boot type and sessions through the MDVMM API, free memory), Run a DOS program (text mode, COMMAND.COM, back to the desktop on a key), Exit to DOS; /TEST logs for the harness; on the release image - mdgui: gfx_suspend/gfx_resume, wm_desktop (a panel band windows stay below, desktop drawing and events), ui_popup (a standalone popup menu, also used by the menu bar) - MDVMM: a DOS program a DPMI client starts no longer ends the client when it exits (INT 21h AH=4Ch is the client's exit only when DOS's current PSP is the client's); interrupts a DPMI client reflects to real mode reach the monitor's services (INT 2Fh AH=DEh, INT 15h AH=87h) like V86 INT instructions do - tests: deskdrive.py / deskcheck.py on both boot paths Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- MDDESK Files (gui/desk/files.c): a window per folder view; path field (folders, drives), Up, Refresh, New folder, Rename, Delete, Open; folders first, long file names, sizes and dates; Enter or a double click enters a folder or runs a program through the desktop - mdgui: list activate action (Enter, double click), dialogs ui_ask_text() and ui_confirm(); no redraw of a window an action closed - desk: desk.h for the applications, launcher items logged by name, tlog() with a bounded 8 KB buffer (a long file listing overflowed it) - tests: the desktop test creates, renames, opens and deletes a folder; docs/apps.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- mdgui: ui_edit(), a multi-line text widget (line array; typing, Enter, Backspace/Delete joining lines, arrows, Home/End, PgUp/PgDn, Ctrl+Home/End, Tab to 4 spaces, mouse caret, scroll bar), edit_set_text/edit_get_text (CRLF)/edit_modified/edit_caret - MDDESK Editor (gui/desk/editor.c): File menu (New, Open, Save, Save as, Close), Ctrl+S, status line, * in the title while modified, asks before discarding changes; LF or CRLF in, CRLF out; from the launcher and from Files (files that are not programs) - tests: the desktop test edits and saves a file from Files; the MDVMM test reads it back from the disk image Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- MDDESK Settings (gui/desk/settings.c): background and accent colour presets, 12/24-hour clock, mouse speed; applied live; Save writes MDDESK.CFG next to MDDESK.EXE, read when the desktop starts - mdgui: the colours are `theme` (theme.c); wm_redraw_all() sends EV_REDRAW so every window draws its contents again; input_set_speed() - desk: 12-hour clock, Settings in the launcher, /EXIT (start and leave, for tests) - tests: the desktop test changes and saves settings, a second MDDESK /TEST /EXIT must load them; colours checked in the screenshot Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- BOOTX64.EFI writes \MODERNDOS\HWINFO.TXT to the boot volume before anything else: firmware, SMBIOS model, CPU, GOP modes / UGA, PCI devices with BARs and IRQ lines, EFI configuration tables, memory map (for writing drivers for a real machine, e.g. an iMac7,1/8,1) - virtual BIOS: draining the keyboard controller is bounded and skipped when port 64h reads FFh (Macs have no i8042: it hung at start-up) - tests: the UEFI test reads HWINFO.TXT back from the ESP and checks it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- MDVMM nic.c: native network card drivers register a struct nic; DOS reaches the first one through INT 2Fh AX=DE10h (info: MAC, MTU, link), DE11h (send a frame) and DE12h (receive the next frame); polled, on DOS and UEFI boots (pci.c moves into the common core) - e1000.c: Intel 8254x/82574 family, legacy descriptor rings (32 rx, 16 tx, 2 KB buffers), MAC from RAL/RAH or the EEPROM - PKTDRV.COM: Packet Driver Specification 1.11 driver (class 1) on top of DE10h-DE12h, at INT 60h (or another vector); frames fetched on every timer tick, after sends and when DOS idles, two-call receiver upcalls - tests: NETCHK.COM sends an ARP request through the packet driver and waits for QEMU's gateway to answer; both test runs get an e1000 on QEMU's user network Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build/watt32.sh builds Watt-32 into /opt/watt32 in the build image: pinned snapshot (b619bfef, 2026-10-14) checked by SHA-256, makefile generators compiled from source (the snapshot's prebuilt binaries are not run); the Containerfile installs libfl2 (DJGPP ar) and libslang2-dev (mkmake) - build/watt32-errnos.sh generates DJGPP's errno tables by running Watt-32's errnos.c under DOS in QEMU; results kept in build/watt32/ - tests/net/run.sh: DOS and UEFI boots with an e1000 on QEMU's user network; PKTDRV, NETCHK (ARP), NETTEST (Watt-32: DHCP, TCP connection to a server run by the harness, line out and back) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the DPMI client belongs to the session it started in; the other sessions keep running around it (timer and Ctrl+Alt+Fn hotkeys from PM, switches with a PM frame saved, client IRQ handlers, DPMI entry and real mode exit detection only in its own session) - switch_to builds the next frame in its own buffer: a PM trap frame is 16 bytes shorter than struct frame and sits at the top of the stack - no switch while the DPMI host runs a monitor service for the client on a V86 frame that is never entered (vm_hold) - INT 2Fh AX=DE08h read a session's text screen and cursor, DE09h put keys into its BIOS keyboard buffer, DE0Ah-DE0Dh job slots (get, done, start, state) - SSHSLOT.COM: forks 1..3 job slot sessions that run COMSPEC jobs - tests: CONTEST.EXE (DJGPP) drives a shell in a slot and runs command jobs; network test in scripts/mdtest.sh; SHOTS=dir screenshots and logs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- net/ssh/SSHD.EXE (DJGPP + Watt-32): SSH 2 server with one modern algorithm set: curve25519-sha256 with strict KEX, ssh-ed25519 host key (made on first start, HOSTKEY.ED), chacha20-poly1305@openssh.com; re-keying - logins: ed25519 public keys from AUTHKEYS.TXT (authorized_keys format), optional password (SSHD /PASSWD, Argon2i hash in PASSWD.TXT); no default credentials, 6 tries, 2 minute login limit - sessions: "shell" runs COMMAND.COM in an MDVMM job slot, its text screen sent as ANSI/UTF-8 (CP437, scroll detection) and terminal keys typed into it; "exec" runs a command with its output redirected to a file that is sent back; "sftp" subsystem (protocol 3, used by sftp and scp) with drives as /A, /C, ... - crypto: Monocypher 4.0.2 (vendored, unmodified, BSD-2/CC-0), SHA-256, random numbers from TSC/8254 jitter, events and a seed file - the protocol code also builds on Linux (make host) for tests - tests: tests/ssh/host.sh against OpenSSH's ssh, sftp, scp (exec, exit status, 1 MB, key and password logins, refusals, re-keying); tests/ssh/run.sh boots modernDOS (DOS and UEFI) with SSHD and checks exec, sftp, an interactive shell, the host key, power off over SSH; both in scripts/mdtest.sh; the build image gets OpenSSH Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SSH.EXE [/P port] [/I key] [/L user] [/Y] [/T] [user@]host [command]: interactive sessions in an xterm-subset terminal on the 80x25 DOS screen (colours, 256/RGB mapped to 16, scroll regions, alternate screen, DEC line drawing, UTF-8 <-> CP437, DSR/DA replies; DOS keys to xterm sequences, ~. disconnects); commands with output on stdout and the remote exit code as ERRORLEVEL; no local wildcard expansion - logins: ed25519 key (ID.KEY, OpenSSH private key format, SSH /KEYGEN makes one and prints the authorized_keys line), then password or keyboard-interactive - host keys: KNOWNHST.TXT, ask on first contact (/Y: accept), refuse a changed key - logs go to stderr; the client does not log "network up" - tests: host.sh runs the client against SSHD and OpenSSH's sshd (exec, exit code, 1 MB, pty screen, OpenSSH key file, changed host key); run.sh boots SSH.EXE on modernDOS (DOS and UEFI) against OpenSSH Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ebuffer For the first boots on real hardware (an iMac8,1), where nothing can be watched from outside: - the monitor's log (kprintf) is drawn on the framebuffer until DOS starts and again on a panic (fbcon_log, double size on wide screens); \MODERNDOS\BOOTWAIT keeps it for 15 seconds (BOOTF_LOG_PAUSE) - apic.c: local APIC in virtual wire mode (LINT0 = ExtINT) with its own sources masked, I/O APIC entries masked, HPET legacy replacement off; a timer self test (8254 -> PIC, PIC -> CPU) logs the result instead of a silent hang; spurious APIC interrupts are ignored - loader: its messages also go to \MODERNDOS\BOOTLOG.TXT (saved after the report, on every failure and before ExitBootServices); Apple's console control protocol is switched to text mode - loader: without GOP, UGA graphics are used: four marker pixels are drawn and searched for in the display controllers' memory BARs, which gives the framebuffer address and the scan line length (\MODERNDOS\FBPROBE runs the probe beside GOP, for tests) - HWINFO.TXT is saved after every section, the PCI list first - release: the EFI system partition is 30 MB FAT16 (an El Torito EFI image must stay below 32 MB); "-dev" versions get BOOTWAIT; README - tests: uefi checks BOOTLOG.TXT, the probe against GOP, apic and timer lines; iso boots the ISO written to a larger writable stick twice and reads HWINFO.TXT/BOOTLOG.TXT back through the GPT (fsck clean), and boots like an older Mac (stick on EHCI, no GOP, no PS/2 controller) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The first boot on an iMac8,1 (Apple EFI 1.10, UGA only, 1680x1050x32, Radeon HD 2400 XT) did not find the framebuffer: single marker pixels, drawn while the firmware console was in text mode, were not in the video memory. - scan: fill the screen with one colour and rows 1 and 3 with another; a coarse search finds the screen, the two rows give the address of pixel (0,0) and the scan line length - poke: write a marker into the video memory page by page and read pixel (0,0), then (0,1), back through the firmware - both in the graphics console mode first (console control protocol), then in text mode; areas, fill status, the pixel read back and each result go to BOOTLOG.TXT - tests: with \MODERNDOS\FBPROBE both methods must agree with GOP - docs/hardware: the iMac8,1's HWINFO.TXT and its first BOOTLOG.TXT Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… the stick The second boot on the iMac reached the A:\> prompt: the framebuffer probe (scan, graphics console mode) found the UGA screen at C0010000 with 1728 pixels per line (docs/hardware/imac8,1-bootlog-2.txt). - uhci.c: UHCI host controllers, polled: HID boot keyboards and mice on root ports and behind hubs. EHCI controllers are taken from the firmware, reset and left unconfigured, so every port goes to its UHCI companion and USB 2.0 hubs run at full speed (no EHCI driver, no transaction translators). Devices are found at start-up. - yukon2.c: Marvell Yukon-2 (88E8036..88E8058) network driver, one port, polled, after the register descriptions of Linux's sky2. No emulator has the chip: untested until the next boot on the iMac. - nic: AX=DE13h driver state to the log, AX=DE14h copies the monitor's log out; MDLOG.COM shows it (MDLOG /N with the card's state) - \MODERNDOS\NONET: boot without network card drivers - release: BOOT.IMG is a 2.88 MB floppy with PKTDRV, SSHSLOT, SSHD, SSH, MDLOG, NET.BAT, WATTCP.CFG; AUTOEXEC starts NET.BAT when AUTHKEYS.TXT is there. PERSONAL=<dir> (scripts/mkiso.sh version dir) adds one's own AUTHKEYS.TXT and a fixed HOSTKEY.ED; README - tests: tests/usb/run.sh types at the DOS prompt through a USB keyboard on UHCI, behind a hub, and with EHCI + companions without a PS/2 controller; in scripts/mdtest.sh Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- UEFI monitor: network cards through iPXE's drivers (mdvmm/ipxe, pinned source in the build image); the hand-written Yukon-2 driver is gone. DOS boots keep the native e1000 driver. - Install on a machine's disk from a personal stick (GPT disks: the EFI system partition becomes C:), trial boots of an uploaded build with a watchdog (TRYBOOT, KEEP, MDSYS), scripts/mdpush.sh for updates over SSH. - The system directory is \MDOS (a name plain DOS can open). - MDDESK: Terminal (a DOS session in a window, UEFI boots) and Browser (http, pages laid out as text); UI_CANVAS widget in mdgui. - PKG: package manager with ed25519-signed package lists (net/pkg), scripts/mkrepo.sh. - UEFI boot disk image of 8 MB with the SSH client and PKG; AUTOEXEC.BAT starts the job slots and the packet driver; SSHSLOT returns when its sessions are ready; only the packet driver's session receives frames. - Tests: install, pkg, more network cards, terminal and browser checks. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Found on the iMac8,1: after the install the stick boots on with the machine's disks read-only, AUTOEXEC.BAT saw C:\MDOS\BOOT.IMG, tried to write the SSH keys there and stopped at "Error writing to drive C:". - monitor: INT 2Fh AX=DE15h bit 3 = hard disks can be written - MDSYS DISK: exit code 0 writable, 1 read-only - AUTOEXEC.BAT asks before it uses C:\MDOS; a personal stick starts the SSH server with the keys on A: - tests/install: the stick's boot is followed past the install Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- build image: BearSSL 0.6 (pinned, checked) for DJGPP and the host, with the trust anchors of the image's ca-certificates (build/bearssl.sh) - net/pkg/tls.c: TLS 1.2 client connections, certificates checked against the built-in authorities, the host name and the clock - HTTP client: https://, HTTP/1.1 with Content-Length and chunked bodies, headers up to 16 KB - browser: https pages, links without a scheme keep the page's scheme, a start page of sites that read well as text - HTTPGET (a test program), tests/pkg/internet.sh: real sites from modernDOS in QEMU (needs internet access; not in mdtest.sh) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- MDVMM.COM: an MZ file laid out like a .COM with the 32-bit core appended; the loader reads it from its own file, so the core is no longer held to 64 KB. The DOS core now has iPXE's network drivers too (the native e1000 driver is gone); pit_wait moved to lib.c. - release: modernDOS-<version>-bios.img, a hard disk image (own MBR, 64 MB FAT16) for a USB stick or disk: the system in C:\MDOS with the desktop, browser, SSH server and client, PKG. - sessions on DOS boots: memory below 640K is copied on a switch instead of remapped (linear = physical), and no switch happens inside INT 13h. A BIOS that runs its disk code in system management mode (USB sticks) reads buffers and stacks by physical address: a second session's disk access hung the machine. The BIOS's own memory above 40:13 is shared. - tests: tests/bios (IDE disk, USB stick, restart, persistence), network cards on DOS boots (rtl8139, pcnet, virtio, i82559er, e1000e). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…keyboard - dpmi: the host's state belongs to the running session and is swapped on a switch; each session's clients have a slice of the linear address space. A client can start a program that becomes a client itself (the desktop's Run with a DJGPP program, four deep). - nic: one card for all sessions. Frames are sorted by connection (the session that sent on it), by accepted port, else to every session that polls; resets and ICMP unreachable for segments that were not a stack's own are dropped. PKTDRV is loaded before the sessions and polls only with a receiver. - keyboard: the monitor takes every scancode from the controller and gives it to the focused session as its own keyboard interrupt, one at a time; the controller's status (port 64h) says a scancode waits. SeaBIOS looks there first and dropped keys the monitor had taken; the stale scancode was then read in place of a mouse byte (lost keys and clicks in about one test run of four). - DOS boots: no session switch inside BIOS services INT 10h-1Ah (SeaBIOS runs them on one stack of its own), the wait for a key is done by the monitor; interrupt returns the monitor must hear of go through a second stack frame to a breakpoint. A session that is not on the display does not reach the video hardware (VGA port writes dropped, text mode sets done in its own screen memory, graphics mode sets wait). - the desktop's Terminal works on DOS boots; tests: a DPMI program in the terminal and from Run on both boots, HTTPGET beside the SSH server. (DPMITEST's "malloc 24 MB" fails there by design: less memory is free beside the desktop.) - build image: FreeDOS FDISK, FORMAT, XCOPY for the BIOS edition's INSTALL. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
INSTALL.BAT on the BIOS disk image: INSTALL GO (an existing FAT partition), INSTALL NEW (one partition on an empty disk), INSTALL FORMAT (format, then install), with the kernel's SYS and FreeDOS FDISK, FORMAT, XCOPY on the image. tests/bios: from a USB stick onto an empty IDE disk, then the disk alone starts with the same SSH host key. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- ISO: a BIOS starts the BIOS edition's disk image from CD (El Torito hard disk emulation) instead of the 2.88 MB floppy image, which is gone. The disk is read-only there: MDSYS WRITE tells AUTOEXEC.BAT, which then keeps nothing and points to INSTALL. - mdgui input: the button state was read before the press count; a press that came in between was reported as pressed and released at once (a window drag lost in about one test run of three on DOS boots). - tests/install removes all images it builds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…sts/compat tests/compat runs one program as 16-bit real mode, under DOS/4GW, PMODE/W, DOS/32A and CauseWay, and compiled on modernDOS by the DOS-hosted Open Watcom compiler - on the BIOS edition (run.sh) and on a UEFI boot (uefi.sh). What it took: - v86: MOV r32,CR0 is answered (protected mode on), other control and debug register moves are ignored; an instruction a program cannot use (LIDT, a switch to real mode) ends the program, not the machine. - v86: the I/O privilege level in the flags reads 3 and cannot be changed, as under EMM386 and Windows (DOS/32A took the machine for real mode). - dpmi: the client's protected mode handlers come first, also for INT 31h (CauseWay's services) and INT 21h AH=4Ch (DOS/4GW's cleanup: it left INT 15h pointing into freed memory, the next DOS/4GW program failed). - dpmi: selector 0040h is the BIOS data area (DOS/4GW reads the timer there; a divide error when the compiler was started by its driver). - v86: a vector a program leaves pointing into its own memory when it ends is put back; dpmi: vectors left on a client's callbacks too. - dpmi: the state of clients that wait for one they started was kept at the linear address of the UEFI framebuffer; it has a range of its own. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A UEFI machine has no video BIOS to set VGA modes. For mode 13h (320x200, 256 colours) the monitor is the display card (mdvmm/core/vga.c): memory at A0000h, the palette (DAC ports and INT 10h AH=10h), the status port, pixel functions, and the picture drawn enlarged on the framebuffer about 30 times a second. V86 programs reach the ports through the I/O bitmap; DPMI clients, which have I/O privilege, through I/O breakpoints in the debug registers. A program that ends in the mode gets the text screen back. tests/compat (both editions): a mode 13h program in real mode and under DOS/4GW - palette through ports and BIOS, pixels, a screenshot of the picture. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…turn fixes Found with a game (Kiloblaster) and by the test runs after it: - Time slices and the monitor's timeouts are measured in real time (the time stamp counter), not in timer interrupts: a program that sets the timer to many times its rate made the sessions switch at that rate. - A session gets the timer ticks it missed while it was not running, as timer interrupts of its own (to a DPMI client's handler first), and is not switched out inside one. Before, only its BIOS tick count was moved on. - After a BIOS service or a keyboard handler returns through the monitor's breakpoint, pending interrupts are delivered, as at an IRET. A timer interrupt that came inside the BIOS stayed pending and in service: a loop that only reads the time through the BIOS hung. - Port 60h reads the last scancode again when there is no new one (a game's keyboard handler reads it twice). - Keyboard off/on commands (ADh, AEh) a session sends to the controller are swallowed: a BIOS keyboard handler sends AEh after every key, and a scancode waiting in the controller then went missing (letters typed with Shift, about every other test run). - The keystroke queue of a session holds 128 scancodes; a dropped or unread one is logged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- vga.c: the sequencer, graphics and CRT controller registers; with chain-4 off the four planes, write modes 0-3, latches, read modes, and the picture from the CRT controller's start address, row offset and height (page flipping, 320x240). A0000h is unmapped in that mode. - vgaemu.c: the instructions that reach video memory then, run by the monitor: MOV, MOVS/STOS/LODS with REP, the arithmetic and logical ones, TEST, XCHG, INC/DEC, NOT/NEG, MOVZX/MOVSX; 16 and 32 bit code, V86 mode and DPMI clients. - DPMI clients' access to the card's ports: I/O breakpoints over 3C0h-3DFh (four of eight ports), port and size read from the instruction. - tests/compat/game.sh: Kiloblaster (1992, freeware; in the build image, pinned - build/games.sh) started on the BIOS edition and on a UEFI boot; its still screens must look the same on both. - MDLOG /N also logs where every session is and the last lines of the background sessions' screens; tests/bios shows that, a screenshot and the CPU's place when a step fails. Known: INSTALL FORMAT over SSH hangs in about one run of five (the installer's job waits for a key; not yet found which program asks). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- A session that gives up the CPU is idle until the next timer tick; when all are, the monitor waits for the next interrupt instead of going round the idle sessions. On DOS boots every switch copies the sessions' memory, and the machine did little else (suspected behind the intermittent failures of tests/bios: a read error from the USB stick in the install job, SSH timing out - not yet confirmed by a run of tests). - Ctrl+Alt+F12 writes where every session is to the log (as MDLOG /N does), with the last lines of the background sessions' screens. - A disk read or write of the machine's BIOS that comes back with an error status is logged. - tests/bios: on a failed step, that log, a screenshot, the CPU's place. Tested so far: tests/bios once. The full suite has not run on this. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…clock Corrects 8296ae8 (the CPU rests when every session is idle), which broke the MDVMM, UEFI and INSTALL tests. - sessions: the idle rest reworked: the sessions go round as before, and the CPU rests once per round when all of them gave up the CPU in turn. - keyboard: a DPMI client's own keyboard handler reads the controller itself (clients have I/O privilege; every DJGPP program has one, for Ctrl+C). It took the next waiting scancode in place of the one it was called for, and that keystroke was lost. The scancode is now put into the controller for the handler (keyboard interface off, what waits there into the queue, command D2h). - sessions: the timer interrupt at which a session is switched out went to the next session only; the one that left gets it later. A session with work lost about every other tick while the others were idle. - USB keyboards: key repeat by the clock, not by timer ticks (every session has its ticks; missed ones come in a burst and a held key repeated many times). - trial boot: its timeout by the clock as well; the tests' fast timeout is two minutes. - sshd: jobs run with COMMAND /F: a DOS critical error fails, nobody is there to answer the prompt. - Ctrl+Alt+F12 and INT 2Fh AX=DE13h also log the interrupt state and the network state of the sessions. - tests: the game is started while the BIOS tick count's low byte is small (its speed measurement takes the byte for a signed number and hangs from 123 to 127, on any PC); state dumps on failures (game, DPMITEST timer check, BIOS edition with command times). Known: on the BIOS edition the SSH server once in a while accepts a connection and then does not answer (seen twice in full test runs, not in 10 runs of tests/bios alone); the dump above is there for it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…time - vga: modes 0Dh (320x200), 0Eh (640x200), 10h (640x350) and 12h (640x480) in 16 colours: the four planes with a bit per pixel, the attribute controller's palette registers (ports 3C0h/3C1h, INT 10h AH=10h) in front of the DAC, the BIOS's palettes for the 200 line and the other modes. Drawn only when memory, a register or the palette changed. - vga: INT 10h in the graphics modes, also 13h: pixels (0Ch, 0Dh), text (0Eh, 09h, 0Ah, 13h; the 8x16 font, 14 and 8 lines of it in the 350 and 200 line modes), scrolling (06h, 07h). AH=0Fh gives the mode's columns. - tests/compat: ega.c draws through the card's registers (set/reset, write mode 2, map mask, bit mask and latches, read modes 0 and 1), the attribute controller and the BIOS, in real mode and under DOS/4GW; egacheck.py checks the picture, on the emulated VGA card (BIOS edition) and on the monitor's VGA (UEFI) alike. - USB keyboards: key repeat counts only time in which the keyboards were asked (a machine busy elsewhere for half a second made a key repeat); a repeat's first occurrence goes to the log. - nic: counters per session (frames received, lost at a full queue, sent; frames nobody took; failed sends) in the state dump of Ctrl+Alt+F12 and INT 2Fh AX=DE13h. - tests: the game's start key just after the tick range its speed measurement hangs in; USB test shows the screen on a failure; BIOS test dump with the monitor's vm and nic lines. Known, both rare and not reproduced on demand: the SSH server on the BIOS edition accepting a connection without answering; a key repeating in MDDESK on a UEFI boot with a USB keyboard (tests/uefi, about 1 run in 13) - the log line above is there for it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical issues risk filesystem corruption, cross-session state loss, signing-key exposure, and acceptance of truncated HTTPS responses as successful.
12 open issues
Keep redirected file I/O inside the critical section · New Move LFN search handles into per-VM state · New Create signing keys securely without following symlinks · New Do not treat abrupt TLS socket closure as clean EOF · New Use per-invocation staging paths to prevent push collisions · New Preserve entry AX before beginning the DOS critical section · New Report output-file open failures instead of succeeding · New Reject package names that collide after 8.3 truncation · New Sign the complete index or reject oversized files · New Require every BIOS reference screen to match on UEFI · New Stop scanning and reject truncated screenshot headers · New Reuse one disk GUID in both GPT headers · New
What changed in this PR
This PR expands the FreeDOS-based kernel into modernDOS, adding supervisor integration, UEFI support, networking, desktop infrastructure, and extensive compatibility tests.
Changes:
- Enables native long filenames and per-session kernel integration.
- Adds boot, networking, package, graphics, and system-control components.
- Introduces containerized build/release tooling and automated tests.
| File | Description |
|---|---|
| tests/pkg/run.sh | Tests package operations under UEFI. |
| tests/pkg/internet.sh | Tests HTTPS and certificate rejection. |
| tests/pkg/host.sh | Tests package integrity on Linux. |
| tests/net/nettest.c | Exercises TCP connectivity. |
| tests/mdvmm/xmstest.asm | Checks XMS memory transfers. |
| tests/mdvmm/v86chk.asm | Checks monitor presence. |
| tests/mdvmm/poweroff.asm | Powers off test machines. |
| tests/lfn/run.sh | Runs long-filename integration tests. |
| tests/lfn/djtest.c | Tests long filenames through DJGPP. |
| tests/install/mkgpt.py | Creates installation-test GPT images. |
| tests/gui/wmtest.c | Exercises window management. |
| tests/gui/wmdrive.py | Automates window interactions. |
| tests/gui/wmcheck.py | Checks window positions and rendering. |
| tests/gui/uitest.c | Exercises toolkit widgets. |
| tests/gui/uidrive.py | Automates widget interactions. |
| tests/gui/uicheck.py | Checks widget behavior and rendering. |
| tests/gui/ppm2png.py | Converts screenshots to PNG. |
| tests/gui/mousetest.c | Exercises mouse input. |
| tests/gui/mousedrive.py | Automates mouse movements. |
| tests/gui/mousecheck.py | Checks mouse results and cursor rendering. |
| tests/gui/guidrive.py | Shares GUI automation helpers. |
| tests/gui/gfxtest.c | Draws graphics test patterns. |
| tests/gui/gfxshot.py | Captures graphics screenshots. |
| tests/gui/gfxcheck.py | Validates graphics output. |
| tests/compat/vgawatch.py | Captures VGA test screens. |
| tests/compat/vgacheck.py | Checks VGA colors. |
| tests/compat/vga.c | Tests legacy VGA behavior. |
| tests/compat/hello.c | Exercises basic DOS compatibility. |
| tests/compat/gameplay.py | Automates game startup and capture. |
| tests/compat/gamecheck.py | Compares BIOS and UEFI game screens. |
| tests/compat/egacheck.py | Checks planar graphics output. |
| scripts/mkrepo.sh | Wraps repository generation in the container. |
| scripts/mkiso.sh | Wraps release-image creation. |
| scripts/mdtest.sh | Runs the integrated test suite. |
| scripts/mdpush.sh | Uploads builds for remote trial boots. |
| scripts/mdenv.sh | Shares container execution helpers. |
| scripts/mdbuild.sh | Builds kernels, monitor, and desktop. |
| release/README.TXT | Documents booting and system usage. |
| release/mbr.asm | Boots active BIOS partitions. |
| README.md | Introduces modernDOS and its roadmap. |
| net/ssh/term.h | Defines terminal-emulator interfaces. |
| net/ssh/ssh.h | Defines SSH transport interfaces. |
| net/ssh/sha256.h | Declares SHA-256 operations. |
| net/ssh/sftp.h | Declares SFTP request handling. |
| net/ssh/rng.h | Declares random-generator interfaces. |
| net/ssh/rng.c | Implements entropy mixing and random output. |
| net/ssh/plat.h | Defines SSH platform services. |
| net/ssh/Makefile | Builds DOS and host SSH programs. |
| net/ssh/keyfile.h | Declares SSH key-file operations. |
| net/ssh/crypto/README | Records cryptographic dependency provenance. |
| net/ssh/crypto/monocypher-ed25519.h | Adds Ed25519 and SHA-512 interfaces. |
| net/ssh/console.h | Defines console translation interfaces. |
| net/ssh/buf.h | Defines SSH encoding buffers. |
| net/pkg/tls.h | Declares TLS client interfaces. |
| net/pkg/tls.c | Implements certificate-checked TLS connections. |
| net/pkg/pkgsign.c | Generates repository keys and signatures. |
| net/pkg/mkrepo.sh | Builds signed package repositories. |
| net/pkg/Makefile | Builds package and HTTP utilities. |
| net/pkg/httpget.c | Adds a download utility. |
| net/pkg/http.h | Declares shared HTTP client interfaces. |
| mkfiles/generic.mak | Explains Watcom’s LFN build limitation. |
| mkfiles/gcc.mak | Enables LFN and supervisor hooks. |
| mdvmm/uefi/start.asm | Transfers control from UEFI to the core. |
| mdvmm/uefi/loader.h | Shares loader interfaces. |
| mdvmm/uefi/efi.ld | Defines EFI executable layout. |
| mdvmm/mdsys/mdsys.asm | Adds system and trial-boot controls. |
| mdvmm/mdlog/mdlog.asm | Exposes monitor logs. |
| mdvmm/loader/mz.asm | Defines the DOS loader executable layout. |
| mdvmm/ipxe/overlay/ipxe/errno/mdvmm.h | Selects iPXE error definitions. |
| mdvmm/ipxe/overlay/config/defaults/mdvmm.h | Configures iPXE for the monitor. |
| mdvmm/ipxe/ipxe.lds | Combines iPXE driver sections. |
| mdvmm/ipxe/glue_data.c | Supplies iPXE integration globals. |
| mdvmm/ipxe/drivers.list | Selects network drivers. |
| mdvmm/ipxe/core.list | Selects required iPXE components. |
| mdvmm/ipxe/build.sh | Builds the embedded iPXE object. |
| mdvmm/include/bootinfo.inc | Defines assembly boot-information layout. |
| mdvmm/include/bootinfo.h | Defines the shared boot contract. |
| mdvmm/core/romimg.asm | Embeds the virtual BIOS image. |
| mdvmm/core/rom.asm | Implements virtual BIOS interrupt stubs. |
| mdvmm/core/pci.c | Adds PCI access and device-memory mapping. |
| mdvmm/core/nobios.c | Supplies BIOS-build substitutes. |
| mdvmm/core/main.c | Initializes the monitor and dispatches traps. |
| mdvmm/core/ipxenic.c | Connects iPXE drivers to monitor services. |
| mdvmm/core/cpu.c | Configures CPU tables and interrupts. |
| mdvmm/core/core.ld | Defines monitor memory layout. |
| mdvmm/compile_flags.txt | Supplies editor compilation flags. |
| kernel/task.c | Releases process-owned LFN searches. |
| kernel/proto.h | Updates native LFN declarations. |
| kernel/kernel.asm | Defines per-session instance regions. |
| kernel/inthndlr.c | Integrates LFN dispatch and session tables. |
| kernel/entry.asm | Adjusts DOS critical-section boundaries. |
| hdr/win.h | Declares session instance-table structures. |
| hdr/version.h | Updates the kernel display name. |
| hdr/fnode.h | Removes obsolete LFN helper structures. |
| gui/Makefile | Builds graphics library and desktop. |
| gui/lib/theme.c | Defines desktop theme colors. |
| gui/lib/text.c | Implements bitmap text drawing. |
| gui/desk/desk.h | Shares desktop application interfaces. |
| docs/modern-hooks.md | Documents supervisor integration hooks. |
| docs/lfnapi.txt | Documents native LFN support. |
| docs/hardware/imac8,1-bootlog-3.txt | Records framebuffer detection diagnostics. |
| docs/hardware/imac8,1-bootlog-2.txt | Records another hardware boot trace. |
| docs/hardware/imac8,1-bootlog-1.txt | Records an earlier framebuffer failure. |
| build/watt32/djgpp.err | Supplies DJGPP network error constants. |
| build/watt32.sh | Builds pinned Watt-32 sources. |
| build/watt32-errnos.sh | Generates DOS error tables. |
| build/ipxe.sh | Retrieves verified iPXE sources. |
| build/games.sh | Prepares the compatibility-test game. |
| build/Containerfile | Defines the build and test environment. |
| build/bearssl.sh | Builds TLS libraries and trust anchors. |
| .gitmodules | Ignores untracked country-submodule files. |
| .gitignore | Excludes generated artifacts. |
| .gitattributes | Sets line endings for new components. |
Review effort: Balanced
Comment on lines
+385
to
+389
| %IFDEF WIN31SUPPORT ; begin critical section: everything but the | ||
| ; character I/O functions (01h-0Ch), which only | ||
| ; use per-VM (instance) data and may block for | ||
| ; keyboard input, so a supervisor can switch VMs | ||
| call begin_dos_crit_sect |
Comment on lines
+975
to
+977
| dw 0, 0, inst_sda_end - inst_sda_start | ||
| dw 0, 0, inst_stk_end - inst_stk_start | ||
| dw 0, 0, _p_0_tos - inst_p0_start |
| if (argc == 3 && !strcmp(argv[1], "keygen")) | ||
| { | ||
| FILE *r = fopen("/dev/urandom", "rb"), *f; | ||
| if (!r || fread(seed, 1, 32, r) != 32 || !(f = fopen(argv[2], "w"))) |
Comment on lines
+133
to
+136
| /* a closed connection ends the data (HTTP/1.0 bodies end that way, and | ||
| many servers do not send TLS's own end mark) */ | ||
| return br_ssl_engine_last_error(&t->sc.eng) == BR_ERR_OK || | ||
| br_ssl_engine_last_error(&t->sc.eng) == BR_ERR_IO ? 0 : -1; |
| echo "build: $ISO" | ||
| # the two files of a build are on the ISO's EFI partition | ||
| . "$ROOT/scripts/mdenv.sh" | ||
| cp "$ISO" "$ROOT/_output/push.iso" |
Comment on lines
+10
to
+11
| for d in "$S"/*/; do | ||
| n=$(basename "$d"); f=$(echo "$n" | tr a-z A-Z | cut -c1-8).TAR |
Comment on lines
+75
to
+76
| n = fread(data, 1, sizeof(data), f); | ||
| fclose(f); |
| print(" a screen of %d colours: %.1f%% of its pixels differ on UEFI" % (colours(p), best * 100)) | ||
| if best < 0.02: | ||
| matched += 1 | ||
| return 0 if matched else 1 |
Comment on lines
+22
to
+23
| while not data[end:end + 1].isspace(): | ||
| end += 1 |
Comment on lines
+22
to
+24
| def header(this, other, table): | ||
| h = struct.pack("<8sIIIIQQQQ16sQIII", b"EFI PART", 0x10000, 92, 0, 0, this, other, 34, sectors - 34, | ||
| uuid.uuid4().bytes_le, table, 128, 128, zlib.crc32(entries)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.