Страница 1 из 1

Автор:  dunkaist [ Пн апр 25, 2016 10:43 pm ]
Заголовок сообщения:  uefi4kos


I implemented a small UEFI module to boot kolibri without CSM, find it here.

It is done in fasm, using A thread by XVilka was especially helpful for booting on real hardware.

How it works:
- Choose and set video mode via UEFI graphics output protocol;
- Get memory map and convert it to E820 format;
- Load kernel and disk image into memory;
- Set boot params at 0x9000+;
- Load new GDT;
- Go to compatibility and then protected mode;
- Clear cr4.pae bit;
- Jump to the kernel.

What doesn't work:
- 'blue screen' (to choose video mode type its number and press enter, no indication so far!);
- reboot/poweroff.

uefi4kos.7z [1.19 МБ]
124 скачивания

Автор:  Wildwest [ Пн апр 25, 2016 11:13 pm ]
Заголовок сообщения:  Re: uefi4kos

Any screenshot?

Here is how to use it ... ce#Booting ... D0.B2_UEFI

Автор:  dunkaist [ Ср дек 06, 2017 10:12 am ]
Заголовок сообщения:  Re: uefi4kos


Current kernel.asm (read: kernel.mnt) starts with 16-bit bios-related part which is of no use for UEFI loader that wants to jump just after this part, to os_code:B32. Unfortunately, B32 label offset depends on the size of preceeding 16-bit code and therefore UEFI loader can't guess where to jump.

I attached a patch that splits bootbios.asm and kernel.asm:
  • Move bios-related part of kernel.asm before B32 label to bootbios.asm file;
  • Move bx_from_load, boot_dev and kernel_restart_bootblock variables to BOOT_* 0x9000 block;
  • Update Tupfile.lua, Makefile, build.bat, accordingly;
  • Now bios and uefi loaders can jump to very first byte of the kernel.

Any objections?

bootbios.diff [18.4 КБ]
42 скачивания

Страница 1 из 1 Часовой пояс: UTC+03:00
Powered by phpBB® Forum Software © phpBB Limited