x86: Drop -Wa,--divide
Fix up all the code that is using / to use >> for divisions instead. Change-Id: I8a6deb0aa090e0df71d90a5509c911b295833cea Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10819 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
cfa9b99b23
commit
4a45ec43fe
@ -247,9 +247,6 @@ $(objgenerated)/crt0.S: $$(crt0s)
|
|||||||
# Compiling crt0 with -g seems to trigger https://sourceware.org/bugzilla/show_bug.cgi?id=6428
|
# Compiling crt0 with -g seems to trigger https://sourceware.org/bugzilla/show_bug.cgi?id=6428
|
||||||
romstage-S-ccopts += -I. -g0
|
romstage-S-ccopts += -I. -g0
|
||||||
|
|
||||||
# Some cache as ram code is doing divisions
|
|
||||||
romstage-S-ccopts +=-Wa,--divide
|
|
||||||
|
|
||||||
endif # CONFIG_ARCH_ROMSTAGE_X86_32 / CONFIG_ARCH_ROMSTAGE_X86_64
|
endif # CONFIG_ARCH_ROMSTAGE_X86_32 / CONFIG_ARCH_ROMSTAGE_X86_64
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -240,15 +240,15 @@ clear_fixed_var_mtrr_out:
|
|||||||
* windowoffset is the 32k-aligned window into CAR size.
|
* windowoffset is the 32k-aligned window into CAR size.
|
||||||
*/
|
*/
|
||||||
.macro simplemask carsize, windowoffset
|
.macro simplemask carsize, windowoffset
|
||||||
.set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000) - 4)
|
.set gas_bug_workaround,(((\carsize - \windowoffset) >> 12) - 4)
|
||||||
extractmask gas_bug_workaround, %eax
|
extractmask gas_bug_workaround, %eax
|
||||||
.set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000))
|
.set gas_bug_workaround,(((\carsize - \windowoffset) >> 12))
|
||||||
extractmask gas_bug_workaround, %edx
|
extractmask gas_bug_workaround, %edx
|
||||||
/*
|
/*
|
||||||
* Without the gas bug workaround, the entire macro would consist
|
* Without the gas bug workaround, the entire macro would consist
|
||||||
* only of the two lines below:
|
* only of the two lines below:
|
||||||
* extractmask (((\carsize - \windowoffset) / 0x1000) - 4), %eax
|
* extractmask (((\carsize - \windowoffset) >> 12) - 4), %eax
|
||||||
* extractmask (((\carsize - \windowoffset) / 0x1000)), %edx
|
* extractmask (((\carsize - \windowoffset) >> 12)), %edx
|
||||||
*/
|
*/
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ done_cache_as_ram_main:
|
|||||||
/* We now run over the stack-in-cache, copying it back to itself to invalidate the cache */
|
/* We now run over the stack-in-cache, copying it back to itself to invalidate the cache */
|
||||||
|
|
||||||
push %edi
|
push %edi
|
||||||
mov $(CONFIG_DCACHE_RAM_SIZE/4),%ecx
|
mov $(CONFIG_DCACHE_RAM_SIZE >> 2),%ecx
|
||||||
push %esi
|
push %esi
|
||||||
mov $(CONFIG_DCACHE_RAM_BASE),%edi
|
mov $(CONFIG_DCACHE_RAM_BASE),%edi
|
||||||
mov %edi,%esi
|
mov %edi,%esi
|
||||||
|
@ -192,7 +192,7 @@ done_cache_as_ram_main:
|
|||||||
* copying it back to itself to invalidate the cache */
|
* copying it back to itself to invalidate the cache */
|
||||||
|
|
||||||
push %edi
|
push %edi
|
||||||
mov $(CONFIG_DCACHE_RAM_SIZE/4),%ecx
|
mov $(CONFIG_DCACHE_RAM_SIZE >> 2),%ecx
|
||||||
push %esi
|
push %esi
|
||||||
mov $(CONFIG_DCACHE_RAM_BASE),%edi
|
mov $(CONFIG_DCACHE_RAM_BASE),%edi
|
||||||
mov %edi,%esi
|
mov %edi,%esi
|
||||||
|
@ -195,15 +195,15 @@ clear_fixed_var_mtrr_out:
|
|||||||
* windowoffset is the 32k-aligned window into CAR size.
|
* windowoffset is the 32k-aligned window into CAR size.
|
||||||
*/
|
*/
|
||||||
.macro simplemask carsize, windowoffset
|
.macro simplemask carsize, windowoffset
|
||||||
.set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000) - 4)
|
.set gas_bug_workaround,(((\carsize - \windowoffset) >> 12) - 4)
|
||||||
extractmask gas_bug_workaround, %eax
|
extractmask gas_bug_workaround, %eax
|
||||||
.set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000))
|
.set gas_bug_workaround,(((\carsize - \windowoffset) >> 12))
|
||||||
extractmask gas_bug_workaround, %edx
|
extractmask gas_bug_workaround, %edx
|
||||||
/*
|
/*
|
||||||
* Without the gas bug workaround, the entire macro would consist
|
* Without the gas bug workaround, the entire macro would consist
|
||||||
* only of the two lines below:
|
* only of the two lines below:
|
||||||
* extractmask (((\carsize - \windowoffset) / 0x1000) - 4), %eax
|
* extractmask (((\carsize - \windowoffset) >> 12) - 4), %eax
|
||||||
* extractmask (((\carsize - \windowoffset) / 0x1000)), %edx
|
* extractmask (((\carsize - \windowoffset) >> 12)), %edx
|
||||||
*/
|
*/
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ cache_as_ram:
|
|||||||
* For hyper-threaded CPUs these are shared.
|
* For hyper-threaded CPUs these are shared.
|
||||||
*/
|
*/
|
||||||
movl $mtrr_table, %esi
|
movl $mtrr_table, %esi
|
||||||
movl $((mtrr_table_end - mtrr_table) / 2), %edi
|
movl $((mtrr_table_end - mtrr_table) >> 1), %edi
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
clear_mtrrs:
|
clear_mtrrs:
|
||||||
@ -296,7 +296,7 @@ no_msr_11e:
|
|||||||
cld
|
cld
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
movl $CACHE_AS_RAM_BASE, %edi
|
movl $CACHE_AS_RAM_BASE, %edi
|
||||||
movl $(CACHE_AS_RAM_SIZE / 4), %ecx
|
movl $(CACHE_AS_RAM_SIZE >> 2), %ecx
|
||||||
rep stosl
|
rep stosl
|
||||||
|
|
||||||
/* Enable Cache-as-RAM mode by disabling cache. */
|
/* Enable Cache-as-RAM mode by disabling cache. */
|
||||||
|
@ -60,7 +60,7 @@ wait_for_sipi:
|
|||||||
post_code(0x21)
|
post_code(0x21)
|
||||||
/* Zero out all fixed range and variable range MTRRs. */
|
/* Zero out all fixed range and variable range MTRRs. */
|
||||||
movl $mtrr_table, %esi
|
movl $mtrr_table, %esi
|
||||||
movl $((mtrr_table_end - mtrr_table) / 2), %edi
|
movl $((mtrr_table_end - mtrr_table) >> 1), %edi
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
clear_mtrrs:
|
clear_mtrrs:
|
||||||
@ -116,7 +116,7 @@ clear_mtrrs:
|
|||||||
/* Clear the cache memory region. This will also fill up the cache */
|
/* Clear the cache memory region. This will also fill up the cache */
|
||||||
movl $CACHE_AS_RAM_BASE, %esi
|
movl $CACHE_AS_RAM_BASE, %esi
|
||||||
movl %esi, %edi
|
movl %esi, %edi
|
||||||
movl $(CACHE_AS_RAM_SIZE / 4), %ecx
|
movl $(CACHE_AS_RAM_SIZE >> 2), %ecx
|
||||||
// movl $0x23322332, %eax
|
// movl $0x23322332, %eax
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
rep stosl
|
rep stosl
|
||||||
|
@ -57,7 +57,7 @@ wait_for_sipi:
|
|||||||
post_code(0x22)
|
post_code(0x22)
|
||||||
/* Zero out all fixed range MTRRs. */
|
/* Zero out all fixed range MTRRs. */
|
||||||
movl $mtrr_table, %esi
|
movl $mtrr_table, %esi
|
||||||
movl $((mtrr_table_end - mtrr_table) / 2), %edi
|
movl $((mtrr_table_end - mtrr_table) >> 1), %edi
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
clear_mtrrs:
|
clear_mtrrs:
|
||||||
@ -121,7 +121,7 @@ clear_var_mtrrs:
|
|||||||
/* Clear the cache memory region. This will also fill up the cache */
|
/* Clear the cache memory region. This will also fill up the cache */
|
||||||
movl $CACHE_AS_RAM_BASE, %esi
|
movl $CACHE_AS_RAM_BASE, %esi
|
||||||
movl %esi, %edi
|
movl %esi, %edi
|
||||||
movl $(CACHE_AS_RAM_SIZE / 4), %ecx
|
movl $(CACHE_AS_RAM_SIZE >> 2), %ecx
|
||||||
// movl $0x23322332, %eax
|
// movl $0x23322332, %eax
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
rep stosl
|
rep stosl
|
||||||
|
@ -55,7 +55,7 @@ wait_for_sipi:
|
|||||||
post_code(0x21)
|
post_code(0x21)
|
||||||
/* Zero out all fixed range and variable range MTRRs. */
|
/* Zero out all fixed range and variable range MTRRs. */
|
||||||
movl $mtrr_table, %esi
|
movl $mtrr_table, %esi
|
||||||
movl $((mtrr_table_end - mtrr_table) / 2), %edi
|
movl $((mtrr_table_end - mtrr_table) >> 1), %edi
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
clear_mtrrs:
|
clear_mtrrs:
|
||||||
@ -111,7 +111,7 @@ clear_mtrrs:
|
|||||||
/* Clear the cache memory region. This will also fill up the cache */
|
/* Clear the cache memory region. This will also fill up the cache */
|
||||||
movl $CACHE_AS_RAM_BASE, %esi
|
movl $CACHE_AS_RAM_BASE, %esi
|
||||||
movl %esi, %edi
|
movl %esi, %edi
|
||||||
movl $(CACHE_AS_RAM_SIZE / 4), %ecx
|
movl $(CACHE_AS_RAM_SIZE >> 2), %ecx
|
||||||
// movl $0x23322332, %eax
|
// movl $0x23322332, %eax
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
rep stosl
|
rep stosl
|
||||||
@ -298,7 +298,7 @@ before_romstage:
|
|||||||
cld
|
cld
|
||||||
movl $CONFIG_RAMBASE, %esi
|
movl $CONFIG_RAMBASE, %esi
|
||||||
movl CBMEM_RESUME_BACKUP, %edi
|
movl CBMEM_RESUME_BACKUP, %edi
|
||||||
movl $HIGH_MEMORY_SAVE / 4, %ecx
|
movl $HIGH_MEMORY_SAVE >> 2, %ecx
|
||||||
rep movsl
|
rep movsl
|
||||||
|
|
||||||
__acpi_resume_backup_done:
|
__acpi_resume_backup_done:
|
||||||
|
@ -40,7 +40,7 @@ cache_as_ram:
|
|||||||
|
|
||||||
/* Zero out all fixed range and variable range MTRRs. */
|
/* Zero out all fixed range and variable range MTRRs. */
|
||||||
movl $mtrr_table, %esi
|
movl $mtrr_table, %esi
|
||||||
movl $((mtrr_table_end - mtrr_table) / 2), %edi
|
movl $((mtrr_table_end - mtrr_table) >> 1), %edi
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
clear_mtrrs:
|
clear_mtrrs:
|
||||||
@ -90,7 +90,7 @@ clear_mtrrs:
|
|||||||
/* Clear the cache memory reagion. */
|
/* Clear the cache memory reagion. */
|
||||||
movl $CACHE_AS_RAM_BASE, %esi
|
movl $CACHE_AS_RAM_BASE, %esi
|
||||||
movl %esi, %edi
|
movl %esi, %edi
|
||||||
movl $(CACHE_AS_RAM_SIZE / 4), %ecx
|
movl $(CACHE_AS_RAM_SIZE >> 2), %ecx
|
||||||
// movl $0x23322332, %eax
|
// movl $0x23322332, %eax
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
rep stosl
|
rep stosl
|
||||||
|
@ -36,7 +36,7 @@ cache_as_ram:
|
|||||||
/* Clear the cache memory region. This will also fill up the cache */
|
/* Clear the cache memory region. This will also fill up the cache */
|
||||||
movl $CACHE_AS_RAM_BASE, %esi
|
movl $CACHE_AS_RAM_BASE, %esi
|
||||||
movl %esi, %edi
|
movl %esi, %edi
|
||||||
movl $(CACHE_AS_RAM_SIZE / 4), %ecx
|
movl $(CACHE_AS_RAM_SIZE >> 2), %ecx
|
||||||
// movl $0x23322332, %eax
|
// movl $0x23322332, %eax
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
rep stosl
|
rep stosl
|
||||||
|
@ -82,7 +82,7 @@ wait_for_sipi:
|
|||||||
|
|
||||||
/* Zero out all fixed range and variable range MTRRs. */
|
/* Zero out all fixed range and variable range MTRRs. */
|
||||||
movl $fixed_mtrr_table, %esi
|
movl $fixed_mtrr_table, %esi
|
||||||
movl $((fixed_mtrr_table_end - fixed_mtrr_table) / 2), %edi
|
movl $((fixed_mtrr_table_end - fixed_mtrr_table) >> 1), %edi
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
1:
|
1:
|
||||||
@ -152,7 +152,7 @@ wait_for_sipi:
|
|||||||
/* Clear the cache memory region. This will also fill up the cache */
|
/* Clear the cache memory region. This will also fill up the cache */
|
||||||
movl $CACHE_AS_RAM_BASE, %esi
|
movl $CACHE_AS_RAM_BASE, %esi
|
||||||
movl %esi, %edi
|
movl %esi, %edi
|
||||||
movl $(CACHE_AS_RAM_SIZE / 4), %ecx
|
movl $(CACHE_AS_RAM_SIZE >> 2), %ecx
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
rep stosl
|
rep stosl
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ wait_for_sipi:
|
|||||||
post_code(0x21)
|
post_code(0x21)
|
||||||
/* Zero out all fixed range and variable range MTRRs. */
|
/* Zero out all fixed range and variable range MTRRs. */
|
||||||
movl $mtrr_table, %esi
|
movl $mtrr_table, %esi
|
||||||
movl $((mtrr_table_end - mtrr_table) / 2), %edi
|
movl $((mtrr_table_end - mtrr_table) >> 1), %edi
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
clear_mtrrs:
|
clear_mtrrs:
|
||||||
@ -119,7 +119,7 @@ clear_mtrrs:
|
|||||||
/* Clear the cache memory region. This will also fill up the cache */
|
/* Clear the cache memory region. This will also fill up the cache */
|
||||||
movl $CACHE_AS_RAM_BASE, %esi
|
movl $CACHE_AS_RAM_BASE, %esi
|
||||||
movl %esi, %edi
|
movl %esi, %edi
|
||||||
movl $(CACHE_AS_RAM_SIZE / 4), %ecx
|
movl $(CACHE_AS_RAM_SIZE >> 2), %ecx
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
rep stosl
|
rep stosl
|
||||||
|
|
||||||
|
@ -1380,7 +1380,7 @@ SetupStack:
|
|||||||
or %ah, %ah
|
or %ah, %ah
|
||||||
jne 2f
|
jne 2f
|
||||||
# Is BSP, assign a 64K stack
|
# Is BSP, assign a 64K stack
|
||||||
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE / 0x1000)), %ebx
|
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE >> 12)), %ebx
|
||||||
mov $BSP_STACK_BASE_ADDR, %ebp
|
mov $BSP_STACK_BASE_ADDR, %ebp
|
||||||
jmp 0f
|
jmp 0f
|
||||||
#.else # node 1 to 7, core0
|
#.else # node 1 to 7, core0
|
||||||
@ -1389,7 +1389,7 @@ SetupStack:
|
|||||||
mov $AMD_MTRR_FIX16k_80000, %bx
|
mov $AMD_MTRR_FIX16k_80000, %bx
|
||||||
shl $16, %ebx #
|
shl $16, %ebx #
|
||||||
mov %ah, %bh # Node# is used as slot#
|
mov %ah, %bh # Node# is used as slot#
|
||||||
mov $(CORE0_STACK_SIZE / 0x1000), %bl
|
mov $(CORE0_STACK_SIZE >> 12), %bl
|
||||||
mov %ah, %al # Base = (Node# * Size)#
|
mov %ah, %al # Base = (Node# * Size)#
|
||||||
mul %bl #
|
mul %bl #
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
@ -1411,7 +1411,7 @@ SetupStack:
|
|||||||
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
||||||
shr $4, %bh #
|
shr $4, %bh #
|
||||||
add $4, %bh #
|
add $4, %bh #
|
||||||
mov $(CORE1_STACK_SIZE / 0x1000), %bl
|
mov $(CORE1_STACK_SIZE >> 12), %bl
|
||||||
|
|
||||||
mul %bl # Base = ( (CoreIndex * Size) ...
|
mul %bl # Base = ( (CoreIndex * Size) ...
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
|
@ -1374,7 +1374,7 @@ SetupStack:
|
|||||||
or %ah, %ah
|
or %ah, %ah
|
||||||
jne 2f
|
jne 2f
|
||||||
# Is BSP, assign a 64K stack
|
# Is BSP, assign a 64K stack
|
||||||
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE / 0x1000)), %ebx
|
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE >> 12)), %ebx
|
||||||
mov $BSP_STACK_BASE_ADDR, %ebp
|
mov $BSP_STACK_BASE_ADDR, %ebp
|
||||||
jmp 0f
|
jmp 0f
|
||||||
#.else # node 1 to 7, core0
|
#.else # node 1 to 7, core0
|
||||||
@ -1383,7 +1383,7 @@ SetupStack:
|
|||||||
mov $AMD_MTRR_FIX16k_80000, %bx
|
mov $AMD_MTRR_FIX16k_80000, %bx
|
||||||
shl $16, %ebx #
|
shl $16, %ebx #
|
||||||
mov %ah, %bh # Node# is used as slot#
|
mov %ah, %bh # Node# is used as slot#
|
||||||
mov $(CORE0_STACK_SIZE / 0x1000), %bl
|
mov $(CORE0_STACK_SIZE >> 12), %bl
|
||||||
mov %ah, %al # Base = (Node# * Size)#
|
mov %ah, %al # Base = (Node# * Size)#
|
||||||
mul %bl #
|
mul %bl #
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
@ -1405,7 +1405,7 @@ SetupStack:
|
|||||||
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
||||||
shr $4, %bh #
|
shr $4, %bh #
|
||||||
add $4, %bh #
|
add $4, %bh #
|
||||||
mov $(CORE1_STACK_SIZE / 0x1000), %bl
|
mov $(CORE1_STACK_SIZE >> 12), %bl
|
||||||
|
|
||||||
mul %bl # Base = ( (CoreIndex * Size) ...
|
mul %bl # Base = ( (CoreIndex * Size) ...
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
|
@ -1388,7 +1388,7 @@ SetupStack:
|
|||||||
or %ah, %ah
|
or %ah, %ah
|
||||||
jne 2f
|
jne 2f
|
||||||
# Is BSP, assign a 64K stack
|
# Is BSP, assign a 64K stack
|
||||||
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE / 0x1000)), %ebx
|
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE >> 12)), %ebx
|
||||||
mov $BSP_STACK_BASE_ADDR, %ebp
|
mov $BSP_STACK_BASE_ADDR, %ebp
|
||||||
jmp 0f
|
jmp 0f
|
||||||
#.else # node 1 to 7, core0
|
#.else # node 1 to 7, core0
|
||||||
@ -1397,7 +1397,7 @@ SetupStack:
|
|||||||
mov $AMD_MTRR_FIX16k_80000, %bx
|
mov $AMD_MTRR_FIX16k_80000, %bx
|
||||||
shl $16, %ebx #
|
shl $16, %ebx #
|
||||||
mov %ah, %bh # Node# is used as slot#
|
mov %ah, %bh # Node# is used as slot#
|
||||||
mov $(CORE0_STACK_SIZE / 0x1000), %bl
|
mov $(CORE0_STACK_SIZE >> 12), %bl
|
||||||
mov %ah, %al # Base = (Node# * Size)#
|
mov %ah, %al # Base = (Node# * Size)#
|
||||||
mul %bl #
|
mul %bl #
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
@ -1419,7 +1419,7 @@ SetupStack:
|
|||||||
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
||||||
shr $4, %bh #
|
shr $4, %bh #
|
||||||
add $4, %bh #
|
add $4, %bh #
|
||||||
mov $(CORE1_STACK_SIZE / 0x1000), %bl
|
mov $(CORE1_STACK_SIZE >> 12), %bl
|
||||||
|
|
||||||
mul %bl # Base = ( (CoreIndex * Size) ...
|
mul %bl # Base = ( (CoreIndex * Size) ...
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
|
@ -1395,7 +1395,7 @@ SetupStack:
|
|||||||
or %ah, %ah
|
or %ah, %ah
|
||||||
jne 2f
|
jne 2f
|
||||||
# Is BSP, assign a 64K stack
|
# Is BSP, assign a 64K stack
|
||||||
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE / 0x1000)), %ebx
|
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE >> 12)), %ebx
|
||||||
mov $BSP_STACK_BASE_ADDR, %ebp
|
mov $BSP_STACK_BASE_ADDR, %ebp
|
||||||
jmp 0f
|
jmp 0f
|
||||||
#.else # node 1 to 7, core0
|
#.else # node 1 to 7, core0
|
||||||
@ -1404,7 +1404,7 @@ SetupStack:
|
|||||||
mov $AMD_MTRR_FIX16k_80000, %bx
|
mov $AMD_MTRR_FIX16k_80000, %bx
|
||||||
shl $16, %ebx #
|
shl $16, %ebx #
|
||||||
mov %ah, %bh # Node# is used as slot#
|
mov %ah, %bh # Node# is used as slot#
|
||||||
mov $(CORE0_STACK_SIZE / 0x1000), %bl
|
mov $(CORE0_STACK_SIZE >> 12), %bl
|
||||||
mov %ah, %al # Base = (Node# * Size)#
|
mov %ah, %al # Base = (Node# * Size)#
|
||||||
mul %bl #
|
mul %bl #
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
@ -1426,7 +1426,7 @@ SetupStack:
|
|||||||
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
||||||
shr $4, %bh #
|
shr $4, %bh #
|
||||||
add $4, %bh #
|
add $4, %bh #
|
||||||
mov $(CORE1_STACK_SIZE / 0x1000), %bl
|
mov $(CORE1_STACK_SIZE >> 12), %bl
|
||||||
|
|
||||||
mul %bl # Base = ( (CoreIndex * Size) ...
|
mul %bl # Base = ( (CoreIndex * Size) ...
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
|
@ -1704,7 +1704,7 @@ SetupStack:
|
|||||||
or %ah, %ah
|
or %ah, %ah
|
||||||
jne 2f
|
jne 2f
|
||||||
# Is BSP, assign a 64K stack
|
# Is BSP, assign a 64K stack
|
||||||
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE / 0x1000)), %ebx
|
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE >> 12)), %ebx
|
||||||
mov $BSP_STACK_BASE_ADDR, %ebp
|
mov $BSP_STACK_BASE_ADDR, %ebp
|
||||||
jmp 0f
|
jmp 0f
|
||||||
#.else # node 1 to 7, core0
|
#.else # node 1 to 7, core0
|
||||||
@ -1713,7 +1713,7 @@ SetupStack:
|
|||||||
mov $AMD_MTRR_FIX16k_80000, %bx
|
mov $AMD_MTRR_FIX16k_80000, %bx
|
||||||
shl $16, %ebx #
|
shl $16, %ebx #
|
||||||
mov %ah, %bh # Node# is used as slot#
|
mov %ah, %bh # Node# is used as slot#
|
||||||
mov $(CORE0_STACK_SIZE / 0x1000), %bl
|
mov $(CORE0_STACK_SIZE >> 12), %bl
|
||||||
mov %ah, %al # Base = (Node# * Size)#
|
mov %ah, %al # Base = (Node# * Size)#
|
||||||
mul %bl #
|
mul %bl #
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
@ -1735,7 +1735,7 @@ SetupStack:
|
|||||||
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
||||||
shr $4, %bh #
|
shr $4, %bh #
|
||||||
add $4, %bh #
|
add $4, %bh #
|
||||||
mov $(CORE1_STACK_SIZE / 0x1000), %bl
|
mov $(CORE1_STACK_SIZE >> 12), %bl
|
||||||
|
|
||||||
mul %bl # Base = ( (CoreIndex * Size) ...
|
mul %bl # Base = ( (CoreIndex * Size) ...
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
|
@ -1069,7 +1069,7 @@ SetupStack:
|
|||||||
or %ah, %ah
|
or %ah, %ah
|
||||||
jne 2f
|
jne 2f
|
||||||
# Is BSP, assign a 64K stack
|
# Is BSP, assign a 64K stack
|
||||||
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE / 0x1000)), %ebx
|
mov $((AMD_MTRR_FIX64k_00000 << 16) + (3 << 8) + (BSP_STACK_SIZE >> 12)), %ebx
|
||||||
mov $BSP_STACK_BASE_ADDR, %ebp
|
mov $BSP_STACK_BASE_ADDR, %ebp
|
||||||
jmp 0f
|
jmp 0f
|
||||||
#.else # node 1 to 7, core0
|
#.else # node 1 to 7, core0
|
||||||
@ -1078,7 +1078,7 @@ SetupStack:
|
|||||||
mov $AMD_MTRR_FIX16k_80000, %bx
|
mov $AMD_MTRR_FIX16k_80000, %bx
|
||||||
shl $16, %ebx #
|
shl $16, %ebx #
|
||||||
mov %ah, %bh # Node# is used as slot#
|
mov %ah, %bh # Node# is used as slot#
|
||||||
mov $(CORE0_STACK_SIZE / 0x1000), %bl
|
mov $(CORE0_STACK_SIZE >> 12), %bl
|
||||||
mov %ah, %al # Base = (Node# * Size)#
|
mov %ah, %al # Base = (Node# * Size)#
|
||||||
mul %bl #
|
mul %bl #
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
@ -1100,7 +1100,7 @@ SetupStack:
|
|||||||
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
mov %al, %bh # Slot# = (CoreIndex / 16) + 4#
|
||||||
shr $4, %bh #
|
shr $4, %bh #
|
||||||
add $4, %bh #
|
add $4, %bh #
|
||||||
mov $(CORE1_STACK_SIZE / 0x1000), %bl
|
mov $(CORE1_STACK_SIZE >> 12), %bl
|
||||||
|
|
||||||
mul %bl # Base = ( (CoreIndex * Size) ...
|
mul %bl # Base = ( (CoreIndex * Size) ...
|
||||||
movzx %ax, %eax #
|
movzx %ax, %eax #
|
||||||
|
Loading…
x
Reference in New Issue
Block a user