diff options
-rw-r--r-- | src/cpu/intel/car/core2/cache_as_ram.S | 11 | ||||
-rw-r--r-- | src/cpu/intel/car/non-evict/cache_as_ram.S | 11 | ||||
-rw-r--r-- | src/cpu/intel/car/p4-netburst/cache_as_ram.S | 11 | ||||
-rw-r--r-- | src/soc/intel/common/block/cpu/car/cache_as_ram.S | 11 |
4 files changed, 24 insertions, 20 deletions
diff --git a/src/cpu/intel/car/core2/cache_as_ram.S b/src/cpu/intel/car/core2/cache_as_ram.S index fffe3f80b4..b9104e624e 100644 --- a/src/cpu/intel/car/core2/cache_as_ram.S +++ b/src/cpu/intel/car/core2/cache_as_ram.S @@ -32,15 +32,16 @@ wait_for_sipi: post_code(POST_SOC_CLEAR_FIXED_MTRRS) /* Clear/disable fixed MTRRs */ - mov $fixed_mtrr_list_size, %ebx + mov $fixed_mtrr_list, %ebx xor %eax, %eax xor %edx, %edx clear_fixed_mtrr: - add $-2, %ebx - movzwl fixed_mtrr_list(%ebx), %ecx + movzwl (%ebx), %ecx wrmsr - jnz clear_fixed_mtrr + add $2, %ebx + cmp $fixed_mtrr_list_end, %ebx + jl clear_fixed_mtrr /* Figure out how many MTRRs we have, and clear them out */ mov $MTRR_CAP_MSR, %ecx @@ -202,6 +203,6 @@ fixed_mtrr_list: .word MTRR_FIX_4K_E8000 .word MTRR_FIX_4K_F0000 .word MTRR_FIX_4K_F8000 -fixed_mtrr_list_size = . - fixed_mtrr_list +fixed_mtrr_list_end: _cache_as_ram_setup_end: diff --git a/src/cpu/intel/car/non-evict/cache_as_ram.S b/src/cpu/intel/car/non-evict/cache_as_ram.S index 2ac660c9aa..d47fa725f1 100644 --- a/src/cpu/intel/car/non-evict/cache_as_ram.S +++ b/src/cpu/intel/car/non-evict/cache_as_ram.S @@ -43,15 +43,16 @@ wait_for_sipi: post_code(POST_SOC_CLEAR_FIXED_MTRRS) /* Clear/disable fixed MTRRs */ - mov $fixed_mtrr_list_size, %ebx + mov $fixed_mtrr_list, %ebx xor %eax, %eax xor %edx, %edx clear_fixed_mtrr: - add $-2, %ebx - movzwl fixed_mtrr_list(%ebx), %ecx + movzwl (%ebx), %ecx wrmsr - jnz clear_fixed_mtrr + add $2, %ebx + cmp $fixed_mtrr_list_end, %ebx + jl clear_fixed_mtrr /* Zero out all variable range MTRRs. */ movl $MTRR_CAP_MSR, %ecx @@ -256,6 +257,6 @@ fixed_mtrr_list: .word MTRR_FIX_4K_E8000 .word MTRR_FIX_4K_F0000 .word MTRR_FIX_4K_F8000 -fixed_mtrr_list_size = . - fixed_mtrr_list +fixed_mtrr_list_end: _cache_as_ram_setup_end: diff --git a/src/cpu/intel/car/p4-netburst/cache_as_ram.S b/src/cpu/intel/car/p4-netburst/cache_as_ram.S index 01abdf884f..efd0d17d54 100644 --- a/src/cpu/intel/car/p4-netburst/cache_as_ram.S +++ b/src/cpu/intel/car/p4-netburst/cache_as_ram.S @@ -28,15 +28,16 @@ cache_as_ram: jz ap_init /* Clear/disable fixed MTRRs */ - mov $fixed_mtrr_list_size, %ebx + mov $fixed_mtrr_list, %ebx xor %eax, %eax xor %edx, %edx clear_fixed_mtrr: - add $-2, %ebx - movzwl fixed_mtrr_list(%ebx), %ecx + movzwl (%ebx), %ecx wrmsr - jnz clear_fixed_mtrr + add $2, %ebx + cmp $fixed_mtrr_list_end, %ebx + jl clear_fixed_mtrr /* Figure out how many MTRRs we have, and clear them out */ mov $MTRR_CAP_MSR, %ecx @@ -402,6 +403,6 @@ fixed_mtrr_list: .word MTRR_FIX_4K_E8000 .word MTRR_FIX_4K_F0000 .word MTRR_FIX_4K_F8000 -fixed_mtrr_list_size = . - fixed_mtrr_list +fixed_mtrr_list_end: _cache_as_ram_setup_end: diff --git a/src/soc/intel/common/block/cpu/car/cache_as_ram.S b/src/soc/intel/common/block/cpu/car/cache_as_ram.S index 1b08af2f5c..a1e73f970a 100644 --- a/src/soc/intel/common/block/cpu/car/cache_as_ram.S +++ b/src/soc/intel/common/block/cpu/car/cache_as_ram.S @@ -101,15 +101,16 @@ no_reset: post_code(POST_SOC_NO_RESET) /* Clear/disable fixed MTRRs */ - mov $fixed_mtrr_list_size, %ebx + mov $fixed_mtrr_list, %ebx xor %eax, %eax xor %edx, %edx clear_fixed_mtrr: - add $-2, %ebx - movzwl fixed_mtrr_list(%ebx), %ecx + movzwl (%ebx), %ecx wrmsr - jnz clear_fixed_mtrr + add $2, %ebx + cmp $fixed_mtrr_list_end, %ebx + jl clear_fixed_mtrr post_code(POST_SOC_CLEAR_FIXED_MTRRS) @@ -317,7 +318,7 @@ fixed_mtrr_list: .word MTRR_FIX_4K_E8000 .word MTRR_FIX_4K_F0000 .word MTRR_FIX_4K_F8000 -fixed_mtrr_list_size = . - fixed_mtrr_list +fixed_mtrr_list_end: #if CONFIG(INTEL_CAR_NEM) .global car_nem |