Skip to content

[kernel] XMS enhancements and fixes around new LOADALL block move#2327

Merged
ghaerr merged 2 commits intomasterfrom
loadall2
May 4, 2025
Merged

[kernel] XMS enhancements and fixes around new LOADALL block move#2327
ghaerr merged 2 commits intomasterfrom
loadall2

Conversation

@ghaerr
Copy link
Copy Markdown
Owner

@ghaerr ghaerr commented May 4, 2025

Fixes LOADALL CX not saved in last PR #2326 (comment).

Adds several new enhancements / bug fixes as a result of our new LOADALL implementation:

  • Disables interrupts at start of int15_fmemcpyw since xms_fmemcpyw, which calls it, is called at interrupt time by the direct floppy driver. Looking into getting rid of static GDT data structure, but too large to place on kernel stack as an array[8].
  • Always reenables interrupts on return from BIOS 15/1F calls; previously only did on error return for some reason?
  • Allow xms=int15 to force INT 15/1F even on 80286 systems. Otherwise, xms=on will use LOADALL for 286, and unreal mode for 386 CPUs.
  • Rewrote loadall_block_move function prologue for speed, remove multiple push/pop of segment registers.
  • Fixed auto-disabling XMS when INT 15/1F specified w/kernel HMA, since INT 15/1F disables A20 gate.
  • Changed GDT access bytes to standard 0x92 for data segments for consistency throughout kernel and LOADALL code.
  • Added internal XMS_LOADALL xms_enabled state when running LOADALL block move.

Tested on pcEM for IBM PC only. PC-98 should work fine but needs testing. Hopefully @drachen6jp and @tyama501 can test PC-98 on real hardware.

@ghaerr ghaerr merged commit a21ada3 into master May 4, 2025
1 check passed
@ghaerr ghaerr deleted the loadall2 branch May 4, 2025 16:01
@drachen6jp
Copy link
Copy Markdown
Contributor

drachen6jp commented May 5, 2025

boot ok with hma and XMS.
but don't run ramdisk command,both pc/at and pc98.

#2329
afiter fixed cx problem.
but mount /dev/ssd could't success. thank you

@ghaerr
Copy link
Copy Markdown
Owner Author

ghaerr commented May 5, 2025

Thank you for testing. I'll take a look at ramdisk and /dev/ssd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants