[haiku] Re: [GSOC2014] Introduction (Louis 'manny' Feuvrier)

  • From: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sat, 15 Mar 2014 09:43:14 +0100

2014-03-15 1:06 GMT+01:00 Louis Feuvrier <manny@xxxxxxxxxxxx>:
> Hi everyone!
>
> I am Louis Feuvrier, a french computer science undergraduate at EPITA. I am
> also member of the system and security laboratory at my school. I am eager to
> contribute to Haiku as part of the 2014 google summer of code. My usual alias
> is manny and my freenode handle is choupy.

Hi, I'm tqh on freenode.

> I looked through the code in the src/system/boot folder and I have a few
> questions and remarks that I would like to have your opinion about:
>
> - Wouldn't it be interesting to use the gnu-uefi library? Is the project a
>   purely DIY application in order to avoid library dependencies? What about
>   the TianoCore SDK? Both these libraries seem to be implementing C symbols,
>   what about developping the EFI application in C directly?

We use a subset of GNU-EFI. GNU-EFI caters to different OS'es,
compilers, architectures
and has its own library for support functions. It is an excellent
library and much easier to
work with than Tianocore.
However it requires a lot of macro-programming and magic to do this
which makes the code
hard to read and maintain.

We can simplify our code by just using the essentials:
 * Start-function for EFI applications
 * Relocation-function for finding and calling ELF code.
 *  EFI-headers
 * Use our own bootplatform libraries.

Compare GNU-EFI's
  uefi_call_wrapper(conout->OutputString, 2, conout, (CHAR16 *)L"Hello
World!\n\r");
to our direct EFI call:
  conout->OutputString(conout, (CHAR16 *)L"Hello World!\n\r");

This was done in the proof of concept project EFI-Example[1] (with the
permission of GNU-EFI).
There are still things that can be simplified further.

> - As I understood while reading Akshay Jaggi's introduction thread[4], it
>   would be a good idea to refactor the x86 code from platform/bios_ia32 to
>   arch/x86. Can somebody confirm and if possible develop on that? I feel like
>   this would be a very important part of the project.
>
> - Can I find an exhaustive list of the things initialized by the BIOS module?
>   If I can, where should I look?

I am not familiar with that, I know VESA driver uses BIOS functions.

> - What is the exact purpose of M. Holmqvist's github repository[5]? This is
>   the sole place where I could find an EFI-related branch.

It is the development branch for EFI related work. We usually use
GitHub for bigger features.
It touches configuring, build system, common boot code so it would
break things if done in tree.

In its current form it has the code from GNU-EFI in the tree, the
build and configure are done to build an EFI bootplatform and the EFI
application runs. However the EFI application don't do much.

I recommend checking out this tree, configure it for x86_64 and build
the EFI app with
  jam -sHAIKU_BOOT_PLATFORM=efi haiku_loader.efi

EFI-Example[1] has a Readme that describes how to test EFI apps under QEMU.


> Thank you for taking the time to read my introduction. I would like to state
> that I am very motivated by this project and am open to *any* remark that
> might help improve both my candidature and myself.

Hope to see your application before the deadline :)
And don't hesitate to ask if there is anything.

[1] https://github.com/tqh/efi-example

/Fredrik Holmqvist, TQH

Other related posts: