diff --git a/src/soc/intel/xeon_sp/ebg/soc_xhci.c b/src/soc/intel/xeon_sp/ebg/soc_xhci.c index f8aa37b88d..f7b1320e86 100644 --- a/src/soc/intel/xeon_sp/ebg/soc_xhci.c +++ b/src/soc/intel/xeon_sp/ebg/soc_xhci.c @@ -17,6 +17,13 @@ static uint8_t *get_xhci_bar(void) printk(BIOS_ERR, "XHCI BAR is not found\n"); return NULL; } + +#if ENV_X86_32 + assert(res->base < 0x100000000ULL); + if (res->base >= 0x100000000ULL) + return NULL; +#endif + return (void *)(uintptr_t)res->base; }