flat assembler
Message board for the users of flat assembler.

Index > Main > UEFI 64-bit hello world example

Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 30 Mar 2009, 13:35
enjoy


Description:
Download
Filename: efi_hello.zip
Filesize: 1.36 KB
Downloaded: 937 Time(s)

Post 30 Mar 2009, 13:35
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4046
Location: vpcmpistri
bitRAKE 30 Mar 2009, 15:10
I know almost nothing about UEFI, but it looks like a COM (common object model - not 100h based DOS executable) interface with a fastcall (MS Win64 type) calling convention?
Post 30 Mar 2009, 15:10
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20355
Location: In your JS exploiting you and your system
revolution 30 Mar 2009, 15:15
bitRAKE wrote:
I know almost nothing about UEFI, but it looks like a COM (common object model - not 100h based DOS executable) interface with a fastcall (MS Win64 type) calling convention?
google! Have you seen this: http://www.uefi.org/specs/
Post 30 Mar 2009, 15:15
View user's profile Send private message Visit poster's website Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen 30 Mar 2009, 19:33
bitRAKE wrote:
I know almost nothing about UEFI, but it looks like a COM (common object model - not 100h based DOS executable) interface with a fastcall (MS Win64 type) calling convention?

I'm releasing vid's article which contains answers to these questions tomorrow (hopefully).
Post 30 Mar 2009, 19:33
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 30 Mar 2009, 22:06
It is object-oriented programming, not COM (COM is specific subset of OOP, and COM specifics are not present in UEFI). And yes, calling convetion is usual 64-bit fastcall.

You can find basics about UEFI here: http://x86asm.net/articles/introduction-to-uefi/index.html

and rest will be (hopefully) on x86asm.net tomorrow.
Post 30 Mar 2009, 22:06
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 31 Mar 2009, 10:49
I guess the article will explain everything, but what can you do with it?
I've followed all the discussion on it, but I just don't get it?

Firstly) Its really simple src+inc
Secondly) FASM assembles it okay
Thirdly) ??? I've got the binary, now what Very Happy

Can I show my USB-stick to my motherboard?
Can I boot from a FAT32-formatted stick w/ binary loaded on it?
Should I go to BIOS and tell him/her about my next best thing to sliced bread?
Post 31 Mar 2009, 10:49
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 31 Mar 2009, 11:00
Post 31 Mar 2009, 11:00
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 31 Mar 2009, 11:12
x86asm.net wrote:
USB pen should be enough, but in practice none of 4 brands I tried worked


Sad I'll try my X58 board, when I get home...

More bad (and some good?) news:
arstechnica.com wrote:
Yes, Intel desktop motherboards have supported UEFI boot for quite a while (since at least the D975XBX motherboard, through the 965 series, 3-series and 4-series chipsets). It's crap, though. You need to switch the SATA mode in the BIOS to legacy IDE mode, and once you've done this, you'd better not have the install become unbootable in any way, or you won't be able to boot off the DVD in UEFI mode in order to recover the install (or clear the UEFI bootlist in the NVRAM for that matter, which means you'll need to hit F10 from then onward every boot to pick non-UEFI media to boot from). There's no EFI shell built into the firmware to manipulate the boot list, either, unlike Intel's server boards.


I had the D975 both XBX and XBX2, shoot I didn't test...
Now I have 3-series to test on and I even think I can find a 4-series board...

_________________
My updated idol Very Happy http://www.agner.org/optimize/


Last edited by Madis731 on 31 Mar 2009, 11:23; edited 1 time in total
Post 31 Mar 2009, 11:12
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 31 Mar 2009, 11:23
Do you have board with firmware that supports UEFI?
Post 31 Mar 2009, 11:23
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 31 Mar 2009, 11:26
According to this:
http://episteme.arstechnica.com/eve/forums/a/tpc/f/77909774/m/835001984931
I have..

EDIT:
And according to my testings last night, everything works perfectly.
1) BIOS boot options list UEFI as [Disabled]/[Enabled]
2) Intel boots USB-sticks with autodetected filesystem and all FATs are supported
3) *.efi files are located automatically from the tree \EFI\BOOT\BOOTX64.EFI

I tried only with shell under the directory tree and loaded my HelloWorld app from fs0:\hello.efi

No comments, just works out of the box Smile

USB-stick was a 2GB Kingston DT, with FAT32 and Shell installed+hello.efi.
Motherboard was a DX58SO, CPU i7 920, RAM 6GB 1600MHz Corsairs, BIOS was the newest at the time: 25.02.2009 (ver. 3504). The major change in EFI was during ver. 3044 update (19.12.2008).
Post 31 Mar 2009, 11:26
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.