diff --git a/src/usr/lpc/lpcdd.C b/src/usr/lpc/lpcdd.C index fd1fa54e1c8..543086a2879 100644 --- a/src/usr/lpc/lpcdd.C +++ b/src/usr/lpc/lpcdd.C @@ -30,6 +30,7 @@ */ #include +#include #include #include #include @@ -44,6 +45,7 @@ #include #include #include //@todo - RTC:97495 -- Resolve console access +#include #include #include #include @@ -385,8 +387,8 @@ void block_lpc_ops( bool i_block ) */ uint64_t get_lpc_bar( void ) { - //@todo-RTC:173521-Return live value - return MMIO_GROUP0_CHIP0_LPC_BASE_ADDR; + return mm_virt_to_phys( reinterpret_cast( + Singleton::instance().getLPCBaseAddr() )); } @@ -407,16 +409,13 @@ LpcDD::LpcDD( TARGETING::Target* i_proc ) { TRACFCOMP(g_trac_lpc, "LpcDD::LpcDD> " ); mutex_init( &iv_mutex ); - LPCBase_t baseAddr = LPC::LPC_PHYS_BASE + LPC_ADDR_START; - - - setLPCBaseAddr( static_cast( - mmio_dev_map(reinterpret_cast(baseAddr), - LPC_SPACE_SIZE ))); + LPCBase_t baseAddr; if( i_proc == TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL ) { ivp_mutex = &cv_mutex; + //Retrieve the LPC phys base from the bootloader/hostboot data manager + baseAddr = g_BlToHbDataManager.getLpcBAR() + LPC_ADDR_START; } else { @@ -428,8 +427,15 @@ LpcDD::LpcDD( TARGETING::Target* i_proc ) // Just use the local mutex ivp_mutex = &iv_mutex; + + //Correct LPC_BUS address attribute should be correct for alt_lpcdd + baseAddr = i_proc->getAttr() + LPC_ADDR_START; } + setLPCBaseAddr( static_cast( + mmio_dev_map(reinterpret_cast(baseAddr), + LPC_SPACE_SIZE ))); + //@todo RTC:126644 // Initialize the hardware // errlHndl_t l_errl = hwReset(LpcDD::RESET_INIT);