flat assembler
Message board for the users of flat assembler.
Index
> Main > Load mbr bootloader from Long Mode/Switch to virtual mode? |
Author |
|
dstyl 06 Jun 2018, 08:27
Hi,
I found some cool info about x86 based Android devices and their bootflow. According to http://newandroidbook.com/Articles/aboot.html all x86 android devices have a full bios/uefi implementation which then loads aboot as bin/efi application. Even the fastboot service is loaded by the bios/uefi. Also h2o insyde mentions that these devices have a bios uefi the settings are just locked. "Additionally, InsydeH2O is a fully Windows compliant firmware solution that employs a true modular architecture...," sadly all theire stuff how to reach the settings is all in taiwanese or sth , but its only using to files to unlock the uefi settings these are a rom file and an efi file which is just aboot http://www.ondaforum.com/topic/575-win-81-system-to-android-system-tutorial-tools-android-os/ . I thought now after reading all this if could just make a raw bin pack it into an android boot image(kernel is in zimage formar which is just a raw bin i think) which then loads a normal pc efi bootloader for example clover or grub which then allows to boot a normal pc os for example linux. I have few questions about this, is this possible from long mode? And how would i do this or which documentation would i need. Or is there a possibility to switch back from long mode to virtual mode , enable bios interrupts and than just set the RIP to the bootloader i want to load or even virtual uefi implementation(DUET) ?. Thanks in advance. |
|||
06 Jun 2018, 08:27 |
|
Furs 07 Jun 2018, 11:18
I have this on my bookmarks, but I've never actually done it, it seems to do what you asked for though: https://www.codeproject.com/Articles/45788/The-Real-Protected-Long-mode-assembly-tutorial-for
CTRL+F "Exiting from Long Mode" |
|||
07 Jun 2018, 11:18 |
|
dstyl 08 Jun 2018, 20:57
Thanks a lot that is exacly what i needed. Technicly is it even need to load the mbr into 07C00?
And instead load the complete bootloader/efi implementation(the part that gets loaded by the mbr) from memory to an 1:1 mappes protected mode adress in the 1mb range and set the ip to the main of the binary? |
|||
08 Jun 2018, 20:57 |
|
Furs 09 Jun 2018, 14:57
If you don't use code that expects it to be loaded at 07C00 (i.e. you jump straight to second stage bootloader or w/e it's called), then no you don't have to.
Most non-efi bootloaders expect the traditional BIOS interrupts though, so you'll need to have CSM (compatibility-support-module) or whatever in the BIOS activated. |
|||
09 Jun 2018, 14:57 |
|
dstyl 09 Jun 2018, 22:38
Furs wrote: If you don't use code that expects it to be loaded at 07C00 (i.e. you jump straight to second stage bootloader or w/e it's called), then no you don't have to. Thanks a lot, thats perfect. I want to get DUET to boot http://www.rodsbooks.com/bios2uefi/ It s a UEFI that loads on like a normal os and provides CSM. Im currently reading this https://github.com/migle/BootDuet and https://github.com/m13253/tianocore_uefi_duet_installer |
|||
09 Jun 2018, 22:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.