Board.KolibriOS.org
http://board.kolibrios.org/

uefi4kos
http://board.kolibrios.org/viewtopic.php?f=34&t=3270
Страница 1 из 1

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

Hello,

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

It is done in fasm, using uefi.inc. 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 МБ]
80 скачиваний

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

Any screenshot?

Here is how to use it
https://en.wikipedia.org/wiki/Unified_E ... ce#Booting

https://ru.wikipedia.org/wiki/Extensibl ... D0.B2_UEFI

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

Hello.

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, build.sh accordingly;
  • Now bios and uefi loaders can jump to very first byte of the kernel.

Any objections?

Вложения:
bootbios.diff [18.4 КБ]
6 скачиваний

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