|
- typedef struct _BL_FIRMWARE_DESCRIPTOR
- {
- UINT32 Version;
- UINT32 Unknown;
- EFI_HANDLE ImageHandle;
- EFI_SYSTEM_TABLE* SystemTable;
- } BL_FIRMWARE_DESCRIPTOR, *PBL_FIRMWARE_DESCRIPTOR;
复制代码
这个不是完整的结构体。EFI_SYSTEM_TABLE* SystemTable 下面还有东西。不过我的汇编水平菜的抠脚,所以搞不定。
http://reboot.pro/index.php?s=3f ... ic=17655&page=3
So in order to run normal UEFI applications, you have to perform a section of platform-specific code (I implemented only in ARM32, which is reverse-engineered from developrmenu.efi from a private Windows Phone Adaption Kit). See my example here: https://github.com/imbushuo/boot-shim
After performing platform-specific initialization code, you takes control of certain things, have interrupt services & exception vector disabled. Then you can do whatever you want with EFI protocols. Simple text input/out works for me.
Things will be easier on x86 / amd64 platforms. I think there is a reference implementation in ReactOS's UEFI library. IDA Pro is helpful to this too. Load symbols, check functions with name started "ArchInitializeContext"... and "ArchSwitchContext".
ReactOS 的实现里面似乎也没有完整的这个结构体。 |
|