Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,105 of 4,255    |
|    wolfgang kern to James Harris    |
|    Re: The EA jump immediately after enabli    |
|    24 Feb 22 18:51:41    |
      From: nowhere@nevernet.at              On 22/02/2022 11:12, James Harris wrote:       > On 21/02/2022 20:42, wolfgang kern wrote:       >> On 21/02/2022 19:35, James Harris wrote:       >       > ...       >       >>> What I am trying to prove is that once CR0.PE is set (and prefetch       >>> queues flushed) the processor will be in PM, not RM, even _before_ CS       >>> is reloaded.       >       > ...       >       >> assume or make your RM-CS 07c0 before the switch       >> and try this after it:       >> push cs       >> pop ax ;ax show the RM-segment and nothing else       >       > If the /user-visible/ part of CS is 07c0 then wouldn't that end up in AX       > in either mode?              Only in RM but not within PM, here AX would show a descriptor value.                     >> or try self-modify and check where the change happens:       >> mov word [cs:00FE],31c8 ;or whatsoever. might crash if PM              > I can't see how modifying the instruction stream would do anything. RM       > encodings are valid in PM16!              OK this wasn't a good example, I meant it as a crash test because       exceptions work quite different.              > Consider an instruction such as              > mov ds, ax       >       > In Protected Mode that would do       >       > DS.base = from descriptor       > DS.limit = from descriptor       > DS.access_rights = from descriptor       >       > Wouldn't it make sense for the same instruction in Real Mode to do as       > follows?       >       > DS.base = AX shl 4       > DS.limit = 0xffff       > DS.access_rights = unrestricted       >       > Then the same architectural parts (the hidden parts) could be used in       > either RM or PM. That would keep the hardware design simpler and more       > consistent than having two entirely separate modes.              X86 grew up in large steps, so we see historical remains here and there.              > In fact, surely the so-called Unreal Mode only works because the CPU       > uses the hidden parts of the segment registers at all times - even when       > in Real Mode (PE=0).              yes, Unreal may not be designed by intention, but it became handy :)       __       wolfgang              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca