There was a problem returning from long mode to real mode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
7 posts • Page 1 of 1
ccya
Posts: 5
Joined: Sun Feb 12, 2023 3:56 pm
Libera.chat IRC: ssensei
Location: 中国

There was a problem returning from long mode to real mode

Post by ccya »

I'm not currently writing any drivers in 64-bit long mode, so I'm going to use the BIOS as a driver, but I'm experiencing a triple glitch and return address error when returning 16-bit real mode from 64-bit long mode

Code I referencedviewtopic.php?f=1&t=23125


》I am from China and use translators to communicate
Last edited by ccya on Thu Jul 27, 2023 5:58 pm, edited 2 times in total.
Octocontrabass
Member
Member
Posts: 5968
Joined: Mon Mar 25, 2013 7:01 pm

Re: There was a problem returning from long mode to real mod

Post by Octocontrabass »

ccya wrote:I'm going to use the BIOS as a driver
This does not work with UEFI.
ccya wrote:I'm experiencing a triple glitch and return address error when returning 16-bit real mode from 64-bit long mode
Where? Which exception? Are you using a virtual machine?
ccya
Posts: 5
Joined: Sun Feb 12, 2023 3:56 pm
Libera.chat IRC: ssensei
Location: 中国

Re: There was a problem returning from long mode to real mode

Post by ccya »

refer to the ReactOS code to solve this problem,return to real mode from long mode
https://github.com/reactos/reactos/blob ... 64/entry.S
rdos
Member
Member
Posts: 3391
Joined: Wed Oct 01, 2008 1:55 pm

Re: There was a problem returning from long mode to real mode

Post by rdos »

Returning to real mode is not the problem. The problem is that there might be no real mode BIOS that you can use.
wishedtobe
Member
Member
Posts: 60
Joined: Sat May 04, 2024 7:48 am
Libera.chat IRC: wishedtobe

Re: There was a problem returning from long mode to real mode

Post by wishedtobe »

唯一需要回到bios操作的东西可能是vesa,这个在v8086模式下完全可以进行
Gigasoft
Member
Member
Posts: 865
Joined: Sat Nov 21, 2009 5:11 pm

Re: There was a problem returning from long mode to real mode

Post by Gigasoft »

"Might be"? Either the system was booted using BIOS, meaning there is a BIOS, or it wasn't, in which case there isn't. There is no guessing involved.
iansjack
Member
Member
Posts: 4865
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: There was a problem returning from long mode to real mode

Post by iansjack »

"Might be" expresses a possibility, not a guess.
Post Reply

7 posts • Page 1 of 1

Return to "OS Development"