Maulik V Vaghela has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56024 )
Change subject: drivers/usb/acpi: Create function to get PLD information
......................................................................
drivers/usb/acpi: Create function to get PLD information
Create a separate function to get PLD information from USB device.
This is helpful in retimer driver where we can attach same USB
port information to retimer instance and we can avoid duplication
of information.
BUG=None
BRANCH=None
TEST=Check if code compiles and function returns correct value
Change-Id: Iaaf140ce1965dce3a812aa2701ce0e29b34ab3e7
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
---
M src/drivers/usb/acpi/chip.h
M src/drivers/usb/acpi/usb_acpi.c
2 files changed, 27 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/56024/1
diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h
index 73c69cc..9e9772b 100644
--- a/src/drivers/usb/acpi/chip.h
+++ b/src/drivers/usb/acpi/chip.h
@@ -68,4 +68,7 @@
struct acpi_gpio privacy_gpio;
};
+/* Method to get PLD structure from USB device */
+const struct acpi_pld *usb_acpi_get_pld(const struct device *usb_device);
+
#endif /* __USB_ACPI_CHIP_H__ */
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index 9d68d0a..da91328 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -37,6 +37,7 @@
{
struct drivers_usb_acpi_config *config = dev->chip_info;
const char *path = acpi_device_path(dev);
+ const struct acpi_pld *pld = usb_acpi_get_pld(dev);
if (!path || !config)
return;
@@ -50,15 +51,10 @@
acpigen_write_name_string("_DDN", config->desc);
acpigen_write_upc(config->type);
- if (config->use_custom_pld) {
- /* Use board defined PLD */
- acpigen_write_pld(&config->custom_pld);
- } else {
- /* Fill PLD strucutre based on port type */
- struct acpi_pld pld;
- acpi_pld_fill_usb(&pld, config->type, &config->group);
- acpigen_write_pld(&pld);
- }
+ if (pld)
+ acpigen_write_pld(pld);
+ else
+ printk(BIOS_ERR, "Error retrieving PLD for %s \n", path);
/* Resources */
if (usb_acpi_add_gpios_to_crs(config) == true) {
@@ -126,3 +122,22 @@
CHIP_NAME("USB ACPI Device")
.enable_dev = usb_acpi_enable
};
+
+const struct acpi_pld *usb_acpi_get_pld(const struct device *usb_device)
+{
+ struct drivers_usb_acpi_config *config = usb_device->chip_info;
+ static struct acpi_pld pld;
+
+ if (!usb_device || !usb_device->chip_info || usb_device->chip_ops != &drivers_usb_acpi_ops)
+ return NULL;
+
+ if (config->use_custom_pld) {
+ /* Use board defined PLD */
+ memcpy(&pld, &config->custom_pld, sizeof(pld));
+ } else {
+ /* Fill PLD strucutre based on port type */
+ acpi_pld_fill_usb(&pld, config->type, &config->group);
+ }
+
+ return &pld;
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/56024
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iaaf140ce1965dce3a812aa2701ce0e29b34ab3e7
Gerrit-Change-Number: 56024
Gerrit-PatchSet: 1
Gerrit-Owner: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-MessageType: newchange
Attention is currently required from: Maulik V Vaghela, Paul Menzel.
Hello build bot (Jenkins), Furquan Shaikh, John Zhao, Tim Wawrzynczak, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/55945
to look at the new patch set (#4).
Change subject: drivers/intel/usb4/retimer: Update code to assign correct port number
......................................................................
drivers/intel/usb4/retimer: Update code to assign correct port number
Since TBT controller can have maximum 2 ports per controller, our
code will loop over DFP structure twice and determine port number.
Retimer driver used to assign port number as below:
1. Check if power GPIO is assigned for particular DFP entry or not
2. If entry is there, assign loop count as port number
Since loop count is 2, retimer will never assign port number = 2
even if it's present. In case of more than 1 controller, port number
assigned will still be 0 or 1 even though actual port index might
be 2 or 3. This will create an issue where even if you do transaction
on device on controller 2 (port index 2 or 3), EC will route it on
port 0 or 1 due to incorrect port index.
Update the driver flow as per below to handle this scenario:
1. Check if power GPIO is assigned for particular DFP entry or not
2. Get USB port number from config since it's stored in usb port
information under devicetree
3. Pass the port number to ACPI SSDT and EC code
Above changes will ensure that we're assigning correct port
number as per calculation and EC will use correct port index.
BUG=b:189476816
BRANCH=None
TEST=Checked that retimer firmware update works on both ports and update
happens on correct port index.
Change-Id: Ib11637ae39046e0afdacd33bc34e8a59e6f2bfb1
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
---
M src/drivers/intel/usb4/retimer/chip.h
M src/drivers/intel/usb4/retimer/retimer.c
2 files changed, 27 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/55945/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/55945
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib11637ae39046e0afdacd33bc34e8a59e6f2bfb1
Gerrit-Change-Number: 55945
Gerrit-PatchSet: 4
Gerrit-Owner: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: John Zhao <john.zhao(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Abhijeet Rao <abhijeet.rao(a)intel.corp-partner.google.com>
Gerrit-CC: Deepti Deshatty <deepti.deshatty(a)intel.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Attention: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Damien Zammit, Patrick Rudolph.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56019 )
Change subject: nb/intel/x4x: Prepare for x86_64 support
......................................................................
Patch Set 1:
(1 comment)
File src/northbridge/intel/x4x/dq_dqs.c:
https://review.coreboot.org/c/coreboot/+/56019/comment/6d03b34c_357d1840
PS1, Line 173: write32
> You could use write32p (note the trailing `p`) but it probably won't be reproducible. Can be done in a follow-up.
Sounds good. Let me do that instead. I can test now so that's not an issue.
--
To view, visit https://review.coreboot.org/c/coreboot/+/56019
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id44eeb7660d0b521a326a5b981c04c16cf0a6f84
Gerrit-Change-Number: 56019
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Damien Zammit
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Attention: Damien Zammit
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Fri, 02 Jul 2021 08:21:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/55761 )
Change subject: cpu/qemu-x86: Increase heap size
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
> I guess the devicetree just grows too big with that many CPUs.
It fails when generating PIRQ entries (late ramstage, IIRC during SSDT generation)
--
To view, visit https://review.coreboot.org/c/coreboot/+/55761
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib4f770a7a54d975d213b2456cc7d1ed9151cb6f9
Gerrit-Change-Number: 55761
Gerrit-PatchSet: 2
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Fri, 02 Jul 2021 08:20:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: comment
Attention is currently required from: Arthur Heymans, Patrick Rudolph.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56021 )
Change subject: cpu/intel/car/p4: Add support x86_64
......................................................................
Patch Set 1: Code-Review+1
(2 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/56021/comment/7483540c_3c88cc6b
PS1, Line 7: Add support x86_64
Either `Add support for x86_64` or `Add x86_64 support`
Patchset:
PS1:
Will need to rebase atop what's merged of https://review.coreboot.org/q/topic:%22x86_64-kconfig%22
--
To view, visit https://review.coreboot.org/c/coreboot/+/56021
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I77516e3cd5f0d3b7442be660c005a65b00454343
Gerrit-Change-Number: 56021
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Fri, 02 Jul 2021 08:19:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/55760 )
Change subject: src: Consolidate x86_64 support Kconfig
......................................................................
src: Consolidate x86_64 support Kconfig
Introduce `USE_EXP_X86_64_SUPPORT` in `src/arch/x86/Kconfig` and guard
it with `HAVE_EXP_X86_64_SUPPORT`. Replace the per-CPU implementations
of the same functionality with the newly-added Kconfig options. Update
documentation and the config file for QEMU accordingly.
Change-Id: I550216fd2a8323342d6b605306b0b95ffd5dcd1c
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55760
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Patrick Rudolph <siro(a)das-labor.org>
---
M Documentation/mainboard/emulation/qemu-i440fx.md
M Documentation/mainboard/emulation/qemu-q35.md
M configs/config.emulation_qemu_x86_i440fx_x86_64
M src/arch/x86/Kconfig
M src/cpu/intel/model_206ax/Kconfig
M src/cpu/qemu-x86/Kconfig
6 files changed, 23 insertions(+), 17 deletions(-)
Approvals:
build bot (Jenkins): Verified
Patrick Rudolph: Looks good to me, approved
diff --git a/Documentation/mainboard/emulation/qemu-i440fx.md b/Documentation/mainboard/emulation/qemu-i440fx.md
index 059ad12..a311fddb0 100644
--- a/Documentation/mainboard/emulation/qemu-i440fx.md
+++ b/Documentation/mainboard/emulation/qemu-i440fx.md
@@ -15,7 +15,7 @@
The qemu-i440fx mainboard has been ported to x86_64 and will serve as
reference platform to enable additional platforms.
-To enable the support set the Kconfig option ``CONFIG_CPU_QEMU_X86_64=y``.
+To enable the support set the Kconfig option ``CONFIG_USE_EXP_X86_64_SUPPORT=y``.
## Installing qemu
diff --git a/Documentation/mainboard/emulation/qemu-q35.md b/Documentation/mainboard/emulation/qemu-q35.md
index 00163e8..cebbc63 100644
--- a/Documentation/mainboard/emulation/qemu-q35.md
+++ b/Documentation/mainboard/emulation/qemu-q35.md
@@ -15,7 +15,7 @@
The qemu-q35 mainboard has been ported to x86_64 and will serve as
reference platform to enable additional platforms.
-To enable the support set the Kconfig option ``CONFIG_CPU_QEMU_X86_64=y``.
+To enable the support set the Kconfig option ``CONFIG_USE_EXP_X86_64_SUPPORT=y``.
## Installing qemu
diff --git a/configs/config.emulation_qemu_x86_i440fx_x86_64 b/configs/config.emulation_qemu_x86_i440fx_x86_64
index 0ddb3f1..d31bbf2 100644
--- a/configs/config.emulation_qemu_x86_i440fx_x86_64
+++ b/configs/config.emulation_qemu_x86_i440fx_x86_64
@@ -1 +1 @@
-CONFIG_CPU_QEMU_X86_64=y
+CONFIG_USE_EXP_X86_64_SUPPORT=y
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 2a42a1c..ef07a2a 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -63,6 +63,24 @@
bool
default y
+config HAVE_EXP_X86_64_SUPPORT
+ bool
+ help
+ Enable experimental support to build and run coreboot in 64-bit mode.
+ When selecting this option for a new platform, it is highly advisable
+ to provide a config file for Jenkins to build-test the 64-bit option.
+
+config USE_EXP_X86_64_SUPPORT
+ bool "[EXPERIMENTAL] Run coreboot in long (64-bit) mode"
+ depends on HAVE_EXP_X86_64_SUPPORT
+ select ARCH_ALL_STAGES_X86_64
+ help
+ When set, most of coreboot runs in long (64-bit) mode instead of the
+ usual protected flat (32-bit) mode. 64-bit CPUs and OSes can be used
+ irrespective of whether coreboot runs in 32-bit or 64-bit mode. This
+ is an experimental option: do not enable unless one wants to test it
+ and has the means to recover a system when coreboot fails to boot.
+
config ARCH_X86_64_PGTBL_LOC
hex "x86_64 page table location in CBFS"
depends on ARCH_BOOTBLOCK_X86_64
diff --git a/src/cpu/intel/model_206ax/Kconfig b/src/cpu/intel/model_206ax/Kconfig
index 67fd701..c168c9b 100644
--- a/src/cpu/intel/model_206ax/Kconfig
+++ b/src/cpu/intel/model_206ax/Kconfig
@@ -3,16 +3,11 @@
if CPU_INTEL_MODEL_206AX
-config ARCH_EXP_X86_64
- bool "Experimental 64bit support"
- depends on USE_NATIVE_RAMINIT
- default n
-
config CPU_SPECIFIC_OPTIONS
def_bool y
- select ARCH_ALL_STAGES_X86_64 if ARCH_EXP_X86_64
select ARCH_X86
select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES
+ select HAVE_EXP_X86_64_SUPPORT if USE_NATIVE_RAMINIT
select MMX
select SSE2
select UDELAY_TSC
diff --git a/src/cpu/qemu-x86/Kconfig b/src/cpu/qemu-x86/Kconfig
index 6d897fe..2f961dca 100644
--- a/src/cpu/qemu-x86/Kconfig
+++ b/src/cpu/qemu-x86/Kconfig
@@ -3,6 +3,7 @@
config CPU_QEMU_X86
bool
select ARCH_X86
+ select HAVE_EXP_X86_64_SUPPORT
select UDELAY_TSC
select TSC_MONOTONIC_TIMER
select UNKNOWN_TSC_RATE
@@ -49,12 +50,4 @@
default 32 if SMM_TSEG
default 4
-config CPU_QEMU_X86_64
- bool "Experimental 64bit support"
- select ARCH_ALL_STAGES_X86_64
-
-config CPU_QEMU_X86_32
- bool
- default n if CPU_QEMU_X86_64
- default y
endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/55760
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I550216fd2a8323342d6b605306b0b95ffd5dcd1c
Gerrit-Change-Number: 55760
Gerrit-PatchSet: 2
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged