Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
RayeR

Homepage

CZ,
23.01.2024, 08:10
 

some modern UEFI/CSM leaves CR0.WP set at boot (Developers)

Not sure if this can cause issues also under DOS with JEMM/DPMI, interesting reading...

https://msfn.org/board/topic/183200-z690-vcache-protection-error/?do=findComment&comment=1255745

---
DOS gives me freedom to unlimited HW access.

Japheth

Homepage

Germany (South),
23.01.2024, 13:24
(edited by Japheth, 23.01.2024, 13:56)

@ RayeR

some modern UEFI/CSM leaves CR0.WP set at boot

> Not sure if this can cause issues also under DOS with JEMM/DPMI,

Not with Jemm or Hdpmi. I'm aware of this possibility since at least 10 years and ensured that it's no problem.

That doesn't mean that it's irrelevant. The Deb386 ring 0 debugger may cause page faults if the WP bit is set and the G(o) cmd is used with a breakpoint argument. That's why the little tool ResWP.exe is supplied with the debugger - guess what it does! Most DPMI host won't set page table attributes to R/O, but HX's DPMILD32 does so for code sections.

---
MS-DOS forever!

RayeR

Homepage

CZ,
23.01.2024, 18:44

@ Japheth

some modern UEFI/CSM leaves CR0.WP set at boot

It seems to me logical to set WP for code sections. Noone should overwrite code if it's not intentional e.g. like when using debugger to do some black magic. So I don't fully understand how VCACHE triggered page fault - by writing to some area where it shouldn't wrote or windows kernel didn't initialized page tables properly so they leaved RO by UEFI but shouldn't be? So probably not an issue for DOS users. But maybe it would be usefull to add this workaround in himemx if someone would intend to use it together with both dos 7.x and Win 9x...

---
DOS gives me freedom to unlimited HW access.

Rugxulo

Homepage

Usono,
23.01.2024, 23:41

@ Japheth

some modern UEFI/CSM leaves CR0.WP set at boot

> That's why the little tool ResWP.exe is supplied with the debugger

Curious as to why you put a redundant ".286" at the beginning and then almost immediately change it to ".386p" (which admittedly is necessary).

Why .EXE instead of .COM?

Why "mov ah,4Ch int 21h" when (IIRC) MASM v5 supports ".exit"?

Wouldn't "ResetWP.exe" be more descriptive?

(Sorry for the nitpicking.)

Japheth

Homepage

Germany (South),
24.01.2024, 07:23

@ Rugxulo

some modern UEFI/CSM leaves CR0.WP set at boot

> Curious as to why you put a redundant ".286" at the beginning and then
> almost immediately change it to ".386p" (which admittedly is necessary).

because a coding of

    .386p
    .model tiny


would actually init a "32-bit tiny" memory model ( the one used by djgpp ), which definitely is wrong and would cause a crash. So this slightly "complicated" way used in ResWP.asm seems quite appropriate to me.

> Why .EXE instead of .COM?

Because i like MZ binaries more.

> Why "mov ah,4Ch int 21h" when (IIRC) MASM v5 supports ".exit"?

Because I don't like ".exit".

> Wouldn't "ResetWP.exe" be more descriptive?

Definitely!

:-D

---
MS-DOS forever!

Back to the board
Thread view  Mix view  Order
22049 Postings in 2034 Threads, 396 registered users, 112 users online (0 registered, 112 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum