#
# Copyright (c) 2002-2013 by Brocade Communications Systems, Inc.
# All rights reserved.
#
# This file contains the atom description of the CHASSIS service for its
# startup, fss and swd config initialization. You must understand the
# implecations before you make change following the conventions below:
#	1. add a new component into the kernel or user-space section
#	   based on its type in the alphamerical order.
#	2. if a new component is a fss-compliant, the service major
#	   version needs to be bumped up.
#	3. If any component partition version is changed, the service
#	   partition version needs to be increased as well.
# 
# Each 'ATOM' has the following attributes:
#
#  TYPE	F1 F2
#	F1: [user|kernel] to indicate a user-space or kernel-space atom.
#	F2: optional, or indicate shared/max.

#  SWD	F1 F2
#	F1: SWD time window of 'I AM ALIVE period'.
#	F2: optional, 'RES' means atom restartable.
#
#  FSS	F1 F2 F3 F4 F5
#	F1: current version of component
#	F2: minimum vertion to which this component can sync up.
#	F3: distrbuted partition version. 0 reserved for a centralized model.
#	F4: dump stage, this field can have any value from 0 onwards. It
#	    indicates the stage at which FSS will command the component to
#	    dump its states. More than one component could be at the same
#           dump stage. A component having a dumpstage of 0, gets command
#           to dump its states before a component having dumpstage of 1.
#           A component X that depends on some other component Y in sync,
#           before it can start sync, X should have dumpstage number greater
#       F5: bit-wise sync control flag (0 as default if not specified):
#           b0 -- 1, state sync required
#           b1 -- 1, FSS guarantees serilization. while replaying the data
#                 back to the component. This is used for Hot Code Load.
#                 Currently this facility is used only for em. When replaying
#                 the data, em needs to create all data structures (fabos
#                 kernel-space objects which other components use. So till
#                 fss loopback is done replaying data back to em, no other
#                 components are delivered their state updates. Note this
#                 shall not be abused as it is expensive.
#           b2 -- 1, critical component. any component may be configured
#                 as stateless (b0 = 0), but if it happens to a critical
#                 component, then a cold recovery is demanded even if the
#                 overall system state is in sync. this bit is introduced
#                 for the support of no-ha in first mercury release while
#                 keeping the minimal state in-sync like configurations.
#
#  PATH	F1 F2...
#	F1: atom executable path (for user-space atom)
#	F2: optional arguments.
#
MAJORVER	3	# service major version
MINORVER	1	# service minor version, not used
PARTIVER	0	# partition version
STRIGGER	YES	# sync trigger policy

#
# kernel-space atoms
#
ATOM   blc
{
	TYPE	KERNEL	1
	FSS	1 1 1 1 1 	# critical with sync
}

#
# fcoe agent just needs the ctor/dtor for now, no fss staging.
#
ATOM   fcoek
{
	TYPE	KERNEL	2
}

# HAML module
ATOM   haml[1004,1005,1006,1007]
{
	TYPE  KERNEL 1
	FSS   1 1 1 1 1
}

#
# user-space atoms
#
ATOM   raslog[1004,1005,1006,1007,1008,1009,1010,1011]
{
	TYPE	USER0
	SWD	500	RES
	PATH	/fabos/libexec/raslogd
}

ATOM   lcdiagd[1004,1005,1006,1007,1008,1009,1010,1011]
{
	TYPE	USER
	SWD	500	RES
	PATH	/fabos/libexec/lcdiagd -p $SWBD
}

ATOM   trace[1004,1005,1006,1007,1008,1009,1010,1011]
{
	TYPE	USER0
	SWD	500	RES
	PATH	/fabos/libexec/traced -p $SWBD
}
