OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
 Post subject: Re: How to generally enter virtual 8086 mode?
PostPosted: Wed Apr 27, 2022 2:15 pm 
Offline
Member
Member

Joined: Wed Oct 01, 2008 1:55 pm
Posts: 3191
kzinti wrote:
rdos wrote:
No, I don't. I boot with a USB floppy containing my OS and then on the command line I write "inithd /i / r 0", then I create a partition with mkpart, and copy the boot image to the root. That's pretty simple.

Both inithd and mkpart are tools...


Maybe. They are part of my command-line application. I can run it without tools too by building an application that loads at boot time from the USB disc and does the same actions without any user intervention. That's how we initiate new computers when installing our terminal software.

kzinti wrote:
bootx64.efi is the bootloader... not sure why you need a second stage bootloader (load64.bin) but that's fine, it has nothing to do with UEFI.


It does have to do with UEFI. My OS image is not a linked PE executable, and so cannot be directly loaded neither by 32-bit nor by 64-bit UEFI. Rather, the OS image is built with a tool (or application) from a configuration file that writes a binary that combines a set of device-driver files, settings, application executables, preloaded files and autorun commands. The load64.bin and load32.bin files are executables that can be loaded by UEFI and that sets up an environment so the OS image can be started.

kzinti wrote:
I don't know why you have this problem where you need to erase UEFI variables, I have never run into this or heard about it before now.


Typically, I won't have this problem when I reformat the disc (like in the example), only when I try to update an existing Windoows installation for multiboot. It's often easier to add my OS to GRUB, provided you know where the GRUB config file is and can change it. GRUB booting also needs a second stage loader, much for the same reason as UEFI does.

With MBR booting, there are ten or so sectors that have a similar function as the second stage loader. It will read the OS image to a fixed address and start it.


Last edited by rdos on Wed Apr 27, 2022 2:48 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: How to generally enter virtual 8086 mode?
PostPosted: Wed Apr 27, 2022 2:16 pm 
Offline
Member
Member

Joined: Wed Oct 01, 2008 1:55 pm
Posts: 3191
Ethin wrote:
Pretty sure the only reason your able to boot the floppy drive at all is because your doing it over USB. Get with the times and use this thing called a USB flash drive and you might find your life being a bit easier.


I meant an USB flash drive, not an USB floppy. :-)


Top
 Profile  
 
 Post subject: Re: How to generally enter virtual 8086 mode?
PostPosted: Wed Apr 27, 2022 2:26 pm 
Offline
Member
Member

Joined: Sun Jun 23, 2019 5:36 pm
Posts: 618
Location: North Dakota, United States
I mean, maybe a USB floppy might work, but it'd need to be UAS compatible, I think. UEFI has tape boot support but I don't think anyone even uses that; I don't even think that there's code for that in EDK II other than the standards definitions...


Top
 Profile  
 
 Post subject: Re: How to generally enter virtual 8086 mode?
PostPosted: Thu Apr 28, 2022 3:58 am 
Offline
Member
Member

Joined: Sat Nov 21, 2009 5:11 pm
Posts: 852
Don't remove existing boot variables. If you want to dual boot, just add another Boot#### variable containing an EFI_LOAD_OPTION structure that points to your OS.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Kamal123 and 62 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