Error: operand type mismatch for `in'
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov $0x60,%edi
mov $0x0,%eax
call 9630 <_etext+0x10>
mov %eax,-0x4(%rbp)
nop
leav
ret
void driver() {
int reg = inportb(0x60);
}
cc -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -fno-stack-protector -fpic -fshort-wchar -mno-red-zone -DHAVE_USE_MS_ABI -c -o forqemu/bootx64.o main/bootx64.c -masm=intel
cc -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -fno-stack-protector -fpic -fshort-wchar -mno-red-zone -DHAVE_USE_MS_ABI -c -o forqemu/graphic.o main/graphic.c
ld -nostdlib -znocombreloc -T /usr/lib/elf_x86_64_efi.lds -shared -Bsymbolic -L /usr/lib /usr/lib/crt0-efi-x86_64.o forqemu/bootx64.o forqemu/graphic.o -o forqemu/bootx64.so -lefi -lgnuefi
objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc --target=efi-app-x86_64 forqemu/bootx64.so bootx64.efi
cd ~
sudo mount /dev/sdb3 os
sudo cp ~/Desktop/myos/bootx64.efi ~/os/efi/boot/bootx64.efi
sudo umount os
cd Desktop/myos
sudo rm myiso.iso
sudo dd if=/dev/sdb3 of=fat.img
genisoimage -v -J -r -V "TEST" -o myiso.iso -eltorito-alt-boot -e fat.img -no-emul-boot fat.img
qemu-system-x86_64 -bios OVMF.fd -m 2G -cdrom myiso.iso
, соответственно, загружая OVMF.fd, что дает эмуляцию UEFI.