bootloader for windows 10
 

Bootloader For Windows 10 Instant

// Build full device path (file path appended) EFI_DEVICE_PATH_PROTOCOL *FullPath = FileDevicePath(LoadedImage->DeviceHandle, L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi");

// Open root directory Status = Volume->OpenVolume(Volume, &Root); if (EFI_ERROR(Status)) return Status; bootloader for windows 10

msg db 'Not a Windows 10 bootloader', 0 times 510 - ($-$$) db 0 dw 0xaa55 // Build full device path (file path appended)

// Open our own loaded image protocol to get device handle Status = gBS->HandleProtocol(ImageHandle, &gEfiLoadedImageProtocolGuid, (VOID**)&LoadedImage); if (EFI_ERROR(Status)) return Status; if (EFI_ERROR(Status)) return Status

// Load and start bootmgfw.efi Status = gBS->LoadImage(FALSE, ImageHandle, FullPath, NULL, 0, &BootMgrHandle); if (EFI_ERROR(Status)) return Status;

EFI_STATUS Status; EFI_LOADED_IMAGE_PROTOCOL *LoadedImage; EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume; EFI_FILE_PROTOCOL *Root, *File; EFI_DEVICE_PATH_PROTOCOL *FilePath; EFI_HANDLE BootMgrHandle;

[org 0x7c00] start: mov si, msg call print hlt print: lodsb or al, al jz done mov ah, 0x0e int 0x10 jmp print done: ret