UEFI and FASM

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
rdos
Member
Member
Posts: 3303
Joined: Wed Oct 01, 2008 1:55 pm

UEFI and FASM

Post by rdos »

Has anybody done an UEFI OS-loader using FASM? I think C is more or less out of the question since I need to switch operating mode, reload GDT, switch to compability-mode and turn off paging. All I need from UEFI is the memory map, video configuration and an ability to select and load a boot-file. Has anybody done something like this with FASM and care to share their code? Is there a decent include file for FASM that covers these functions?
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: UEFI and FASM

Post by Bender »

Did you check out http://wiki.osdev.org/Uefi.inc
Pretty much of a wrapper over UEFI calls, and it's written for FASM.

I'd rather ask it on the "OS Construction" section of the FASM forum (http://board.flatassembler.net), there are a lot of people there developing OSes exclusively in FASM, maybe they'll have answers.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
feryno
Member
Member
Posts: 73
Joined: Thu Feb 09, 2012 6:53 am
Location: Czechoslovakia
Contact:

Re: UEFI and FASM

Post by feryno »

There is no CSM in your UEFI, you can't boot via legacy MBR method?
It is possible to reload new GDT, switch modes, turn off paging, but then you can't access EFI services either disks - you put everything into unusable state.
hypervisor-based solutions developer (Intel, AMD)
rdos
Member
Member
Posts: 3303
Joined: Wed Oct 01, 2008 1:55 pm

Re: UEFI and FASM

Post by rdos »

feryno wrote:There is no CSM in your UEFI, you can't boot via legacy MBR method?
I can, but I want to be able to boot with UEFI too.
feryno wrote: It is possible to reload new GDT, switch modes, turn off paging, but then you can't access EFI services either disks - you put everything into unusable state.
I'll do that after collecting the information I need from UEFI.
Post Reply