the following patch was just integrated into master:
commit 629ebf423d20fc56c4e8ae1828192162b3bc9b72
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Thu Jul 19 19:26:43 2012 +0300
AMD and GFXUMA: move setup_uma_memory() to northbridge
UMA region can be determined at any time after the amount
of RAM is known and before the uma_resource() call.
Change-Id: I2a0bf2d3cad55ee70e889c88846f962b7faa0c7e
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Build-Tested: build bot (Jenkins) at Thu Aug 2 12:07:56 2012, giving +1
Reviewed-By: Anton Kochkov <anton.kochkov(a)gmail.com> at Thu Aug 2 12:56:09 2012, giving +2
See http://review.coreboot.org/1379 for details.
-gerrit
the following patch was just integrated into master:
commit a54defe30fa86f01a1b02907594ef4a08217544b
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Fri Jul 20 08:31:37 2012 +0300
AMD Agesa and GFXUMA: drop use of uma_memory_base
Without GFXUMA, variables were not referenced anywhere.
Fail builds on Family10 if GFXUMA is selected, because the northbridge
code does not set UMA base or size.
Change-Id: I15b91cf6241e9a890398eed03824b753828a0a51
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Build-Tested: build bot (Jenkins) at Thu Aug 2 11:50:32 2012, giving +1
Reviewed-By: Anton Kochkov <anton.kochkov(a)gmail.com> at Thu Aug 2 12:55:25 2012, giving +2
See http://review.coreboot.org/1247 for details.
-gerrit
the following patch was just integrated into master:
commit 3ae258787d3392a671a62ca3d94f10dce5eeb4a0
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Fri Jul 20 08:24:49 2012 +0300
AMD K8 and AMDFAM10, GFXUMA: drop use of uma_memory_base
The code in rs690 or rs780 is always used with K8 or AMDFAM10
northbridge. Without GFXUMA, both of these set the same static value
indirectly using the variable uma_memory_base.
Make the register setting with immediate value, to remove the obscure
use of variable uma_memory_base.
Change-Id: I5354684457a76e73013b4e34a4538a6d122eee8d
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Build-Tested: build bot (Jenkins) at Thu Aug 2 11:34:54 2012, giving +1
Reviewed-By: Anton Kochkov <anton.kochkov(a)gmail.com> at Thu Aug 2 12:54:55 2012, giving +2
See http://review.coreboot.org/1246 for details.
-gerrit
the following patch was just integrated into master:
commit ade868c0ad60486a911b98037e59bc5726bdc0df
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Thu Jul 26 15:40:06 2012 -0700
x86emu: Respect the LEA 67h address size prefix
From
http://cgit.freedesktop.org/xorg/xserver/commit/hw/xfree86/x86emu?id=f57bc0…
Change-Id: Ibdcaa27e936464cec512edb46447aa6284a34975
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
Signed-off-by: Christian Zander <chzander(a)nvidia.com>
Signed-off-by: Aaron Plattner <aplattner(a)nvidia.com>
Tested-by: Tiago Vignatti <tiago.vignatti(a)nokia.com>
Signed-off-by: Keith Packard <keithp(a)keithp.com>
Reviewed-By: Patrick Georgi <patrick(a)georgi-clan.de> at Thu Aug 2 12:35:42 2012, giving +2
See http://review.coreboot.org/1364 for details.
-gerrit
Zheng Bao (zheng.bao(a)amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1389
-gerrit
commit 31b06e2259ccfd84e8fe1f5f0bc1b2bcb58c6a28
Author: zbao <fishbaozi(a)gmail.com>
Date: Thu Aug 2 19:02:26 2012 +0800
RTC: Add a routine to check if the CMOS date is valid
If the CMOS is cleared or someone writes some random date/time
on purpose, the CMOS date register has a invalid date. This will
hurts some OS, like Windows 7, which hangs at MS logo forever.
When we detect that, we need to write a reasonable date in CMOS.
Alexandru Gagniuc:
Hmm, it would be interesting to use the date the coreboot image
was built and set that as the default date. At least until time
travel is invented.
Change-Id: Ic1c7a2d60e711265686441c77bdf7891a7efb42e
Signed-off-by: Zheng Bao <zheng.bao(a)amd.com>
Signed-off-by: zbao <fishbaozi(a)gmail.com>
---
src/drivers/pc80/mc146818rtc.c | 43 ++++++++++++++++++++++++++++++++-------
src/include/pc80/mc146818rtc.h | 5 ++++
2 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/src/drivers/pc80/mc146818rtc.c b/src/drivers/pc80/mc146818rtc.c
index 99d670d..cc14a41 100644
--- a/src/drivers/pc80/mc146818rtc.c
+++ b/src/drivers/pc80/mc146818rtc.c
@@ -77,6 +77,20 @@
# define RTC_VRT 0x80 /* valid RAM and time */
/**********************************************************************/
+static void rtc_update_cmos_date(u8 has_century)
+{
+ /* Now setup a default date of Sat 1 January 2000 */
+ /* TODO: Set the time as building time? Is it reasonable? */
+ cmos_write(0, RTC_CLK_SECOND);
+ cmos_write(0, RTC_CLK_MINUTE);
+ cmos_write(1, RTC_CLK_HOUR);
+ cmos_write(7, RTC_CLK_DAYOFWEEK);
+ cmos_write(1, RTC_CLK_DAYOFMONTH);
+ cmos_write(1, RTC_CLK_MINUTE);
+ cmos_write(0, RTC_CLK_YEAR);
+ if (has_century) cmos_write(0x20, RTC_CLK_ALTCENTURY);
+}
+
#if CONFIG_USE_OPTION_TABLE
static int rtc_checksum_valid(int range_start, int range_end, int cks_loc)
{
@@ -147,14 +161,7 @@ void rtc_init(int invalid)
}
if (cmos_invalid) {
- /* Now setup a default date of Sat 1 January 2000 */
- cmos_write(0, 0x00); /* seconds */
- cmos_write(0, 0x02); /* minutes */
- cmos_write(1, 0x04); /* hours */
- cmos_write(7, 0x06); /* day of week */
- cmos_write(1, 0x07); /* day of month */
- cmos_write(1, 0x08); /* month */
- cmos_write(0, 0x09); /* year */
+ rtc_update_cmos_date(RTC_HAS_NO_ALTCENTURY);
}
#endif
}
@@ -338,3 +345,23 @@ int set_option(const char *name, void *value)
return 0;
}
#endif /* CONFIG_USE_OPTION_TABLE */
+
+/*
+ * If the CMOS is cleared, the rtc_reg has the invalid date. That
+ * hurts some OSes. Even if we don't set USE_OPTION_TABLE, we need
+ * to make sure the date is valid.
+ */
+void rtc_check_update_cmos_date(u8 has_century)
+{
+ u8 year, century;
+
+ /* Note: We need to check if the hardware supports RTC_CLK_ALTCENTURY. */
+ century = has_century ? cmos_read(RTC_CLK_ALTCENTURY) : 0;
+ year = cmos_read(RTC_CLK_YEAR);
+
+ /* TODO: If century is 0xFF, 100% that the cmos is cleared.
+ * Other than that, so far rtc_year is the only entry to check if the date is valid. */
+ if (century > 0x99 || year > 0x99) { /* Invalid date */
+ rtc_update_cmos_date(has_century);
+ }
+}
diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h
index 9f18ba4..a916761 100644
--- a/src/include/pc80/mc146818rtc.h
+++ b/src/include/pc80/mc146818rtc.h
@@ -87,6 +87,10 @@
#define RTC_CLK_DAYOFMONTH 7
#define RTC_CLK_MONTH 8
#define RTC_CLK_YEAR 9
+#define RTC_CLK_ALTCENTURY 0x32
+
+#define RTC_HAS_ALTCENTURY 1
+#define RTC_HAS_NO_ALTCENTURY 0
/* On PCs, the checksum is built only over bytes 16..45 */
#define PC_CKS_RANGE_START 16
@@ -136,6 +140,7 @@ static inline void cmos_write32(u8 offset, u32 value)
#if !defined(__ROMCC__)
void rtc_init(int invalid);
+void rtc_check_update_cmos_date(u8 has_century);
#if CONFIG_USE_OPTION_TABLE
int set_option(const char *name, void *val);
int get_option(void *dest, const char *name);