Git Product home page Git Product logo

efi's Introduction

efi

UEFI headers

To build correctly, you have to set the EFI_PLATFORM variable on the cc command line: cc EFI_PLATFORM=1 would use the X64 architecture. The allowed values are defined in efi.h:

#define EFI_ARCH_IA32 0
#define EFI_ARCH_X64 1
#define EFI_ARCH_ITANIUM 2
#define EFI_ARCH_AARCH32 3
#define EFI_ARCH_AARCH64 4
#define EFI_ARCH_RISCV32 5
#define EFI_ARCH_RISCV64 6
#define EFI_ARCH_RISCV128 7
#define EFI_ARCH_LOONGARCH32 8
#define EFI_ARCH_LOONGARCH64 9

These headers are currently incomplete and you should probably use the official headers from Tianocore.

You could build a "Hello World" application just by including <efi.h> and using the declarations there. Everything needed to reference the Boot Services, Runtime Services, Configuration Table, System Table and base types are included in <efi.h>.

Using protocols requires including the appropriate protocol header. The naming convention for the include filename is to use the name of the structure, as it appears in the UEFI specification, and naming the file using the first letter of each component of the structure name. For example, the EfiGraphicsOutputProtocol is defined in protocol/efi-gop.h.

Please let me know of any mistakes. I'm also willing to add things as a favor. As it stands, I've only included components that I'm actually using.

Headers

EFI Base

  • efi-bs.h boot services
  • efi-ct.h configuration table
  • efi.h base system
  • efi-rs.h runtime services
  • efi-st.h system table

EFI Protocols

  • efi-time.h time representation protocol
  • protocol/efi-acpitp.h acpi table protocol
  • protocol/efi-dpp.h device path protocol
  • protocol/efi-fp.h file protocol
  • protocol/efi-gop.h graphics output protocol
  • protocol/efi-lidpp.h loaded image device path protocol
  • protocol/efi-lip.h loaded image protocol
  • protocol/efi-sfsp.h simple file system protocol
  • protocol/efi-stip.h simple text input protocol
  • protocol/efi-stop.h simple text output protocol

efi's People

Contributors

littlefox94 avatar yoppeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

efi's Issues

Missing efilib.h

I tried compiling some sample EFI code using your headers and most of the examples tried to include efilib.h. Would be nice to include it, so it can be a drop-in replacement.

Is it possible to port it on aarch64?

Hello, I want to use this library in my project and I'm targeting aarch64 platform. In description it specifies it can work only on x86_64, how can I port it on desired Isa? What parts I should look for?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.