diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-21 02:51:09 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-21 02:51:09 +0000 |
commit | b29a823d91ac4d8abd87e58172e32d7b0b43be8d (patch) | |
tree | 5db0ace4fe4eca735fc60e4f17e6583f8b39ffe5 /DuetPkg/BootSector | |
parent | 10b48963c887398c0fd3313de0996808d51b1afc (diff) | |
download | edk2-b29a823d91ac4d8abd87e58172e32d7b0b43be8d.tar.gz edk2-b29a823d91ac4d8abd87e58172e32d7b0b43be8d.tar.bz2 edk2-b29a823d91ac4d8abd87e58172e32d7b0b43be8d.zip |
Detab in DuetPkg
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9170 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/BootSector')
-rw-r--r-- | DuetPkg/BootSector/bootsect.S | 2 | ||||
-rw-r--r-- | DuetPkg/BootSector/bs16.S | 2 | ||||
-rw-r--r-- | DuetPkg/BootSector/efi32.S | 2 | ||||
-rw-r--r-- | DuetPkg/BootSector/efi64.S | 88 | ||||
-rw-r--r-- | DuetPkg/BootSector/st16_64.S | 304 | ||||
-rw-r--r-- | DuetPkg/BootSector/st32_64.S | 304 | ||||
-rw-r--r-- | DuetPkg/BootSector/start.S | 4 | ||||
-rw-r--r-- | DuetPkg/BootSector/start64.S | 324 |
8 files changed, 515 insertions, 515 deletions
diff --git a/DuetPkg/BootSector/bootsect.S b/DuetPkg/BootSector/bootsect.S index eff9cd0c9f..178f94c5dc 100644 --- a/DuetPkg/BootSector/bootsect.S +++ b/DuetPkg/BootSector/bootsect.S @@ -129,7 +129,7 @@ BootSectorEntryPoint: xorw %bx, %bx
FindEFILDR:
- cmpl $LOADER_FILENAME_PART1, (%di) # Compare to "EFIL"
+ cmpl $LOADER_FILENAME_PART1, (%di) # Compare to "EFIL"
jne FindVARSTORE
cmpl $LOADER_FILENAME_PART2, 4(%di)
jne FindVARSTORE
diff --git a/DuetPkg/BootSector/bs16.S b/DuetPkg/BootSector/bs16.S index 217bef3b08..cbb3649a46 100644 --- a/DuetPkg/BootSector/bs16.S +++ b/DuetPkg/BootSector/bs16.S @@ -119,7 +119,7 @@ BootSectorEntryPoint: FindEFILDR:
cmpl $LOADER_FILENAME_PART1, (%di) # Compare to "EFIL"
jne FindVARSTORE
- cmpl $LOADER_FILENAME_PART2, 4(%di)
+ cmpl $LOADER_FILENAME_PART2, 4(%di)
jne FindVARSTORE
cmpl $LOADER_FILENAME_PART3, 7(%di)
jne FindVARSTORE
diff --git a/DuetPkg/BootSector/efi32.S b/DuetPkg/BootSector/efi32.S index f21ff84384..1da2d5e6f3 100644 --- a/DuetPkg/BootSector/efi32.S +++ b/DuetPkg/BootSector/efi32.S @@ -59,7 +59,7 @@ Start: LOOP_1: # loop through all IDT entries exception handlers and initialize to default handler
movw %bx, (%edi) # write bits 15..0 of offset
movw $0x20, 2(%edi) # SYS_CODE_SEL from GDT
- movw $(0x0e00 | 0x8000), 4(%edi) # type = 386 interrupt gate, present
+ movw $(0x0e00 | 0x8000), 4(%edi) # type = 386 interrupt gate, present
movw %ax, 6(%edi) # write bits 31..16 of offset
addl $8, %edi # move up to next descriptor
addw DEFAULT_HANDLER_SIZE, %bx # move to next entry point
diff --git a/DuetPkg/BootSector/efi64.S b/DuetPkg/BootSector/efi64.S index 57efe587e4..d95fc73bbe 100644 --- a/DuetPkg/BootSector/efi64.S +++ b/DuetPkg/BootSector/efi64.S @@ -32,8 +32,8 @@ # within 255 bytes of the common entry. This must
# be done to maintain the consistency of the size
# of entry points...
- .byte 0xe9 # jmp 16 bit relative
- .long commonIdtEntry - . - 4 # offset to jump to
+ .byte 0xe9 # jmp 16 bit relative
+ .long commonIdtEntry - . - 4 # offset to jump to
.endm
@@ -56,21 +56,21 @@ Start: call ClearScreen
# Populate IDT with meaningful offsets for exception handlers...
- sidt Idtr
-
+ sidt Idtr
+
- movl Halt, %eax
+ movl Halt, %eax
movl %eax,%ebx # use bx to copy 15..0 to descriptors
shrl $16,%eax # use ax to copy 31..16 to descriptors
# 63..32 of descriptors is 0
movl $0x78,%ecx # 78h IDT entries to initialize with unique entry points (exceptions)
- movl (Idtr + 2), %esi
+ movl (Idtr + 2), %esi
movl (%esi),%edi
LOOP_1: # loop through all IDT entries exception handlers and initialize to default handler
movw %bx, (%edi) # write bits 15..0 of offset
movw $0x38, 2(%edi) # SYS_CODE_SEL64 from GDT
- movw $(0x0e00 | 0x8000), 4(%edi) # type = 386 interrupt gate, present
+ movw $(0x0e00 | 0x8000), 4(%edi) # type = 386 interrupt gate, present
movw %ax, 6(%edi) # write bits 31..16 of offset
movl $0, 8(%edi) # write bits 31..16 of offset
addl $16, %edi # move up to next descriptor
@@ -123,12 +123,12 @@ LOOP_1: # loop through all IDT entries e movl 0x30(%ebp),%edi # edi = [[22000 + [22014] + 3c] + 2c] = ImageBase (63..32 is zero, ignore)
movl 0x28(%ebp),%eax # eax = [[22000 + [22014] + 3c] + 24] = EntryPoint
addl %edi,%eax # eax = ImageBase + EntryPoint
- movl %ebx, EfiLdrOffset
+ movl %ebx, EfiLdrOffset
movl %eax, (%ebx) # Modify far jump instruction for correct entry point
- movw 6(%ebp), %bx # bx = Number of sections
+ movw 6(%ebp), %bx # bx = Number of sections
xorl %eax,%eax
- movw 0x14(%ebp), %ax # ax = Optional Header Size
+ movw 0x14(%ebp), %ax # ax = Optional Header Size
addl %eax,%ebp
addl $0x18,%ebp # ebp = Start of 1st Section
@@ -155,12 +155,12 @@ SectionLoop: cmpw $0,%bx
jne SectionLoop
- movl (Idtr), %eax # get size of IDT
- movzx (%edx), %eax
+ movl (Idtr), %eax # get size of IDT
+ movzx (%edx), %eax
.byte 0xff
.byte 0xc0
# inc eax
- addl 2(%edx), %eax # add to base of IDT to get location of memory map...
+ addl 2(%edx), %eax # add to base of IDT to get location of memory map...
xorl %ecx,%ecx
movl %eax,%ecx # put argument to RCX
@@ -379,11 +379,11 @@ commonIdtEntry: ja PrintDefaultString
PrintExceptionString:
shll $3,%eax ## multiply by 8 to get offset from StringTable to actual string address
- addl StringTable, %eax
+ addl StringTable, %eax
movl (%eax),%esi
jmp PrintTheString
PrintDefaultString:
- movl IntUnknownString, %esi
+ movl IntUnknownString, %esi
# patch Int number
movl %eax,%edx
call A2C
@@ -394,35 +394,35 @@ PrintDefaultString: movb %al,(%esi)
PrintTheString:
call PrintString
- movl String2, %esi
+ movl String2, %esi
call PrintString
.byte 0x48
movl 19*8(%ebp),%eax # CS
call PrintQword
movb $':', %al
- movb %al, (%edi)
+ movb %al, (%edi)
addl $2,%edi
.byte 0x48
movl 18*8(%ebp),%eax # RIP
call PrintQword
- movl String3, %esi
+ movl String3, %esi
call PrintString
movl $0xb8140,%edi
- movl StringRax, %esi
+ movl StringRax, %esi
call PrintString
.byte 0x48
movl 15*8(%ebp),%eax
call PrintQword
- movl StringRcx, %esi
+ movl StringRcx, %esi
call PrintString
.byte 0x48
movl 14*8(%ebp),%eax
call PrintQword
- movl StringRdx, %esi
+ movl StringRdx, %esi
call PrintString
.byte 0x48
movl 13*8(%ebp),%eax
@@ -430,19 +430,19 @@ PrintTheString: movl $0xb81e0,%edi
- movl StringRbx, %esi
+ movl StringRbx, %esi
call PrintString
.byte 0x48
movl 12*8(%ebp),%eax
call PrintQword
- movl StringRsp, %esi
+ movl StringRsp, %esi
call PrintString
.byte 0x48
movl 21*8(%ebp),%eax
call PrintQword
- movl StringRbp, %esi
+ movl StringRbp, %esi
call PrintString
.byte 0x48
movl 10*8(%ebp),%eax
@@ -450,19 +450,19 @@ PrintTheString: movl $0xb8280,%edi
- movl StringRsi, %esi
+ movl StringRsi, %esi
call PrintString
.byte 0x48
movl 9*8(%ebp),%eax
call PrintQword
- movl StringRdi, %esi
+ movl StringRdi, %esi
call PrintString
.byte 0x48
movl 8*8(%ebp),%eax
call PrintQword
- movl StringEcode, %esi
+ movl StringEcode, %esi
call PrintString
.byte 0x48
movl 17*8(%ebp),%eax
@@ -470,19 +470,19 @@ PrintTheString: movl $0xb8320,%edi
- movl StringR8, %esi
+ movl StringR8, %esi
call PrintString
.byte 0x48
movl 7*8(%ebp),%eax
call PrintQword
- movl StringR9, %esi
+ movl StringR9, %esi
call PrintString
.byte 0x48
movl 6*8(%ebp),%eax
call PrintQword
- movl StringR10, %esi
+ movl StringR10, %esi
call PrintString
.byte 0x48
movl 5*8(%ebp),%eax
@@ -490,19 +490,19 @@ PrintTheString: movl $0xb83c0,%edi
- movl StringR11, %esi
+ movl StringR11, %esi
call PrintString
.byte 0x48
movl 4*8(%ebp),%eax
call PrintQword
- movl StringR12, %esi
+ movl StringR12, %esi
call PrintString
.byte 0x48
movl 3*8(%ebp),%eax
call PrintQword
- movl StringR13, %esi
+ movl StringR13, %esi
call PrintString
.byte 0x48
movl 2*8(%ebp),%eax
@@ -510,19 +510,19 @@ PrintTheString: movl $0xb8460,%edi
- movl StringR14, %esi
+ movl StringR14, %esi
call PrintString
.byte 0x48
movl 1*8(%ebp),%eax
call PrintQword
- movl StringR15, %esi
+ movl StringR15, %esi
call PrintString
.byte 0x48
movl 0*8(%ebp),%eax
call PrintQword
- movl StringSs, %esi
+ movl StringSs, %esi
call PrintString
.byte 0x48
movl 22*8(%ebp),%eax
@@ -530,7 +530,7 @@ PrintTheString: movl $0xb8500,%edi
- movl StringRflags, %esi
+ movl StringRflags, %esi
call PrintString
.byte 0x48
movl 20*8(%ebp),%eax
@@ -554,7 +554,7 @@ InnerLoop: movl (%esi),%eax
call PrintQword
addl $8,%esi
- mov $0x00, %al
+ mov $0x00, %al
movb %al,(%edi)
addl $2,%edi
loop InnerLoop
@@ -585,7 +585,7 @@ InnerLoop1: movl (%esi),%eax
call PrintQword
addl $8,%esi
- movb $0x00, %al
+ movb $0x00, %al
movb %al,(%edi)
addl $2,%edi
loop InnerLoop1
@@ -652,10 +652,10 @@ LN_C1: PrintString:
pushl %eax
LN_C2:
- movb (%esi), %al
+ movb (%esi), %al
cmpb $0,%al
je LN_C3
- movb %al, (%edi)
+ movb %al, (%edi)
.byte 0xff
.byte 0xc6
# inc esi
@@ -687,7 +687,7 @@ looptop: jle @f
addb $7,%bl
@@:
- movb %bl, (%edi)
+ movb %bl, (%edi)
addl $2,%edi
loop looptop
#wbinvd
@@ -701,12 +701,12 @@ ClearScreen: pushl %eax
pushl %ecx
- movb $0x00, %al
+ movb $0x00, %al
movb $0xc,%ah
movl $0xb8000,%edi
movl $80*24,%ecx
LN_C4:
- movw %ax, (%edi)
+ movw %ax, (%edi)
addl $2,%edi
loop LN_C4
movl $0xb8000,%edi
diff --git a/DuetPkg/BootSector/st16_64.S b/DuetPkg/BootSector/st16_64.S index d68613b1b6..d863f53840 100644 --- a/DuetPkg/BootSector/st16_64.S +++ b/DuetPkg/BootSector/st16_64.S @@ -74,7 +74,7 @@ BootSectorEntryPoint: NoVarStore:
pushw %es
# Set the 5th byte start @ 0:19000 to non-zero indicating we should init var store header in DxeIpl
- movb %al, %es:(4)
+ movb %al, %es:(4)
jmp SaveVolumeId
CheckVarStoreSize:
@@ -232,7 +232,7 @@ ReadCylinderLoop: movw $0x7bfc,%bp # bp = 0x7bfc
movl %esi,%eax # eax = Start LBA
xorl %edx,%edx # edx = 0
- movzwl (%bp), %ebx # bx = MaxSector
+ movzwl (%bp), %ebx # bx = MaxSector
divl %ebx # ax = StartLBA / MaxSector
incw %dx # dx = (StartLBA % MaxSector) + 1
@@ -354,7 +354,7 @@ MemMapLoop: MemMapDone:
leal MemoryMap, %eax
subl %eax,%edi # Get the address of the memory map
- movl %edi, MemoryMapSize # Save the size of the memory map
+ movl %edi, MemoryMapSize # Save the size of the memory map
xorl %ebx,%ebx
movw %cs,%bx # BX=segment
@@ -416,7 +416,7 @@ A20GateEnabled: leal OffsetIn32BitProtectedMode, %eax
addl $0x20000+0x6,%eax
- movl %eax, OffsetIn32BitProtectedMode
+ movl %eax, OffsetIn32BitProtectedMode
leal OffsetInLongMode, %eax
addl $0x20000+0x6,%eax
@@ -582,7 +582,7 @@ Empty8042Loop: .p2align 1
- gdtr: .long GDT_END - GDT_BASE - 1 # GDT limit
+ gdtr: .long GDT_END - GDT_BASE - 1 # GDT limit
.long 0 # (GDT base gets set above)
##############################################################################
# global descriptor table (GDT)
@@ -701,366 +701,366 @@ idtr: .long IDT_END - IDT_BASE - 1 # IDT limit IDT_BASE:
# divide by zero (INT 0)
.equ DIV_ZERO_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# debug exception (INT 1)
.equ DEBUG_EXCEPT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# NMI (INT 2)
.equ NMI_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# soft breakpoint (INT 3)
.equ BREAKPOINT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# overflow (INT 4)
.equ OVERFLOW_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# bounds check (INT 5)
.equ BOUNDS_CHECK_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# invalid opcode (INT 6)
.equ INVALID_OPCODE_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# device not available (INT 7)
.equ DEV_NOT_AVAIL_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# double fault (INT 8)
.equ DOUBLE_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# Coprocessor segment overrun - reserved (INT 9)
.equ RSVD_INTR_SEL1, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# invalid TSS (INT 0ah)
.equ INVALID_TSS_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# segment not present (INT 0bh)
.equ SEG_NOT_PRESENT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# stack fault (INT 0ch)
.equ STACK_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# general protection (INT 0dh)
.equ GP_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# page fault (INT 0eh)
.equ PAGE_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# Intel reserved - do not use (INT 0fh)
.equ RSVD_INTR_SEL2, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# floating point error (INT 10h)
.equ FLT_POINT_ERR_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# alignment check (INT 11h)
.equ ALIGNMENT_CHECK_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# machine check (INT 12h)
.equ MACHINE_CHECK_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# SIMD floating-point exception (INT 13h)
.equ SIMD_EXCEPTION_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# 85 unspecified descriptors, First 12 of them are reserved, the rest are avail
- .fill 85 * 16, 1, 0 # db (85 * 16) dup(0)
+ .fill 85 * 16, 1, 0 # db (85 * 16) dup(0)
# IRQ 0 (System timer) - (INT 68h)
.equ IRQ0_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 1 (8042 Keyboard controller) - (INT 69h)
.equ IRQ1_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# Reserved - IRQ 2 redirect (IRQ 2) - DO NOT USE!!! - (INT 6ah)
.equ IRQ2_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 3 (COM 2) - (INT 6bh)
.equ IRQ3_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 4 (COM 1) - (INT 6ch)
.equ IRQ4_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 5 (LPT 2) - (INT 6dh)
.equ IRQ5_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 6 (Floppy controller) - (INT 6eh)
.equ IRQ6_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 7 (LPT 1) - (INT 6fh)
.equ IRQ7_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 8 (RTC Alarm) - (INT 70h)
.equ IRQ8_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 9 - (INT 71h)
.equ IRQ9_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 10 - (INT 72h)
.equ IRQ10_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 11 - (INT 73h)
.equ IRQ11_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 12 (PS/2 mouse) - (INT 74h)
.equ IRQ12_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 13 (Floating point error) - (INT 75h)
.equ IRQ13_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 14 (Secondary IDE) - (INT 76h)
.equ IRQ14_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 15 (Primary IDE) - (INT 77h)
.equ IRQ15_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
IDT_END:
@@ -1101,7 +1101,7 @@ MemoryMap: .long 0,0,0,0,0,0,0,0 .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- #.org 0x0fe0 #Just for pass build
+ #.org 0x0fe0 #Just for pass build
MyStack:
# below is the pieces of the IVT that is used to redirect INT 68h - 6fh
# back to INT 08h - 0fh when in real mode... It is 'org'ed to a
@@ -1133,7 +1133,7 @@ MyStack: iret
- #.org 0x0ffe #Just for pass build
+ #.org 0x0ffe #Just for pass build
BlockSignature:
.word 0xaa55
diff --git a/DuetPkg/BootSector/st32_64.S b/DuetPkg/BootSector/st32_64.S index 747289b211..b16b41f0ec 100644 --- a/DuetPkg/BootSector/st32_64.S +++ b/DuetPkg/BootSector/st32_64.S @@ -89,7 +89,7 @@ BootSectorEntryPoint: NoVarStore:
pushw %es
# Set the 5th byte start @ 0:19000 to non-zero indicating we should init var store header in DxeIpl
- movb %al, %es:(4)
+ movb %al, %es:(4)
jmp SaveVolumeId
CheckVarStoreSize:
@@ -247,7 +247,7 @@ ReadCylinderLoop: movw $0x7bfc,%bp # bp = 0x7bfc
movl %esi,%eax # eax = Start LBA
xorl %edx,%edx # edx = 0
- movzwl (%bp), %ebx # bx = MaxSector
+ movzwl (%bp), %ebx # bx = MaxSector
divl %ebx # ax = StartLBA / MaxSector
incw %dx # dx = (StartLBA % MaxSector) + 1
@@ -369,7 +369,7 @@ MemMapLoop: MemMapDone:
leal MemoryMap, %eax
subl %eax,%edi # Get the address of the memory map
- movl %edi, MemoryMapSize # Save the size of the memory map
+ movl %edi, MemoryMapSize # Save the size of the memory map
xorl %ebx,%ebx
movw %cs,%bx # BX=segment
@@ -431,7 +431,7 @@ A20GateEnabled: leal OffsetIn32BitProtectedMode, %eax
addl $0x20000+0x6,%eax
- movl %eax, OffsetIn32BitProtectedMode
+ movl %eax, OffsetIn32BitProtectedMode
leal OffsetInLongMode, %eax
addl $0x20000+0x6,%eax
@@ -597,7 +597,7 @@ Empty8042Loop: .p2align 1
- gdtr: .long GDT_END - GDT_BASE - 1 # GDT limit
+ gdtr: .long GDT_END - GDT_BASE - 1 # GDT limit
.long 0 # (GDT base gets set above)
##############################################################################
# global descriptor table (GDT)
@@ -716,366 +716,366 @@ idtr: .long IDT_END - IDT_BASE - 1 # IDT limit IDT_BASE:
# divide by zero (INT 0)
.equ DIV_ZERO_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# debug exception (INT 1)
.equ DEBUG_EXCEPT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# NMI (INT 2)
.equ NMI_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# soft breakpoint (INT 3)
.equ BREAKPOINT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# overflow (INT 4)
.equ OVERFLOW_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# bounds check (INT 5)
.equ BOUNDS_CHECK_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# invalid opcode (INT 6)
.equ INVALID_OPCODE_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# device not available (INT 7)
.equ DEV_NOT_AVAIL_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# double fault (INT 8)
.equ DOUBLE_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# Coprocessor segment overrun - reserved (INT 9)
.equ RSVD_INTR_SEL1, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# invalid TSS (INT 0ah)
.equ INVALID_TSS_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# segment not present (INT 0bh)
.equ SEG_NOT_PRESENT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# stack fault (INT 0ch)
.equ STACK_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# general protection (INT 0dh)
.equ GP_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# page fault (INT 0eh)
.equ PAGE_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# Intel reserved - do not use (INT 0fh)
.equ RSVD_INTR_SEL2, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# floating point error (INT 10h)
.equ FLT_POINT_ERR_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# alignment check (INT 11h)
.equ ALIGNMENT_CHECK_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# machine check (INT 12h)
.equ MACHINE_CHECK_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# SIMD floating-point exception (INT 13h)
.equ SIMD_EXCEPTION_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# 85 unspecified descriptors, First 12 of them are reserved, the rest are avail
- .fill 85 * 16, 1, 0 # db (85 * 16) dup(0)
+ .fill 85 * 16, 1, 0 # db (85 * 16) dup(0)
# IRQ 0 (System timer) - (INT 68h)
.equ IRQ0_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 1 (8042 Keyboard controller) - (INT 69h)
.equ IRQ1_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# Reserved - IRQ 2 redirect (IRQ 2) - DO NOT USE!!! - (INT 6ah)
.equ IRQ2_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 3 (COM 2) - (INT 6bh)
.equ IRQ3_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 4 (COM 1) - (INT 6ch)
.equ IRQ4_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 5 (LPT 2) - (INT 6dh)
.equ IRQ5_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 6 (Floppy controller) - (INT 6eh)
.equ IRQ6_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 7 (LPT 1) - (INT 6fh)
.equ IRQ7_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 8 (RTC Alarm) - (INT 70h)
.equ IRQ8_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 9 - (INT 71h)
.equ IRQ9_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 10 - (INT 72h)
.equ IRQ10_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 11 - (INT 73h)
.equ IRQ11_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 12 (PS/2 mouse) - (INT 74h)
.equ IRQ12_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 13 (Floating point error) - (INT 75h)
.equ IRQ13_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 14 (Secondary IDE) - (INT 76h)
.equ IRQ14_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 15 (Primary IDE) - (INT 77h)
.equ IRQ15_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
IDT_END:
@@ -1116,7 +1116,7 @@ MemoryMap: .long 0,0,0,0,0,0,0,0 .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- #.org 0x0fe0 #Just for pass build
+ #.org 0x0fe0 #Just for pass build
MyStack:
# below is the pieces of the IVT that is used to redirect INT 68h - 6fh
# back to INT 08h - 0fh when in real mode... It is 'org'ed to a
@@ -1148,7 +1148,7 @@ MyStack: iret
- #.org 0x0ffe #Just for pass build
+ #.org 0x0ffe #Just for pass build
BlockSignature:
.word 0xaa55
diff --git a/DuetPkg/BootSector/start.S b/DuetPkg/BootSector/start.S index 177e9ae82e..183ebe2065 100644 --- a/DuetPkg/BootSector/start.S +++ b/DuetPkg/BootSector/start.S @@ -18,7 +18,7 @@ .stack:
.486p:
.code16
-
+
.equ FAT_DIRECTORY_ENTRY_SIZE, 0x020
.equ FAT_DIRECTORY_ENTRY_SHIFT, 5
.equ BLOCK_SIZE, 0x0200
@@ -715,7 +715,7 @@ IDT_BASE: .word 0 # offset 31:16
# 85 unspecified descriptors, First 12 of them are reserved, the rest are avail
- .fill 85 * 8, 1, 0 # db (85 * 8) dup(0)
+ .fill 85 * 8, 1, 0 # db (85 * 8) dup(0)
# IRQ 0 (System timer) - (INT 0x68)
.equ IRQ0_SEL, .-IDT_BASE
diff --git a/DuetPkg/BootSector/start64.S b/DuetPkg/BootSector/start64.S index 39e5869fe2..3269b221ae 100644 --- a/DuetPkg/BootSector/start64.S +++ b/DuetPkg/BootSector/start64.S @@ -54,7 +54,7 @@ SystemId: .ascii "FAT12 " # SystemId - 8 bytes BootSectorEntryPoint:
# ASSUME ds:@code"
- # ASSUME ss:@code"
+ # ASSUME ss:@code"
# ds = 1000, es = 2000 + x (size of first cluster >> 4)
# cx = Start Cluster of EfiLdr
# dx = Start Cluster of Efivar.bin
@@ -74,7 +74,7 @@ BootSectorEntryPoint: NoVarStore:
pushw %es
# Set the 5th byte start @ 0:19000 to non-zero indicating we should init var store header in DxeIpl
- movb %al, %es:(4)
+ movb %al, %es:(4)
jmp SaveVolumeId
CheckVarStoreSize:
@@ -86,7 +86,7 @@ CheckVarStoreSize: LoadVarStore:
movb $0,%al
movb %al, %es:(4)
- movw (%di), %cx
+ movw (%di), %cx
# ES:DI = 1500:0
xorw %di,%di
pushw %es
@@ -98,7 +98,7 @@ SaveVolumeId: movw VolId(%bp), %ax
movw %ax, %es:(0)
movw VolId+2(%bp), %ax
- movw %ax, %es:(2)
+ movw %ax, %es:(2)
# Read Efildr
popw %cx
@@ -166,7 +166,7 @@ FatChainLoop: pushw %si # Save si
movw %ax,%si # si = FatOffset
shrw $BLOCK_SHIFT, %ax # ax = FatOffset >> BLOCK_SHIFT
- addw ReservedSectors(%bp), %ax # ax = FatSectorNumber = ReservedSectors + (FatOffset >> BLOCK_OFFSET)
+ addw ReservedSectors(%bp), %ax # ax = FatSectorNumber = ReservedSectors + (FatOffset >> BLOCK_OFFSET)
andw $BLOCK_MASK, %si # si = FatOffset & BLOCK_MASK
cmpw %dx,%ax # Compare FatSectorNumber to CachedFatSectorNumber
je SkipFatRead
@@ -178,7 +178,7 @@ FatChainLoop: popw %es
movw %ax,%dx # CachedFatSectorNumber = FatSectorNumber
SkipFatRead:
- movw (%si), %bx # bx = NextClusterNumber
+ movw (%si), %bx # bx = NextClusterNumber
movw %cx,%ax # ax = ClusterNumber
andw $1,%ax # See if this is an odd cluster number
je EvenFatEntry
@@ -200,9 +200,9 @@ ReadClusters: movw %bx,%cx # ClusterNumber = NextClusterNumber
subw $2,%ax # ax = StartCluster - 2
xorb %bh,%bh
- movb SectorsPerCluster(%bp), %bl # bx = SectorsPerCluster
+ movb SectorsPerCluster(%bp), %bl # bx = SectorsPerCluster
mulw %bx # ax = (StartCluster - 2) * SectorsPerCluster
- addw (%bp), %ax # ax = FirstClusterLBA + (StartCluster-2)*SectorsPerCluster
+ addw (%bp), %ax # ax = FirstClusterLBA + (StartCluster-2)*SectorsPerCluster
pushw %ax # save start sector
movw %si,%ax # ax = NumberOfClusters
mulw %bx # ax = NumberOfClusters * SectorsPerCluster
@@ -243,7 +243,7 @@ ReadCylinderLoop: divl %ebx # ax = StartLBA / MaxSector
incw %dx # dx = (StartLBA % MaxSector) + 1
- movw (%bp), %bx # bx = MaxSector
+ movw (%bp), %bx # bx = MaxSector
subw %dx,%bx # bx = MaxSector - Sector
incw %bx # bx = MaxSector - Sector + 1
cmpw %bx,%cx # Compare (Blocks) to (MaxSector - Sector + 1)
@@ -311,11 +311,11 @@ Halt: ErrorString:
.byte 'S', 0x0c, 'E', 0x0c, 'r', 0x0c, 'r', 0x0c, 'o', 0x0c, 'r', 0x0c, '!',0x0c
- .org 0x01fa
+ .org 0x01fa
LBAOffsetForBootSector:
.long 0x0
- .org 0x01fe
+ .org 0x01fe
.word 0xaa55
#******************************************************************************
@@ -328,7 +328,7 @@ LBAOffsetForBootSector: .equ WRITE_DATA_PORT_CMD, 0x0d1 # 8042 command to write the data port
.equ ENABLE_A20_CMD, 0x0df # 8042 command to enable A20
- .org 0x200
+ .org 0x200
jmp start
Em64String:
.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
@@ -361,7 +361,7 @@ MemMapLoop: MemMapDone:
leal MemoryMap, %eax
subl %eax,%edi # Get the address of the memory map
- movl %edi, MemoryMapSize # Save the size of the memory map
+ movl %edi, MemoryMapSize # Save the size of the memory map
xorl %ebx,%ebx
movw %cs,%bx # BX=segment
@@ -423,7 +423,7 @@ A20GateEnabled: leal OffsetIn32BitProtectedMode, %eax
addl $0x20000+0x6,%eax
- movl %eax, OffsetIn32BitProtectedMode
+ movl %eax, OffsetIn32BitProtectedMode
leal OffsetInLongMode, %eax
addl $0x20000+0x6,%eax
@@ -589,7 +589,7 @@ Empty8042Loop: .p2align 1
- gdtr: .long GDT_END - GDT_BASE - 1 # GDT limit
+ gdtr: .long GDT_END - GDT_BASE - 1 # GDT limit
.long 0 # (GDT base gets set above)
##############################################################################
# global descriptor table (GDT)
@@ -708,366 +708,366 @@ idtr: .long IDT_END - IDT_BASE - 1 # IDT limit IDT_BASE:
# divide by zero (INT 0)
.equ DIV_ZERO_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# debug exception (INT 1)
.equ DEBUG_EXCEPT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# NMI (INT 2)
.equ NMI_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# soft breakpoint (INT 3)
.equ BREAKPOINT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# overflow (INT 4)
.equ OVERFLOW_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# bounds check (INT 5)
.equ BOUNDS_CHECK_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# invalid opcode (INT 6)
.equ INVALID_OPCODE_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# device not available (INT 7)
.equ DEV_NOT_AVAIL_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# double fault (INT 8)
.equ DOUBLE_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# Coprocessor segment overrun - reserved (INT 9)
.equ RSVD_INTR_SEL1, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# invalid TSS (INT 0ah)
.equ INVALID_TSS_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# segment not present (INT 0bh)
.equ SEG_NOT_PRESENT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# stack fault (INT 0ch)
.equ STACK_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# general protection (INT 0dh)
.equ GP_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# page fault (INT 0eh)
.equ PAGE_FAULT_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# Intel reserved - do not use (INT 0fh)
.equ RSVD_INTR_SEL2, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# floating point error (INT 10h)
.equ FLT_POINT_ERR_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# alignment check (INT 11h)
.equ ALIGNMENT_CHECK_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# machine check (INT 12h)
.equ MACHINE_CHECK_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# SIMD floating-point exception (INT 13h)
.equ SIMD_EXCEPTION_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# 85 unspecified descriptors, First 12 of them are reserved, the rest are avail
- .fill 85 * 16, 1, 0 # db (85 * 16) dup(0)
+ .fill 85 * 16, 1, 0 # db (85 * 16) dup(0)
# IRQ 0 (System timer) - (INT 68h)
.equ IRQ0_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 1 (8042 Keyboard controller) - (INT 69h)
.equ IRQ1_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# Reserved - IRQ 2 redirect (IRQ 2) - DO NOT USE!!! - (INT 6ah)
.equ IRQ2_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 3 (COM 2) - (INT 6bh)
.equ IRQ3_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 4 (COM 1) - (INT 6ch)
.equ IRQ4_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 5 (LPT 2) - (INT 6dh)
.equ IRQ5_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 6 (Floppy controller) - (INT 6eh)
.equ IRQ6_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 7 (LPT 1) - (INT 6fh)
.equ IRQ7_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 8 (RTC Alarm) - (INT 70h)
.equ IRQ8_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 9 - (INT 71h)
.equ IRQ9_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 10 - (INT 72h)
.equ IRQ10_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 11 - (INT 73h)
.equ IRQ11_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 12 (PS/2 mouse) - (INT 74h)
.equ IRQ12_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 13 (Floating point error) - (INT 75h)
.equ IRQ13_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 14 (Secondary IDE) - (INT 76h)
.equ IRQ14_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
# IRQ 15 (Primary IDE) - (INT 77h)
.equ IRQ15_SEL, .-IDT_BASE
- .word 0 # offset 15:0
+ .word 0 # offset 15:0
.long SYS_CODE64_SEL # selector 15:0
.byte 0 # 0 for interrupt gate
.byte 0x0e | 0x80 # type = 386 interrupt gate, present
- .word 0 # offset 31:16
- .long 0 # offset 63:32
- .long 0 # 0 for reserved
+ .word 0 # offset 31:16
+ .long 0 # offset 63:32
+ .long 0 # 0 for reserved
IDT_END:
@@ -1108,7 +1108,7 @@ MemoryMap: .long 0,0,0,0,0,0,0,0 .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- .org 0x0fe0
+ .org 0x0fe0
MyStack:
# below is the pieces of the IVT that is used to redirect INT 68h - 6fh
# back to INT 08h - 0fh when in real mode... It is 'org'ed to a
@@ -1140,7 +1140,7 @@ MyStack: iret
- .org 0x0ffe
+ .org 0x0ffe
BlockSignature:
.word 0xaa55
|