Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38252 )
Change subject: cpu/x86/entry16: Do not disable cache when Boot Guard is supported
......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38252/7/src/cpu/x86/16bit/entry16.i...
File src/cpu/x86/16bit/entry16.inc:
https://review.coreboot.org/c/coreboot/+/38252/7/src/cpu/x86/16bit/entry16.i...
PS7, Line 120: #if CONFIG(INTEL_BOOTGUARD)
Just my personal preference, there is a read-modify-write sequence on cr0 that I would rather not see split to so many lines. Specially with rdmsr there in the middle register usage is not so obvious.
#if CONFIG(INTEL_BOOTGUARD)
/* DO NOT disable cache if Intel BootGuard is supported */
movl $BOOTGUARD_SACM_INFO, %ecx
rdmsr
test $1, %eax
jz 1f
movl %cr0, %eax
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */
orl $0x01, %eax /* PE = 1 */
movl %eax, %cr0
jmp 2f
#endif
1:
movl %cr0, %eax
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */
orl $0x60000001, %eax /* CD, NW, PE = 1 */
movl %eax, %cr0
2:
--
To view, visit
https://review.coreboot.org/c/coreboot/+/38252
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie1def754f7b0024725638fcea481fd3273ef3d24
Gerrit-Change-Number: 38252
Gerrit-PatchSet: 7
Gerrit-Owner: Gaggery Tsai
gaggery.tsai@intel.com
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Balaji Manigandan
balaji.manigandan@intel.com
Gerrit-Reviewer: David Hendricks
david.hendricks@gmail.com
Gerrit-Reviewer: Gaggery Tsai
gaggery.tsai@intel.com
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Michał Żygowski
michal.zygowski@3mdeb.com
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: Pratikkumar V Prajapati
pratikkumar.v.prajapati@intel.com
Gerrit-Reviewer: Rizwan Qureshi
rizwan.qureshi@intel.com
Gerrit-Reviewer: Subrata Banik
subrata.banik@intel.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Felix Singer
felixsinger@posteo.net
Gerrit-CC: Arthur Heymans
arthur@aheymans.xyz
Gerrit-CC: Kyösti Mälkki
kyosti.malkki@gmail.com
Gerrit-CC: Michael Niewöhner
Gerrit-CC: Nico Huber
nico.h@gmx.de
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Comment-Date: Mon, 13 Jul 2020 09:40:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment