Skip to content

Commit

Permalink
. 启动 bootmgfw.efi 。
Browse files Browse the repository at this point in the history
. 修正 graphicsmode,displaymem 函数。
. 新设内部变量: 0x8272(1字节) UEFI 启动环境(32/64位)。
  • Loading branch information
yaya committed Jan 9, 2021
1 parent 6f8f98c commit b685a8c
Show file tree
Hide file tree
Showing 11 changed files with 585 additions and 327 deletions.
6 changes: 6 additions & 0 deletions ChangeLog_UEFI.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
更新说明:
2021-01-09 (yaya)
启动 bootmgfw.efi 。
修正 graphicsmode,displaymem 函数。
新设内部变量: 0x8272(1字节) UEFI 启动环境(32/64位)。

2020-12-15 (a1ive)
添加 load 命令以加载 EFI 驱动。

2020-12-14 (yaya)
一次编译完成32位、64位版本。

Expand Down
3 changes: 3 additions & 0 deletions menu.lst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ default 1
title 启动 efi 文件
chainloader /efi/boot/grub2x64.efi

title 启动 windows
chainloader /efi/microsoft/boot/bootmgfw.efi

title 启动虚拟光盘
find --set-root /cdrom.iso
map /cdrom.iso (0xff)
Expand Down
22 changes: 14 additions & 8 deletions stage2/asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,13 @@ VARIABLE(min_con_mem_size) //0x82

. = EXT_C(main) + 0x70 //0x8270 uefi未使用
.word 0
.byte 0

#if defined(__i386__)
.byte 32 //0x8272 bootia32.efi引导
#else
.byte 64 // bootx64.efi引导
#endif

. = EXT_C(main) + 0x73
VARIABLE(debug_msg) //byte
.byte 2
Expand Down Expand Up @@ -312,7 +317,7 @@ VARIABLE(debug) //调试 int
* if debug == MAX_UINT or debug < 0, then filesystem debug mode is on. //如果调试=MAX_UINT或调试<0,那么文件系统调试模式开。
* (MAX_UINT is 0x7FFFFFFF)
*/
.long 0
.long 1

VARIABLE(current_slice) //0x8334 当前片 int
.long 0
Expand Down Expand Up @@ -361,17 +366,18 @@ VARIABLE(cdrom_orig) //光盘

. = EXT_C(main) + 0x180 //0x8370

ENTRY(disk_fragment_map) .space FRAGMENT_MAP_SLOT_SIZE //映射碎片插槽
ENTRY(disk_fragment_map) .space FRAGMENT_MAP_SLOT_SIZE //映射碎片插槽 280

. = EXT_C(main) + 0x400 //0x8670

ENTRY(disk_buffer) .space 0x1000 //磁盘缓存
//ENTRY(disk_buffer) .space 0x1000 //磁盘缓存

. = EXT_C(main) + 0x1400 //0x9600
// . = EXT_C(main) + 0x1400 //0x9600

ENTRY(disk_drive_map) .space [DRIVE_MAP_SIZE + 1] * DRIVE_MAP_SLOT_SIZE //磁盘驱动器映射插槽 78*8=3c0

. = EXT_C(main) + 0x1800
// . = EXT_C(main) + 0x1800
. = EXT_C(main) + 0x800
real_codestart:

.align 8
Expand Down Expand Up @@ -612,7 +618,7 @@ VARIABLE(system_functions) //IMG(0x8300)
.extent ABS(EXT_C(find_command)) //46
.extent 0 //47 reserved
.extent 0 //48 reserved
.extent 0 //49 原ABS(EXT_C(get_mmap_entry)) 现在未使用
.extent ABS(EXT_C(grub_zalloc)) //49
.extent ABS(EXT_C(grub_malloc)) //50
.extent ABS(EXT_C(grub_free)) //51
.extent 0 //52 原list_partitions 现在未使用
Expand Down Expand Up @@ -710,7 +716,7 @@ VARIABLE(current_term)
.extent NUM_FSYS //22 常数
VARIABLE(graphics_inited) //23 int
.extent 0
.extent 0 //24 reserved
.extent ABS(EXT_C(BASE_ADDR)) //24 char *
//VARIABLE(font8x16) //25 reserved
.extent 0
VARIABLE(fontx) //26 int
Expand Down
Loading

0 comments on commit b685a8c

Please sign in to comment.