Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/58386 )
Change subject: cpu/x86/lapic: Unconditionally use CPUID leaf 0xb if available
......................................................................
cpu/x86/lapic: Unconditionally use CPUID leaf 0xb if available
Even when we're not in X2APIC mode, the information in CPUID
leaf 0xb will be valid if that leaf is implemented on the CPU.
Change-Id: I0f1f46fe5091ebeab6dfb4c7e151150cf495d0cb
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58386
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Reviewed-by: Wonkyu Kim <wonkyu.kim(a)intel.com>
Reviewed-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/cpu/x86/smm/smm_stub.S
M src/include/cpu/x86/lapic.h
2 files changed, 8 insertions(+), 13 deletions(-)
Approvals:
build bot (Jenkins): Verified
Arthur Heymans: Looks good to me, approved
Angel Pons: Looks good to me, but someone else must approve
Wonkyu Kim: Looks good to me, but someone else must approve
Tim Wawrzynczak: Looks good to me, but someone else must approve
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S
index c83839c..25a35aa 100644
--- a/src/cpu/x86/smm/smm_stub.S
+++ b/src/cpu/x86/smm/smm_stub.S
@@ -101,30 +101,25 @@
* the OS can manipulate the APIC id use the non-changing cpuid result
* for APIC id (eax). A table is used to handle a discontiguous
* APIC id space. */
-apic_id:
- mov $LAPIC_BASE_MSR, %ecx
- rdmsr
- and $LAPIC_BASE_X2APIC_ENABLED, %eax
- cmp $LAPIC_BASE_X2APIC_ENABLED, %eax
- jne xapic
-x2apic:
+ mov $0, %eax
+ cpuid
+ cmp $0xb, %eax
+ jc 1f
mov $0xb, %eax
mov $0, %ecx
cpuid
mov %edx, %eax
- jmp apicid_end
-
-xapic:
+ jmp 2f
+1:
mov $1, %eax
cpuid
mov %ebx, %eax
shr $24, %eax
+2:
-apicid_end:
mov $(apic_to_cpu_num), %ebx
xor %ecx, %ecx
-
1:
cmp (%ebx, %ecx, 2), %ax
je 1f
diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h
index 05d096e..537fa97 100644
--- a/src/include/cpu/x86/lapic.h
+++ b/src/include/cpu/x86/lapic.h
@@ -126,7 +126,7 @@
static __always_inline unsigned int initial_lapicid(void)
{
uint32_t lapicid;
- if (is_x2apic_mode() && cpuid_get_max_func() >= 0xb)
+ if (cpuid_get_max_func() >= 0xb)
lapicid = cpuid_ext(0xb, 0).edx;
else
lapicid = cpuid_ebx(1) >> 24;
--
To view, visit https://review.coreboot.org/c/coreboot/+/58386
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0f1f46fe5091ebeab6dfb4c7e151150cf495d0cb
Gerrit-Change-Number: 58386
Gerrit-PatchSet: 7
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Attention is currently required from: Arthur Heymans, Felix Singer, Tim Wawrzynczak, Angel Pons, Lean Sheng Tan, Werner Zeh, Patrick Rudolph, EricR Lai.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/60405 )
Change subject: soc/intel/common/basecode/eop: coreboot driver perform EOP operations
......................................................................
Patch Set 23:
(1 comment)
File src/soc/intel/common/basecode/eop/eop.c:
https://review.coreboot.org/c/coreboot/+/60405/comment/87f909ed_4759dc32
PS23, Line 20: static void do_eop_operations(void *unused)
: {
: if (CONFIG(SKIP_FSP_NOTIFY_PHASE_READY_TO_BOOT)) {
: /* Step 1 */
: cse_send_end_of_post();
:
: /* Step 2 */
: cse_lock_config();
:
: /* Step 3 */
: if (CONFIG(DISABLE_HECI1_AT_PRE_BOOT)) {
: cse_set_to_d0i3();
: heci1_disable();
: }
: }
:
: if (CONFIG(SKIP_FSP_NOTIFY_PHASE_END_OF_FIRMWARE)) {
: /* Step 4 */
: heci_set_to_d0i3();
: /* Step 5 */
: pmc_clear_pmcon_sts();
: }
: }
> Now that CSE device state is independent of hiding (see DISABLE_HECI1_AT_PRE_BOOT Kconfig), we should use its device operations instead of bootstate callbacks.
Good feedback! then ideally we will be ending up adding `.final` in all relevant IP code (cse, pmc, spi etc. etc.) that need some additional configuration, isn't it.
Can we consider this as design assumption ?
--
To view, visit https://review.coreboot.org/c/coreboot/+/60405
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I70bde33f77026e8be165ff082defe3cab6686ec7
Gerrit-Change-Number: 60405
Gerrit-PatchSet: 23
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: EricR Lai <ericr_lai(a)compal.corp-partner.google.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Arthur Heymans <arthur.heymans(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-CC: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Attention: Arthur Heymans <arthur.heymans(a)9elements.com>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Attention: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Attention: EricR Lai <ericr_lai(a)compal.corp-partner.google.com>
Gerrit-Comment-Date: Sat, 05 Feb 2022 07:31:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Tim Wawrzynczak, Sridhar Siricilla, Werner Zeh, Patrick Rudolph.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61520 )
Change subject: soc/intel/common/cse: Add function to perform CSE lock configuration
......................................................................
Patch Set 6:
(2 comments)
File src/soc/intel/common/block/cse/cse.c:
https://review.coreboot.org/c/coreboot/+/61520/comment/33bd52f8_e5f13bed
PS5, Line 1014: /*
> >Ack ?
> means?
When you acknowledge it's you had wrong understanding this code don't need any change (as you have initially suggested in line 1014) then folks ideally *click* on the ACK to close the thread.
File src/soc/intel/common/block/cse/cse.c:
https://review.coreboot.org/c/coreboot/+/61520/comment/2c0a0757_ae041265
PS6, Line 1018: (cse_is_hfs1_com_normal() || cse_is_hfs1_com_soft_temp_disable())
> >3rd para says.
> >"Furthermore, if Intel® CSME is in ERROR state, **BIOS** can use I/O 0xCF9 write of >06h or 0Eh command with PMC PWRM offset 1048h register bit [20] CF9GR set to perform the global reset
>
> I commented based on 3rd para you posted in this comment thread. Can you please create crosbug, we can discuss further there?
I'm also specific about 3rd para that says about error condition in CSE.
**When CSE is always in bad state then how can one follow #2 so the only way is #1 hence, we should avoid locking the PMC cf9.**
Based on my reply above, please let me know if you still have some more opens? Do we still need a dedicated crossbus for such chipset configuration discussion ?
--
To view, visit https://review.coreboot.org/c/coreboot/+/61520
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3894b2cd8b90dc033f475384486815ab2fadf381
Gerrit-Change-Number: 61520
Gerrit-PatchSet: 6
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: EricR Lai <ericr_lai(a)compal.corp-partner.google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Attention: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Sat, 05 Feb 2022 07:27:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Subrata Banik <subratabanik(a)google.com>
Comment-In-Reply-To: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Comment-In-Reply-To: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-MessageType: comment
Attention is currently required from: Subrata Banik, Tim Wawrzynczak, Werner Zeh, Patrick Rudolph.
Sridhar Siricilla has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61520 )
Change subject: soc/intel/common/cse: Add function to perform CSE lock configuration
......................................................................
Patch Set 6:
(2 comments)
File src/soc/intel/common/block/cse/cse.c:
https://review.coreboot.org/c/coreboot/+/61520/comment/99626557_c7753ce9
PS5, Line 1014: /*
> Ack ?
>Ack ?
means?
File src/soc/intel/common/block/cse/cse.c:
https://review.coreboot.org/c/coreboot/+/61520/comment/d294cf94_0f241b17
PS6, Line 1018: (cse_is_hfs1_com_normal() || cse_is_hfs1_com_soft_temp_disable())
> > Only BIOS should have capability to trigger global reset and sending GLOBAL RESET MEI message. […]
>3rd para says.
>"Furthermore, if Intel® CSME is in ERROR state, **BIOS** can use I/O 0xCF9 write of >06h or 0Eh command with PMC PWRM offset 1048h register bit [20] CF9GR set to perform the global reset
I commented based on 3rd para you posted in this comment thread. Can you please create crosbug, we can discuss further there?
--
To view, visit https://review.coreboot.org/c/coreboot/+/61520
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3894b2cd8b90dc033f475384486815ab2fadf381
Gerrit-Change-Number: 61520
Gerrit-PatchSet: 6
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: EricR Lai <ericr_lai(a)compal.corp-partner.google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Sat, 05 Feb 2022 07:16:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Subrata Banik <subratabanik(a)google.com>
Comment-In-Reply-To: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Comment-In-Reply-To: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-MessageType: comment
Attention is currently required from: Felix Held.
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61643 )
Change subject: drivers/uart/uart8250reg.h: use BIT() macro for bit definitions
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/coreboot/+/61643
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib726dd77eaf1a4f8a7d9fbf8ab6d46a7bb1de6c0
Gerrit-Change-Number: 61643
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Sat, 05 Feb 2022 05:44:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Felix Held.
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61644 )
Change subject: drivers/uart/uart8250reg.h: use shifts in constants
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/coreboot/+/61644
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0663c1a641355b7bfb59f41479d17117178fb895
Gerrit-Change-Number: 61644
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Sat, 05 Feb 2022 05:44:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment