[Skiboot] [PATCH 10/12] opal: Enable backup topology.
Mahesh Jagannath Salgaonkar
mahesh at linux.vnet.ibm.com
Thu May 7 15:41:26 AEST 2015
On 05/07/2015 02:43 AM, Stewart Smith wrote:
> Mahesh Jagannath Salgaonkar <mahesh at linux.vnet.ibm.com> writes:
>> On 04/22/2015 09:49 AM, Stewart Smith wrote:
>>> Mahesh J Salgaonkar <mahesh at linux.vnet.ibm.com> writes:
>>>> Whenever FSP makes any changes to backup topology as part of either
>>>> routine hardware maintenance or fixing failed backup topology configuration,
>>>> it sends out mailbox command xE6, s/c 0x06, mod 0, to enable/disable
>>>> the backup topology. OPAL layer should keep itself up-to-date with accurate
>>>> details of current topology configurations. This will help OPAL layer to
>>>> successfully handle any TOD failover in future.
>>>> The FSP can only request that the currently inactive (backup) topology be
>>>> disabled or enabled. If the requested topology is currently the active
>>>> topology, then fail this request with a 0xB8 (TOD topology in use) status
>>>> as return code.
>>>> For disable request, set the backup topology status as disabled.
>>>> For enable request, scan all the available chips and find the new backup
>>>> master chip by looking at TOD status register of each chip.
>>>> Signed-off-by: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
>>>> hw/chiptod.c | 106 ++++++++++++++++++++++++++++++++++++++++++++
>>>> include/fsp.h | 9 ++++
>>>> platforms/ibm-fsp/common.c | 3 +
>>> Should this be a platform call rather than having FSP code leak into
>>> common hw code?
>> I am not sure I understood your question.
>> fsp_chiptod_init() registers a client to monitor/listen FSP mailbox
>> commands of specific Mbox CLASS (E6 = HW maintanance) and need to be
>> called during platform init.
>> I see that platform init call points to ibm_fsp_init() defined in
>> ibm-fsp/common.c. Hence I have just hooked fsp_chiptod_init() in
>> ibm_fsp_init() function where bunch of other fsp_* functions are invoked.
>> Do you think that's not the right way to do it ?
> More concerned about the FSP specific code being introduced into
> hw/chiptod.c - any reason that code should be there rather somewhere in
> platforms/ibm-fsp ?
I got your point. May be I should move fsp specific code under 'hw/fsp/'
dir as it already contains all the fsp specific code.
Will fix it in next version.
More information about the Skiboot