First step of moving bootloader to C++

This commit is contained in:
Justin C. Miller
2019-02-03 01:38:12 -08:00
parent a71af1be96
commit 579f6f64e6
15 changed files with 71 additions and 67 deletions

13
src/boot/guids.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include "guids.h"
#define GUID(dw, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, name) \
EFI_GUID name __attribute__((section(".rodata"))) = {dw, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}
#include "guids.inc"
#undef GUID
int is_guid(EFI_GUID *a, EFI_GUID *b)
{
uint64_t *ai = (uint64_t *)a;
uint64_t *bi = (uint64_t *)b;
return ai[0] == bi[0] && ai[1] == bi[1];
}