Discussion:
New FPC target : uefi
(too old to reply)
Olivier Coursière
2014-08-17 17:16:40 UTC
Permalink
Raw Message
Hi,

In the past few days, i have worked on a possibly new FPC target :
Unified Extensible Firmware Interface (UEFI), the BIOS replacement that
come with most new PCs nowadays (and on other platforms too).

My initial goal was to discover the UEFI's APIs which seems high level
enough for a non system programmer like me.

After looking at the usual C tools (gnu-efi and tianocore), i thought it
would be easier (and funnier) to use Free Pascal instead.

On paper, Free Pascal has already everything needed without requiring
external software like binutils tools :
- an internal linker to generate a PE binary as expected by UEFI. Only a
different subsystem number is used in the header.
- support for the required calling conventions : cdecl (UEFI 32 bits)
and the Windows 64 one for UEFI 64 bits.
- a compiler that could generate position independent code (at least for
some targets, but maybe not PE's ones ?) as required by UEFI.

Then, i have defined a new i386 target (my new little laptop has 32 bits
UEFI, the weird version), mostly based on the nativent one.

I am up to the point where i can generate a binary that output the
firmware vendor on the UEFI console using the UEFI API only. The RTL is
only a stub that compile (nothing is implemented yet).

I am wondering what would be the best way to continue this work as it is
the first time i am working on a really new target :
- a new branch ?
- submit a polished big patch ?
- submit small patch through the bug system for simpler review ?
- other ideas ?

My current patch is not yet polished and complete but is available here,
just in case someone else is already interested
http://nan.tf/download/uefi_all.diff.

Olivier
Florian Klämpfl
2014-08-18 20:18:32 UTC
Permalink
Raw Message
I am wondering what would be the best way to continue this work as it is the first time i am working
- a new branch ?
IMO a branch.
Olivier Coursière
2014-08-26 22:09:14 UTC
Permalink
Raw Message
Hi,
Post by Florian Klämpfl
I am wondering what would be the best way to continue this work as it is the first time i am working
- a new branch ?
IMO a branch.
A branch is fine for me. I suppose some administrative work is required
to setup a branch with the corresponding writing rights.

No emergency though, it is a very early work in progress !

Olivier
Olivier Coursière via fpc-devel
2017-04-30 00:43:28 UTC
Permalink
Raw Message
Hi,
Post by Olivier Coursière
Hi,
Post by Florian Klämpfl
Post by Olivier Coursière
I am wondering what would be the best way to continue this work as
it is the first time i am working
- a new branch ?
IMO a branch.
A branch is fine for me. I suppose some administrative work is
required to setup a branch with the corresponding writing rights.
No emergency though, it is a very early work in progress !
I have resumed my work on this target after finding that an annoying
problem with string constants was fixed (i don't know what was exactly
the problem, so kudos goes to one or more contributors from the previous
year). Since then, WriteLn and memory allocation was implemented and
should work as expected.

Maybe it is time to create a branch. I suppose the branch should be
created by a core developer and some rights given to me so i can commit
to this new branch. Am i right ?

I have updated the UEFI page on the freepascal wiki with my current
patch : http://wiki.freepascal.org/UEFI. Most of the remaining work
should be to implement features using the UEFI API as a backend (such as
file access support).

Olivier
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc

Loading...