Patch Set 4: Code-Review-1

Patch Set 4:

(1 comment)

FYI: I see little value here and wont be doing any proper review.

You should not push MSR register definitions that do not apply to all intel CPU models into a common file cpu/intel/msr.h.

I agree. MSR stands for Model-Specific Register. I would rather have the same register definition in a dozen different files, so that one knows what MSRs exist for a certain CPU model (the code also acts as documentation).

As ~95% of all definitions are copy pasta, you can't rely on
these anyway. If we had the resources to review / cleanup the
mess of silicon vendors, I would agree. But as long as we don't,
I would prefer a practice that avoids copy pasta.


Having a single definition on a common file is very likely to cause confusion: "Does this MSR exist for *my* chip?"

Does it start with IA32_? then yes. Does it start with MSR_? then check documentation.

View Change

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I45cd255e0af4369926a6cb884be9ee71bf1a66de
Gerrit-Change-Number: 33504
Gerrit-PatchSet: 4
Gerrit-Owner: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Nico Huber <nico.h@gmx.de>
Gerrit-Comment-Date: Sun, 07 Jul 2019 21:10:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment