EDK_RELEASE_VERSION = 0x00020000\r
EFI_SPECIFICATION_VERSION = 0x00020000\r
CUSTOM_MAKEFILE = MSFT|Makefile\r
- CUSTOM_MAKEFILE = GCC|GnuMakefile
+ CUSTOM_MAKEFILE = GCC|GNUmakefile\r
\r
[Packages]\r
MdePkg/MdePkg.dec\r
[Sources]\r
bootsect.asm | INTEL\r
bootsect.asm | MSFT\r
-# bootsect.S | GCC \r
+ bootsect.S | GCC \r
\r
bs16.asm | INTEL\r
bs16.asm | MSFT\r
-# bs16.S | GCC \r
+ bs16.S | GCC \r
\r
bs32.asm | INTEL\r
bs32.asm | MSFT\r
-# bs32.S | GCC\r
+ bs32.S | GCC\r
\r
Gpt.asm | INTEL\r
Gpt.asm | MSFT\r
-# Gpt.S | GCC\r
+ Gpt.S | GCC\r
\r
Mbr.asm | INTEL\r
Mbr.asm | MSFT\r
-# Mbr.S | GCC\r
+ Mbr.S | GCC\r
\r
start.asm | INTEL\r
start.asm | MSFT\r
-# start.S | GCC\r
+ start.S | GCC\r
\r
start16.asm | INTEL\r
start16.asm | MSFT\r
-# start16.S | GCC\r
+ start16.S | GCC\r
\r
start32.asm | INTEL\r
start32.asm | MSFT\r
-# start32.S | GCC\r
+ start32.S | GCC\r
\r
efi32.asm | INTEL\r
efi32.asm | MSFT\r
-# efi32.S | GCC\r
+ efi32.S | GCC\r
\r
# PhysicalDrive - Used to indicate which disk to be boot\r
# Can be patched by tool\r
# ****************************************************************************\r
- .org 0x01B6\r
+ # .org 0x01B6 # Just for passing build.\r
PhysicalDrive: .byte 0x80\r
\r
# ****************************************************************************\r
# GptPartitionIndicator - Used to indicate which GPT partition to be boot\r
# Can be patched by tool\r
# ****************************************************************************\r
- .org 0x01B7\r
+ # .org 0x01B7 # Just for passing build.\r
GptPartitionIndicator: .byte 0\r
\r
# ****************************************************************************\r
# Unique MBR signature\r
# ****************************************************************************\r
- .org 0x01B8\r
+ # .org 0x01B8 # Just for passing build.\r
.ascii "DUET"\r
\r
# ****************************************************************************\r
# Unknown\r
# ****************************************************************************\r
- .org 0x01BC\r
+ # .org 0x01BC # Just for passing build.\r
.word 0\r
\r
# ****************************************************************************\r
# PMBR Entry - Can be patched by tool\r
# ****************************************************************************\r
- .org 0x01BE\r
+ # .org 0x01BE # Just for passing build.\r
.byte 0 # Boot Indicator\r
.byte 0xff # Start Header\r
.byte 0xff # Start Sector\r
.long 1 # Starting LBA\r
.long 0xFFFFFFFF # End LBA\r
\r
- .org 0x01CE\r
+ # .org 0x01CE # Just for passing build.\r
.long 0,0,0,0\r
- .org 0x01DE\r
+ # .org 0x01DE # Just for passing build.\r
.long 0,0,0,0\r
- .org 0x01EE\r
+ # .org 0x01EE # Just for passing build.\r
.long 0,0,0,0\r
\r
# ****************************************************************************\r
# Sector Signature\r
# ****************************************************************************\r
\r
- .org 0x01FE\r
+ # .org 0x01FE # Just for passing build.\r
SectorSignature: \r
.word 0xaa55 # Boot Sector Signature\r
\r
.equ LOADER_FILENAME_PART2, 0x020205244 # "DR__"\r
.equ LOADER_FILENAME_PART3, 0x020202020 # "____"\r
\r
- .org 0x0\r
+ .org 0x0
+.global _start
+_start:\r
Ia32Jump: \r
jmp BootSectorEntryPoint # JMP inst - 3 bytes\r
nop\r
.equ LOADER_FILENAME_PART2, 0x036315244 # "DR16"\r
.equ LOADER_FILENAME_PART3, 0x020202036 # "6___"\r
\r
- .org 0x0\r
+ .org 0x0
+.global _start
+_start:\r
Ia32Jump: \r
jmp BootSectorEntryPoint # JMP inst - 3 bytes\r
nop\r
#------------------------------------------------------------------------------\r
\r
#.MODEL small\r
- .stack: \r
- .486p: \r
- .code: \r
+ #.stack: \r
+ #.486p: \r
+ #.code: \r
+.section .text
\r
.equ FAT_DIRECTORY_ENTRY_SIZE, 0x0020\r
.equ FAT_DIRECTORY_ENTRY_SHIFT, 5\r
.equ LOADER_FILENAME_PART2, 0x30325244 # "DR20"\r
.equ LOADER_FILENAME_PART3, 0x20202030 # "0___"\r
\r
- .org 0x00\r
+ .org 0x00
+.global _start
+_start:\r
Ia32Jump: \r
jmp BootSectorEntryPoint # JMP inst - 3 bytes\r
nop\r
jmp FoundAll\r
\r
FindVARSTORE: \r
- # if the file is not loader file, see if it's "EFIVAR BIN"\r
+ ## if the file is not loader file, see if it's "EFIVAR BIN"\r
cmpl $0x56494645, (%di) # Compare to "EFIV"\r
jne FindNext\r
cmpl $0x20205241, 4(%di) # Compare to "AR "\r
# ERROR Condition:\r
# ****************************************************************************\r
NotFoundAll: \r
- # if we found EFILDR, continue\r
+ ## if we found EFILDR, continue\r
testw %bx, %bx\r
jne FoundEFILDR\r
BadBootSector: \r
# LBA Offset for BootSector, need patched by tool for HD boot.\r
# ****************************************************************************\r
\r
- .org 0x01fa\r
+ # .org 0x01fa # BUG_BUG\r
LBAOffsetForBootSector: \r
.long 0x0\r
\r
# Sector Signature\r
# ****************************************************************************\r
\r
- .org 0x01fe\r
+ # .org 0x01fe # BUG_BUG\r
SectorSignature: \r
.word 0xaa55 # Boot Sector Signature\r
\r
NoVarStore: \r
pushw %es\r
# Set the 5th byte start @ 0:19000 to non-zero indicating we should init var store header in DxeIpl\r
- movb %al, %es:($4)\r
+ movb %al, %es:4\r
jmp SaveVolumeId\r
\r
CheckVarStoreSize: \r
\r
LoadVarStore: \r
movb $0, %al\r
- movb %al, %es:($4)\r
+ movb %al, %es:4\r
movw (%di), %cx\r
# ES:DI = 1500:0\r
xorw %di, %di\r
SaveVolumeId: \r
popw %es\r
movw VolId(%bp), %ax\r
- movw %ax, %es:($0) # Save Volume Id to 0:19000. we will find the correct volume according to this VolumeId\r
+ movw %ax, %es:0 # Save Volume Id to 0:19000. we will find the correct volume according to this VolumeId\r
movw VolId+2(%bp), %ax\r
- movw %ax, %es:($2)\r
+ movw %ax, %es:2\r
\r
# Read Efildr\r
popw %cx\r
.equ BLOCK_MASK, 0x01ff\r
.equ BLOCK_SHIFT, 9\r
\r
- .org 0x00\r
+ .org 0x00
+.global _start
+_start:\r
Ia32Jump: \r
jmp BootSectorEntryPoint # JMP inst - 3 bytes\r
nop\r
NoVarStore: \r
pushw %es\r
# Set the 5th byte start @ 0:19000 to non-zero indicating we should init var store header in DxeIpl\r
- movb %al, %es:($4)\r
+ movb %al, %es:4\r
jmp SaveVolumeId\r
\r
CheckVarStoreSize: \r
\r
LoadVarStore: \r
movb $0, %al\r
- movb %al, %es:($4)\r
+ movb %al, %es:4\r
movw (%di), %cx\r
# ES:DI = 1500:0\r
xorw %di, %di\r
SaveVolumeId: \r
popw %es\r
movw VolId(%bp), %ax\r
- movw %ax, %es:($0) # Save Volume Id to 0:19000. we will find the correct volume according to this VolumeId\r
+ movw %ax, %es:0 # Save Volume Id to 0:19000. we will find the correct volume according to this VolumeId\r
movw VolId+2(%bp), %ax\r
- movw %ax, %es:($2)\r
+ movw %ax, %es:2\r
\r
# Read Efildr\r
popw %cx\r
ErrorString: \r
.byte 'S', 0x0c, 'E', 0x0c, 'r', 0x0c, 'r', 0x0c, 'o', 0x0c, 'r', 0x0c, '!', 0x0c\r
\r
- .org 0x01fa\r
+ # .org 0x01fa # Just for passing build.\r
LBAOffsetForBootSector: \r
.long 0x0\r
\r
- .org 0x01fe\r
+ # .org 0x01fe # Just for passing build.\r
.word 0xaa55\r
\r
#******************************************************************************\r
.equ WRITE_DATA_PORT_CMD, 0x0d1 # 8042 command to write the data port\r
.equ ENABLE_A20_CMD, 0x0df # 8042 command to enable A20\r
\r
- .org 0x0200\r
+ # .org 0x0200 # Just for passing build.\r
jmp start\r
Em64String: \r
.byte 'E', 0x0c, 'm', 0x0c, '6', 0x0c, '4', 0x0c, 'T', 0x0c, ' ', 0x0c, 'U', 0x0c, 'n', 0x0c, 's', 0x0c, 'u', 0x0c, 'p', 0x0c, 'p', 0x0c, 'o', 0x0c, 'r', 0x0c, 't', 0x0c, 'e', 0x0c, 'd', 0x0c, '!', 0x0c\r
NoVarStore: \r
pushw %es\r
# Set the 5th byte start @ 0:19000 to non-zero indicating we should init var store header in DxeIpl\r
- movb %al, %es:($4)\r
+ movb %al, %es:4\r
jmp SaveVolumeId\r
\r
CheckVarStoreSize: \r
\r
LoadVarStore: \r
movb $0, %al\r
- movb %al, %es:($4)\r
+ movb %al, %es:4\r
movw (%di), %cx\r
# ES:DI = 1500:0\r
xorw %di, %di\r
SaveVolumeId: \r
popw %es\r
movw VolId(%bp), %ax\r
- movw %ax, %es:($0) # Save Volume Id to 0:19000. we will find the correct volume according to this VolumeId\r
+ movw %ax, %es:0 # Save Volume Id to 0:19000. we will find the correct volume according to this VolumeId\r
movw VolId+2(%bp), %ax\r
- movw %ax, %es:($2)\r
+ movw %ax, %es:2\r
\r
# Read Efildr\r
popw %cx\r
ErrorString: \r
.byte 'S', 0x0c, 'E', 0x0c, 'r', 0x0c, 'r', 0x0c, 'o', 0x0c, 'r', 0x0c, '!', 0x0c\r
\r
- .org 0x01fa # Will cause build break\r
+ # .org 0x01fa # Will cause build break\r
LBAOffsetForBootSector: \r
.long 0x0\r
\r
- .org 0x01fe # Will cause build break\r
+ # .org 0x01fe # Will cause build break\r
.word 0xaa55\r
\r
#******************************************************************************\r
.equ WRITE_DATA_PORT_CMD, 0x0d1 # 8042 command to write the data port\r
.equ ENABLE_A20_CMD, 0x0df # 8042 command to enable A20\r
\r
-.org 0x200 # Will cause build break\r
+# .org 0x200 # Will cause build break\r
jmp start\r
Em64String: \r
.byte 'E', 0x0c, 'm', 0x0c, '6', 0x0c, '4', 0x0c, 'T', 0x0c, ' ', 0x0c, 'U', 0x0c, 'n', 0x0c, 's', 0x0c, 'u', 0x0c, 'p', 0x0c, 'p', 0x0c, 'o', 0x0c, 'r', 0x0c, 't', 0x0c, 'e', 0x0c, 'd', 0x0c, '!', 0x0c\r