the following patch was just integrated into master:
commit 8de452da2e3219eebd337927c62ddda50ca38323
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Fri Dec 19 13:45:24 2014 -0800
Drop VIA VT8235 southbridge
It's unused.
Change-Id: Iad3e7aa0f777392c9d65b9fcdd3c1666af31723a
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-on: http://review.coreboot.org/7883
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
See http://review.coreboot.org/7883 for details.
-gerrit
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8139
-gerrit
commit dcaea212bff31e53f65b37656611be6a8513033a
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Tue Jan 6 17:12:26 2015 +0100
intel/i82801gx: SMM: Pass the ACPI GNVS pointer via state save map
Currently on older Intel systems, during resume the coreboot table is
overwritten by the code in `smm_setup_structures()` called by
`acpi_resume()` in `src/arch/x86/boot/acpi.c`. As a result, `cbmem`
does not work anymore.
Port commit 7978e3a3 (SMM: Pass the ACPI GNVS pointer via state save
map), applied to Intel BD82x6x and the explanation below, to the other
Intel southbridges too.
Instead of hijacking some random memory addresses to relay the GNVS
pointer to SMM we can use EBX register during the write to APM_CNT
register when the SMI is triggered.
More or less also copy
commit d396a77b4d144a89a98240541945111280106de6
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Wed Oct 3 18:22:16 2012 -0700
SMM: Extract function for finding save state node
Change-Id: I60013cc6c441ba2696ea3623722d4b0afe2dd2cc
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
src/southbridge/intel/i82801gx/smi.c | 18 ++++++++---
src/southbridge/intel/i82801gx/smihandler.c | 49 +++++++++++++++++++++++++++--
2 files changed, 60 insertions(+), 7 deletions(-)
diff --git a/src/southbridge/intel/i82801gx/smi.c b/src/southbridge/intel/i82801gx/smi.c
index 134c232..84714af 100644
--- a/src/southbridge/intel/i82801gx/smi.c
+++ b/src/southbridge/intel/i82801gx/smi.c
@@ -383,9 +383,19 @@ void smm_lock(void)
void smm_setup_structures(void *gnvs, void *tcg, void *smi1)
{
- /* The GDT or coreboot table is going to live here. But a long time
- * after we relocated the GNVS, so this is not troublesome.
+ /*
+ * Issue SMI to set the gnvs pointer in SMM.
+ * tcg and smi1 are unused.
+ *
+ * EAX = APM_CNT_GNVS_UPDATE
+ * EBX = gnvs pointer
+ * EDX = APM_CNT
*/
- *(u32 *)0x500 = (u32)gnvs;
- outb(0xea, 0xb2);
+ asm volatile (
+ "outb %%al, %%dx\n\t"
+ : /* ignore result */
+ : "a" (APM_CNT_GNVS_UPDATE),
+ "b" ((u32)gnvs),
+ "d" (APM_CNT)
+ );
}
diff --git a/src/southbridge/intel/i82801gx/smihandler.c b/src/southbridge/intel/i82801gx/smihandler.c
index e2505ce..58679ff 100644
--- a/src/southbridge/intel/i82801gx/smihandler.c
+++ b/src/southbridge/intel/i82801gx/smihandler.c
@@ -361,10 +361,49 @@ static void southbridge_smi_sleep(unsigned int node, smm_state_save_area_t *stat
}
}
+/*
+ * Look for Synchronous IO SMI and use save state from that
+ * core in case we are not running on the same core that
+ * initiated the IO transaction.
+ */
+static em64t101_smm_state_save_area_t *smi_apmc_find_state_save(u8 cmd)
+{
+ em64t101_smm_state_save_area_t *state;
+ u32 base = smi_get_tseg_base() + SMM_EM64T101_SAVE_STATE_OFFSET;
+ int node;
+
+ /* Check all nodes looking for the one that issued the IO */
+ for (node = 0; node < CONFIG_MAX_CPUS; node++) {
+ state = (em64t101_smm_state_save_area_t *)
+ (base - (node * 0x400));
+
+ /* Check for Synchronous IO (bit0==1) */
+ if (!(state->io_misc_info & (1 << 0)))
+ continue;
+
+ /* Make sure it was a write (bit4==0) */
+ if (state->io_misc_info & (1 << 4))
+ continue;
+
+ /* Check for APMC IO port */
+ if (((state->io_misc_info >> 16) & 0xff) != APM_CNT)
+ continue;
+
+ /* Check AX against the requested command */
+ if ((state->rax & 0xff) != cmd)
+ continue;
+
+ return state;
+ }
+
+ return NULL;
+}
+
static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state_save)
{
u32 pmctrl;
u8 reg8;
+ em64t101_smm_state_save_area_t *state;
/* Emulate B2 register as the FADT / Linux expects it */
@@ -404,9 +443,13 @@ static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state
printk(BIOS_DEBUG, "SMI#: SMM structures already initialized!\n");
return;
}
- gnvs = *(global_nvs_t **)0x500;
- smm_initialized = 1;
- printk(BIOS_DEBUG, "SMI#: Setting up structures to %p\n", gnvs);
+ state = smi_apmc_find_state_save(reg8);
+ if (state) {
+ /* EBX in the state save contains the GNVS pointer */
+ gnvs = (global_nvs_t *)((u32)state->rbx);
+ smm_initialized = 1;
+ printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
+ }
break;
default:
printk(BIOS_DEBUG, "SMI#: Unknown function APM_CNT=%02x\n", reg8);
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8139
-gerrit
commit ddeb5c176c558b2e27e31e7de54f73a336eba16c
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Tue Jan 6 17:12:26 2015 +0100
intel/i82801gx: SMM: Pass the ACPI GNVS pointer via state save map
Currently on older Intel systems, during resume the coreboot table is
overwritten by the code in `smm_setup_structures()` called by
`acpi_resume()` in `src/arch/x86/boot/acpi.c`. As a result, `cbmem`
does not work anymore.
Port commit 7978e3a3 (SMM: Pass the ACPI GNVS pointer via state save
map), applied to Intel BD82x6x and the explanation below, to the other
Intel southbridges too.
Instead of hijacking some random memory addresses to relay the GNVS
pointer to SMM we can use EBX register during the write to APM_CNT
register when the SMI is triggered.
Change-Id: I60013cc6c441ba2696ea3623722d4b0afe2dd2cc
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
src/southbridge/intel/i82801gx/smi.c | 18 ++++++++++++++----
src/southbridge/intel/i82801gx/smihandler.c | 11 ++++++++---
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/src/southbridge/intel/i82801gx/smi.c b/src/southbridge/intel/i82801gx/smi.c
index 134c232..84714af 100644
--- a/src/southbridge/intel/i82801gx/smi.c
+++ b/src/southbridge/intel/i82801gx/smi.c
@@ -383,9 +383,19 @@ void smm_lock(void)
void smm_setup_structures(void *gnvs, void *tcg, void *smi1)
{
- /* The GDT or coreboot table is going to live here. But a long time
- * after we relocated the GNVS, so this is not troublesome.
+ /*
+ * Issue SMI to set the gnvs pointer in SMM.
+ * tcg and smi1 are unused.
+ *
+ * EAX = APM_CNT_GNVS_UPDATE
+ * EBX = gnvs pointer
+ * EDX = APM_CNT
*/
- *(u32 *)0x500 = (u32)gnvs;
- outb(0xea, 0xb2);
+ asm volatile (
+ "outb %%al, %%dx\n\t"
+ : /* ignore result */
+ : "a" (APM_CNT_GNVS_UPDATE),
+ "b" ((u32)gnvs),
+ "d" (APM_CNT)
+ );
}
diff --git a/src/southbridge/intel/i82801gx/smihandler.c b/src/southbridge/intel/i82801gx/smihandler.c
index e2505ce..e1cc220 100644
--- a/src/southbridge/intel/i82801gx/smihandler.c
+++ b/src/southbridge/intel/i82801gx/smihandler.c
@@ -365,6 +365,7 @@ static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state
{
u32 pmctrl;
u8 reg8;
+ em64t101_smm_state_save_area_t *state;
/* Emulate B2 register as the FADT / Linux expects it */
@@ -404,9 +405,13 @@ static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state
printk(BIOS_DEBUG, "SMI#: SMM structures already initialized!\n");
return;
}
- gnvs = *(global_nvs_t **)0x500;
- smm_initialized = 1;
- printk(BIOS_DEBUG, "SMI#: Setting up structures to %p\n", gnvs);
+ state = smi_apmc_find_state_save(reg8);
+ if (state) {
+ /* EBX in the state save contains the GNVS pointer */
+ gnvs = (global_nvs_t *)((u32)state->rbx);
+ smm_initialized = 1;
+ printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
+ }
break;
default:
printk(BIOS_DEBUG, "SMI#: Unknown function APM_CNT=%02x\n", reg8);
the following patch was just integrated into master:
commit 897123ab2f3bcde00848ae622faeb2ca1e7004f0
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue May 27 18:28:59 2014 -0700
libpayload: ipq808x: introduce uart driver
This adds a UART driver for the ipq8064 controller. It still does not
quite work in the receive direction - the receive FIFO returns read
data in 32 bit chunks, which means that 4 keys need to be pressed
before a character pops out of the driver (and it reports it as a
single character).
This issue is being addressed separately, the driver is being checked
in to facilitate concurrent development.
BUG=chrome-os-partner:27784, chrome-os-partner:29313
TEST=with deptcharge modifications in place, the AP148 board comes up
to the depthcharge prompt:
Starting depthcharge on storm...
Original-Change-Id: Ief2cfcca73494be5c4147881144470078adcefb8
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/202045
Original-Reviewed-by: Deepa Dinamani <deepad(a)codeaurora.org>
Original-Reviewed-by: Stefan Reinauer <reinauer(a)chromium.org>
(cherry picked from commit 4499318fb9a4e663c504d7c41380ccf2aa89da29)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I3e07d7568c20c0e570222971ff219de3a6d9b7cc
Reviewed-on: http://review.coreboot.org/8061
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/8061 for details.
-gerrit
the following patch was just integrated into master:
commit bc8b4fad1eae6b97b23304871fcdee43c8f360f1
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Wed Jun 4 10:43:37 2014 -0700
libpayload: Introduce bit manipulation macros
Some drivers being ported to depthcharge use io bit manipulation
macros. The libpayload include file seems the most appropriate place
to keep these macros in. There is no common io.h file across
architectures, the x86 version could be added later if required.
BUG=chrome-os-partner:27784
TEST=observed ipq806x SPI driver deptcharge port (WIP) compile properly.
Original-Change-Id: I33f3be072faefce293c871f7e3bc3b2e6bc38ffe
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/202559
Original-Reviewed-by: Stefan Reinauer <reinauer(a)chromium.org>
Original-Reviewed-by: Trevor Bourget <tbourget(a)codeaurora.org>
(cherry picked from commit ad18a605b4d0ec3251c1614e7358b42aa6b5c45a)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I8656e12af20ce4cf11d771942e8fe7d4eb2a560d
Reviewed-on: http://review.coreboot.org/8062
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/8062 for details.
-gerrit
the following patch was just integrated into master:
commit b7f82e9559ae7a002330183affc285d6dd0abd1a
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue May 27 16:16:50 2014 -0700
libpayload: arm: add code to clear bss
This adds some assembly code to clear .bss segment. It might have been
already cleared by the loader, but it is not guaranteed. This also
helps when the program is loaded by the debugger.
BUG=none
TEST=observed that .bss is now initialized when the program is
restarted. Verified correct boundaries of the segment.
Original-Change-Id: I0aed0070da53881e4cf8c27049459040c006e765
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/201784
Original-Reviewed-by: Vincent Palatin <vpalatin(a)chromium.org>
Original-Reviewed-by: Trevor Bourget <tbourget(a)codeaurora.org>
(cherry picked from commit c89ecee5ddfc33a438d4d1926d3756a48f3c2576)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: Ic0c33d2a8ad22cd23b3ccb73c603cb14ae2aab29
Reviewed-on: http://review.coreboot.org/8060
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/8060 for details.
-gerrit
the following patch was just integrated into master:
commit 9b29aad5263f2aeba21cf4d521e7798f9dedb2b9
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Jan 6 07:08:46 2015 +0100
Revert "Re-factor 'to_flash_offset()' into 'spi_flash.h'"
This reverts commit 9270553fff23462fcb298f154296319bf3639d15.
Change-Id: I195f721ce7a18aac6c1aa6f4e0f9284455d531b0
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/8138
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
See http://review.coreboot.org/8138 for details.
-gerrit