Marc Jones has uploaded this change for review. ( https://review.coreboot.org/23818
Change subject: soc/amd/common: Save the UMA settings from AGESA
......................................................................
soc/amd/common: Save the UMA settings from AGESA
Save the UMA base and size settings returned by AGESA
in amdinitpost();
Change-Id: Id96cc65582118ad41d397b1a600cab1615676a55
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
M 3rdparty/blobs
M src/soc/amd/common/block/pi/agesawrapper.c
2 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/23818/1
diff --git a/3rdparty/blobs b/3rdparty/blobs
index 19dea8d..a5efee5 160000
--- a/3rdparty/blobs
+++ b/3rdparty/blobs
@@ -1 +1 @@
-Subproject commit 19dea8d171544f01f12ee6b78af0cc356ab994aa
+Subproject commit a5efee5fdea55f398decc9cabebce3744bbd8147
diff --git a/src/soc/amd/common/block/pi/agesawrapper.c b/src/soc/amd/common/block/pi/agesawrapper.c
index dca7222..cfa3760 100644
--- a/src/soc/amd/common/block/pi/agesawrapper.c
+++ b/src/soc/amd/common/block/pi/agesawrapper.c
@@ -26,6 +26,7 @@
#include <amdblocks/s3_resume.h>
#include <amdblocks/agesawrapper.h>
#include <amdblocks/BiosCallOuts.h>
+#include <soc/southbridge.h>
void __attribute__((weak)) SetMemParams(AMD_POST_PARAMS *PostParams) {}
void __attribute__((weak)) OemPostParams(AMD_POST_PARAMS *PostParams) {}
@@ -207,12 +208,16 @@
* higher than UmaBase. With UMA_NONE we see UmaBase==0.
*/
uintptr_t top;
- if (PostParams->MemConfig.UmaBase)
+ if (PostParams->MemConfig.UmaBase &&
+ (PostParams->MemConfig.UmaBase < ((4ull * GiB) >> 16)))
top = PostParams->MemConfig.UmaBase << 16;
else
top = PostParams->MemConfig.Sub4GCacheTop;
backup_top_of_low_cacheable(top);
+ save_uma_size(PostParams->MemConfig.UmaSize * 64 * KiB);
+ save_uma_base((u64)PostParams->MemConfig.UmaBase * 64 * KiB);
+
print_init_post_settings(PostParams);
if (status != AGESA_SUCCESS)
--
To view, visit https://review.coreboot.org/23818
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id96cc65582118ad41d397b1a600cab1615676a55
Gerrit-Change-Number: 23818
Gerrit-PatchSet: 1
Gerrit-Owner: Marc Jones <marc(a)marcjonesconsulting.com>
Daisuke Nojiri has uploaded this change for review. ( https://review.coreboot.org/23816
Change subject: Fizz: Check HDMI HPD and DisplayPort HPD
......................................................................
Fizz: Check HDMI HPD and DisplayPort HPD
Some type-c monitors do not immediately assert HPD. If we continue
to boot without HPD asserted, Depthcharge fails to show pictures
on a monitor even if HPD is asserted later.
Also, if HDMI monitor is connected, no wait is needed. If only HDMI
monitor is connected, the API always loops until stopwatch expires.
This patch will make google_chromeec_wait_for_displayport first check
HDMI HPD. If it's asserted, it returns immediately. If not, it loops
until DP HPD is asserted.
This patch also extends the wait time to 3 seconds.
BUG=b:72387533
BRANCH=none
TEST=Verify firmware screen is displayed even when a type-c monitor
does not imeediately assert HPD. Verify if HDMI monitor is connected,
AP does not wait (and firmware screen is displayed on HDMI monitor).
Change-Id: I0e1afdffbebf4caf35bbb792e7f4637fae89fa49
Signed-off-by: Daisuke Nojiri <dnojiri(a)chromium.org>
---
M src/ec/google/chromeec/ec.c
M src/ec/google/chromeec/ec.h
M src/mainboard/google/fizz/ramstage.c
3 files changed, 54 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/23816/1
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index c902c3f..e03a96f 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -986,25 +986,32 @@
return 0;
}
-const static long wait_for_display_timeout_ms = 2000;
#define USB_SID_DISPLAYPORT 0xff01
-void google_chromeec_wait_for_display(void)
+/**
+ * Wait for DisplayPort to be ready
+ *
+ * @param timeout Wait aborts after <timeout> ms.
+ * @return 1: Success or 0: Timeout.
+ */
+int google_chromeec_wait_for_displayport(long timeout)
{
struct stopwatch sw;
- printk(BIOS_INFO, "Waiting for display\n");
- stopwatch_init_msecs_expire(&sw, wait_for_display_timeout_ms);
+ printk(BIOS_INFO, "Waiting for DisplayPort\n");
+ stopwatch_init_msecs_expire(&sw, timeout);
while (google_chromeec_pd_get_amode(USB_SID_DISPLAYPORT) != 1) {
if (stopwatch_expired(&sw)) {
printk(BIOS_WARNING,
- "Display not ready after %ldms. Abort.\n",
- wait_for_display_timeout_ms);
- return;
+ "DisplayPort not ready after %ldms. Abort.\n",
+ timeout);
+ return 0;
}
mdelay(200);
}
- printk(BIOS_INFO, "Display ready after %lu ms\n",
+ printk(BIOS_INFO, "DisplayPort ready after %lu ms\n",
stopwatch_duration_msecs(&sw));
+
+ return 1;
}
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index 1ff07b7..24c8922 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -37,7 +37,7 @@
int google_ec_running_ro(void);
void google_chromeec_init(void);
int google_chromeec_pd_get_amode(uint16_t svid);
-void google_chromeec_wait_for_display(void);
+int google_chromeec_wait_for_displayport(long timeout);
/* Device events */
uint64_t google_chromeec_get_device_enabled_events(void);
diff --git a/src/mainboard/google/fizz/ramstage.c b/src/mainboard/google/fizz/ramstage.c
index e5215f8..f7520fa 100644
--- a/src/mainboard/google/fizz/ramstage.c
+++ b/src/mainboard/google/fizz/ramstage.c
@@ -14,15 +14,51 @@
*/
#include <bootmode.h>
+#include <console/console.h>
+#include <delay.h>
#include <ec/google/chromeec/ec.h>
+#include <gpio.h>
+#include <mainboard/google/fizz/gpio.h>
+#include <soc/gpio.h>
#include <soc/ramstage.h>
+#include <timer.h>
#include "gpio.h"
+#define GPIO_HDMI_HPD GPP_E13
+#define GPIO_DP_HPD GPP_E14
+
+const static long display_timeout_ms = 3000;
+
+/* TODO: This can be moved to common directory */
+static void wait_for_hpd(gpio_t gpio, long timeout)
+{
+ struct stopwatch sw;
+
+ printk(BIOS_INFO, "Waiting for HPD\n");
+ gpio_input(gpio);
+
+ stopwatch_init_msecs_expire(&sw, timeout);
+ while (!gpio_get(gpio)) {
+ if (stopwatch_expired(&sw)) {
+ printk(BIOS_WARNING,
+ "HPD not ready after %ldms. Abort.\n", timeout);
+ return;
+ }
+ mdelay(200);
+ }
+ printk(BIOS_INFO, "HPD ready after %lu ms\n",
+ stopwatch_duration_msecs(&sw));
+}
+
void mainboard_silicon_init_params(FSP_SIL_UPD *params)
{
- if (display_init_required())
+ gpio_input(GPIO_HDMI_HPD);
+ if (display_init_required() && !gpio_get(GPIO_HDMI_HPD)) {
/* This has to be done before FSP-S runs. */
- google_chromeec_wait_for_display();
+ if (google_chromeec_wait_for_displayport(display_timeout_ms))
+ wait_for_hpd(GPIO_DP_HPD, display_timeout_ms);
+ }
+
gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}
--
To view, visit https://review.coreboot.org/23816
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e1afdffbebf4caf35bbb792e7f4637fae89fa49
Gerrit-Change-Number: 23816
Gerrit-PatchSet: 1
Gerrit-Owner: Daisuke Nojiri <dnojiri(a)chromium.org>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23713 )
Change subject: driver/uart: Introduce a way for mainboard to override the baudrate
......................................................................
Patch Set 3: Verified-1
Build Failed
https://qa.coreboot.org/job/coreboot-gerrit/67683/ : FAILURE
https://qa.coreboot.org/job/coreboot-checkpatch/22187/ : SUCCESS
--
To view, visit https://review.coreboot.org/23713
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I970ee788bf90b9e1a8c6ccdc5eee8029d9af0ecc
Gerrit-Change-Number: 23713
Gerrit-PatchSet: 3
Gerrit-Owner: Julien Viard de Galbert <jviarddegalbert(a)online.net>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Julien Viard de Galbert <jviarddegalbert(a)online.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 19 Feb 2018 15:48:16 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes