Patch Set 12:

Patch Set 12:

I have recently noticed that after apu2 migration to postcar the MTRRs became inconsistent across all cores. The APs have an additional UC entry probably for cbmem?, which stays programmed up to the CPU init in ramstage. Since the postcar frame is built only from WB entries, the BSP has one entry less than APs which causes this inconsistence. Would this patch resolve this issue? Or is this something different?

Anyway I will test this.

Inconsistent MTRR is acceptable for a short amount of time like during the firmware. If the MTRRs are still incosistent when Linux boots that generally results in hangs.

Postcar (which is in dmar/cbmem) invalidates cache so it must hit dram before that. Making cbmem UC makes that possible but CLFLUSHing it to RAM (if possible) is a cleaner solution. It might also result in (small) boot speedups. This patch would indeed avoid making an UC MTRR 'hole' for cbmem.

There must be something in AGESA that still sets the UC entries, keep getting the inconsistent MTRRs (but Linux fixes it by itself.) I will reinvestigate this and probably the uC mapping can be dropped for APs (IIRC it's 1MB from the top of RAM).

Patch set 12:Code-Review +1

View Change

To view, visit change 37197. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iaa0d154e2c5b2052027d07ad26e31f3ff63ae9f3
Gerrit-Change-Number: 37197
Gerrit-PatchSet: 12
Gerrit-Owner: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski@3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Mon, 16 Nov 2020 09:39:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment