Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nrdmn/uefi-examples
UEFI examples in Zig
https://github.com/nrdmn/uefi-examples
uefi zig
Last synced: 27 days ago
JSON representation
UEFI examples in Zig
- Host: GitHub
- URL: https://github.com/nrdmn/uefi-examples
- Owner: nrdmn
- Created: 2019-09-28T20:05:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-22T19:08:43.000Z (over 1 year ago)
- Last Synced: 2024-11-13T21:44:45.355Z (29 days ago)
- Topics: uefi, zig
- Language: Zig
- Size: 27.3 KB
- Stars: 61
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-zig - nrdmn/uefi-examples
- awesome-zig - uefi-examples🗒️UEFI examples in Zig
README
# UEFI examples in Zig
This repo contains examples about how to use Zig to build UEFI apps.Recommended reading order:
1. hello
1. protocols
1. events
1. memory
1. exit_boot_services
1. efivars
1. hii (TODO)## How to build and run.
Run `zig build` in any of the subdirectories to build.
Then you can copy the output file to a FAT32 formatted device to `efi/boot/bootx64.efi`.
Alternatively you can use QEMU with `qemu-system-x86_64 -bios /usr/share/edk2-ovmf/OVMF_CODE.fd -hdd fat:rw:. -serial stdio`.## FAQ
### How much stack space do I get?
At least 128 KiB before calling `exitBootServices()`.
After calling `exitBootServices()` you have to provide at least 4 KiB.### Why does my computer reboot after 5 minutes?
By default, your firmware's watchdog reboots your system after 5 minutes if your application does not call `exitBootServices()`.
You can disable the watchdog timer using `boot_services.setWatchdogTimer(0, 0, 0, null)`.### Where do I get more information?
Read the spec.
It's really well written.## Further reading
- https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf
- https://www.intel.com/content/dam/doc/guide/efi-driver-writers-v1-10-guide.pdf
- Beyond BIOS: Developing with the Unified Extensible Firmware Interface