OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:30 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: kernel load address > 1MB access in realmode
PostPosted: Sat Dec 03, 2022 4:20 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
rdos wrote:
I checked my copy code again, and I actually reload cs like you are supposed to, but I'm still not sure if this is required.

It is required. Intel makes it very clear that skipping this step can cause random crashes. I suspect it's caused by the RSM instruction faulting due to an invalid saved state, but Intel doesn't elaborate.

rdos wrote:
I can see one potential problem with the code. You never reload ds and es with selectors with a 64k limit, which means you leave the copy procedure with "unreal mode" selectors.

Is this really a problem? Code that expects to run in real mode won't access beyond 64k in the first place, so should be fine to leave it be.

mtbro wrote:
Isn't es segment in es:edi implied?

All of the operands are implied. You only need to write them if you want to ensure the assembler emits the correct prefixes instead of using the defaults.

mtbro wrote:
when does data selector reloading take effect ?

In protected mode, a segment load updates all segment attributes. In real mode, a segment load updates the base but does not update the limit (and may or may not update other segment attributes - that part is undefined behavior).

nullplan wrote:
it does not use an interrupt from the HC to trigger that, it just checks on the pipe in the timer interrupt

Huh, that's interesting. Every other BIOS I've seen uses SMM to emulate a PS/2 keyboard.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], thewrongchristian and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group