arch/x86: Move ehci_dbg_info outside _car_relocatable_data
As code already used CBMEM hooks to switch from CAR to CBMEM it was never necessary to have the structure declared inside _car_relocatable_data. Switch to use car_[get|set]_ptr is mostly for consistency, but should also enable use of usbdebug with FSP1.0 romstage. Change-Id: I636251085d84e52a71a1d5d27d795bb94a07422d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35288 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
3dd23a5e72
commit
3de9d774b1
|
@ -59,13 +59,13 @@
|
||||||
|
|
||||||
TIMESTAMP(., 0x200)
|
TIMESTAMP(., 0x200)
|
||||||
|
|
||||||
_car_relocatable_data_start = .;
|
|
||||||
|
|
||||||
_car_ehci_dbg_info_start = .;
|
_car_ehci_dbg_info_start = .;
|
||||||
/* Reserve sizeof(struct ehci_dbg_info). */
|
/* Reserve sizeof(struct ehci_dbg_info). */
|
||||||
. += 80;
|
. += 80;
|
||||||
_car_ehci_dbg_info_end = .;
|
_car_ehci_dbg_info_end = .;
|
||||||
|
|
||||||
|
_car_relocatable_data_start = .;
|
||||||
|
|
||||||
/* _car_global_start and _car_global_end provide symbols to per-stage
|
/* _car_global_start and _car_global_end provide symbols to per-stage
|
||||||
* variables that are not shared like the timestamp and the pre-ram
|
* variables that are not shared like the timestamp and the pre-ram
|
||||||
* cbmem console. This is useful for clearing this area on a per-stage
|
* cbmem console. This is useful for clearing this area on a per-stage
|
||||||
|
|
|
@ -67,7 +67,7 @@ static struct ehci_debug_info * glob_dbg_info_p CAR_GLOBAL;
|
||||||
|
|
||||||
static inline struct ehci_debug_info *dbgp_ehci_info(void)
|
static inline struct ehci_debug_info *dbgp_ehci_info(void)
|
||||||
{
|
{
|
||||||
if (car_get_var(glob_dbg_info_p) == NULL) {
|
if (car_get_ptr(glob_dbg_info_p) == NULL) {
|
||||||
struct ehci_debug_info *info;
|
struct ehci_debug_info *info;
|
||||||
if (ENV_BOOTBLOCK || ENV_VERSTAGE || ENV_ROMSTAGE) {
|
if (ENV_BOOTBLOCK || ENV_VERSTAGE || ENV_ROMSTAGE) {
|
||||||
/* The message likely does not show if we hit this. */
|
/* The message likely does not show if we hit this. */
|
||||||
|
@ -77,9 +77,9 @@ static inline struct ehci_debug_info *dbgp_ehci_info(void)
|
||||||
} else {
|
} else {
|
||||||
info = &glob_dbg_info;
|
info = &glob_dbg_info;
|
||||||
}
|
}
|
||||||
car_set_var(glob_dbg_info_p, info);
|
car_set_ptr(glob_dbg_info_p, info);
|
||||||
}
|
}
|
||||||
return car_get_var(glob_dbg_info_p);
|
return car_get_ptr(glob_dbg_info_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dbgp_wait_until_complete(struct ehci_dbg_port *ehci_debug)
|
static int dbgp_wait_until_complete(struct ehci_dbg_port *ehci_debug)
|
||||||
|
@ -716,7 +716,7 @@ static void migrate_ehci_debug(int is_recovery)
|
||||||
if (dbg_info_cbmem == NULL)
|
if (dbg_info_cbmem == NULL)
|
||||||
return;
|
return;
|
||||||
memcpy(dbg_info_cbmem, dbg_info, sizeof(*dbg_info));
|
memcpy(dbg_info_cbmem, dbg_info, sizeof(*dbg_info));
|
||||||
car_set_var(glob_dbg_info_p, dbg_info_cbmem);
|
car_set_ptr(glob_dbg_info_p, dbg_info_cbmem);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -724,7 +724,7 @@ static void migrate_ehci_debug(int is_recovery)
|
||||||
/* Use state in CBMEM. */
|
/* Use state in CBMEM. */
|
||||||
dbg_info_cbmem = cbmem_find(CBMEM_ID_EHCI_DEBUG);
|
dbg_info_cbmem = cbmem_find(CBMEM_ID_EHCI_DEBUG);
|
||||||
if (dbg_info_cbmem)
|
if (dbg_info_cbmem)
|
||||||
car_set_var(glob_dbg_info_p, dbg_info_cbmem);
|
car_set_ptr(glob_dbg_info_p, dbg_info_cbmem);
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = usbdebug_hw_init(false);
|
rv = usbdebug_hw_init(false);
|
||||||
|
|
Loading…
Reference in New Issue