From 8414eed5a04004a886cafc65763ff5448ff805dd Mon Sep 17 00:00:00 2001 From: Alexander Goncharov Date: Thu, 16 Mar 2023 14:03:20 +0400 Subject: [PATCH] cpu/qemu-x86/cache_as_ram_bootblock: drop duplicated post code Before the bootblock stage starts setting up the CAR mode, it sends `POST_BOOTBLOCK_CAR` POST code. However, before the definition for `POST_BOOTBLOCK_CAR` was introduced in the commit 0d34a50a360228138ade623e799b03eaba83b0a5 , the value `0x20` was used. At that point, `0x20` means "entry into CAR mode" and `0x21` means "the cache memory region is cleared". Right now we are sending the same POST code twice, which makes no sense. So we can do the following (todo: drop me after we decided which one is more appropriate): 1) Drop it (current patchset does exactly that) 2) Introduce POST code similar to POST_SOC_CLEARING_CAR and use it before the cache memory region is cleared. Change-Id: I5d9014c788abdf5a4338c9e199138d1e514450b3 Signed-off-by: Alexander Goncharov Reviewed-on: https://review.coreboot.org/c/coreboot/+/73744 Tested-by: build bot (Jenkins) Reviewed-by: Elyes Haouas Reviewed-by: Lean Sheng Tan --- src/cpu/qemu-x86/cache_as_ram_bootblock.S | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cpu/qemu-x86/cache_as_ram_bootblock.S b/src/cpu/qemu-x86/cache_as_ram_bootblock.S index 617da53480..b414ca141f 100644 --- a/src/cpu/qemu-x86/cache_as_ram_bootblock.S +++ b/src/cpu/qemu-x86/cache_as_ram_bootblock.S @@ -29,8 +29,6 @@ cache_as_ram: xorl %eax, %eax rep stosl - post_code(0x21) - #if defined(__x86_64__) /* * Copy page tables to final location in DRAM. This prevents some strange