]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libefivar/FreeBSD-update
amd64: use register macros for gdb_cpu_getreg()
[FreeBSD/FreeBSD.git] / lib / libefivar / FreeBSD-update
1 $FreeBSD$
2
3 For the printing and parsing functionalit, we use the Tianocore routines directly.
4
5 efivar-dp-format.c is a copy of MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
6 efivar-dp-parse.c is a copy of MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
7
8 These files are first mechnaically processed with
9
10 sed -e "s/L'/'/;"'s/L"/"/g;s/%g/%36s/g;s/%a/%s/g;s/^VOID/static VOID/g;s/ *$//g'
11
12 for several reasons. We're moving from wide rotuines to narrow
13 routines. The UTC-2 this code is written for is a bad match for
14 wchar_t which is an int. It's a much better match for plain narrow
15 characters on FreeBSD. So we pretend that CHAR16 for these files is
16 really char * (ASCII).
17
18 Next, we have have to convert the Unicode printf that this code
19 expects to FreeBSD's printf. %g means "Print the GUID" and %a means
20 "print the ASCII string." so we mechanically convert them. Once we've
21 done that we can compare efivar-dp-*.c to its source to see what's
22 changed. Because we go through this indirection, I've done that
23 outside of svn. To upgrade you have to do these files by hand. You
24 have to go through and make routines static.
25
26 uefi-*.[ch] are internal routines to support this. They've been copied
27 from EDK2 as well, but in a more hap-hazard manner. This was a trade
28 off between ease of implementation / upgrade vs pulling in too much
29 since less than half of any file was needed.
30
31 efi-osdep.h shims the EDK2 types to FreeBSD's types. It's included by
32 ProcessorBind.h which EDK2 uses to define the CPU. We keep it separate
33 from uefi-dplib.h to allow better sharing.
34
35 uefi-dplib.h shims the EDK2 routines that are needed to FreeBSD's
36 routines. This is relatively easy since we map all the UCS-2 routines
37 to simple char * routines.
38
39 RESIST THE URGE TO CLEAN UP THESE FILES.