0
0
mirror of https://github.com/edk2-porting/edk2-msm synced 2024-11-11 12:59:20 +00:00
edk2-msm/tools/reboot2payload.lua
Molly Sophia eeec8ef583 RenegadePkg: Introduce Reboot2PayloadApp
This is used to choose to reboot to payload in SimpleInit boot menu
An lua version is also included but not used for now

Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
2023-02-13 22:49:54 +08:00

9 lines
287 B
Lua

print("Hello lua!")
address=0x17FE00000
magic=0x5241
iolib=uefi.GetLib("IoLib")
for i=1,128 do
iolib.MmioWrite16(address + (i - 1)*2, magic)
end
uefi.GetLib("ArmCacheMaintenanceLib").WriteBackInvalidateDataCacheRange(address, 128)
uefi.gRT:ResetSystem("warm", uefi.Status("success"))