[coreboot-gerrit] Patch set updated for coreboot: dbf5189 usbdebug: Fix migration to ramstage
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Sun Nov 23 11:44:08 CET 2014
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7206
-gerrit
commit dbf5189053a29b119e11c1ca29a72a3a4a119db2
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Mon Oct 27 08:01:55 2014 +0200
usbdebug: Fix migration to ramstage
On entry to ramstage CBMEM is looked for a copy of an already initialized
EHCI debug dongle state. If a copy is found, it contained the state before
CAR migration and the USB protocol data toggle can be out of sync. It's an
even/odd kind of a parity check, so roughly every other build would
show the problem as invalid first line: 'ug found in CBMEM.'
After CAR migration, re-direct the state changes to correct CBMEM table.
Change-Id: I7c54e76ce29af5c8ee5e9ce6fd3dc6bdf700dcf1
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
src/drivers/usb/ehci_debug.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/drivers/usb/ehci_debug.c b/src/drivers/usb/ehci_debug.c
index c60fbaa..5a62999 100644
--- a/src/drivers/usb/ehci_debug.c
+++ b/src/drivers/usb/ehci_debug.c
@@ -96,10 +96,14 @@ static int dbgp_enabled(void);
#define DBGP_MAX_PACKET 8
static struct ehci_debug_info glob_dbg_info CAR_GLOBAL;
+static struct ehci_debug_info * glob_dbg_info_p CAR_GLOBAL;
static inline struct ehci_debug_info *dbgp_ehci_info(void)
{
- return car_get_var_ptr(&glob_dbg_info);
+ if (car_get_var(glob_dbg_info_p) == NULL)
+ car_set_var(glob_dbg_info_p, &glob_dbg_info);
+
+ return car_get_var(glob_dbg_info_p);
}
static int dbgp_wait_until_complete(struct ehci_dbg_port *ehci_debug)
@@ -905,6 +909,7 @@ static void migrate_ehci_debug(void)
return;
memcpy(dbg_info_cbmem, dbg_info, sizeof(*dbg_info));
+ car_set_var(glob_dbg_info_p, dbg_info_cbmem);
}
CAR_MIGRATE(migrate_ehci_debug);
#endif
More information about the coreboot-gerrit
mailing list