/******************************************************************************/
/*                       Copyright 2001 Broadcom Corporation                  */
/*                                                                            */
/* This material is the confidential trade secret and proprietary information */
/* of Broadcom Corp.  It may not be reproduced, used, sold or transferred to  */
/* any third party without the prior written consent of Broadcom Corp.        */
/* All rights reserved.                                                       */
/******************************************************************************/
/*   FileName        : bcm_hmiBootMsg.c                                       */
/*   Purpose         : Definition of layout variables for all boot messages   */
/*                     types                                                  */
/*   Limitations     : None                                                   */
/*   Author          : Emmanuel Hanssens                                      */
/*   Creation Date   : 24-Sep-2001                                            */
/*   History         : Compiled by CVS                                        */
/******************************************************************************/
/*   $Id: bcm_hmiBootMsg.c,v 1.5 2004/09/29 08:10:14 hanssens Exp $  */
/******************************************************************************/

#include "bcm_userdef.h"
#include "bcm_hmiBootMsg.h"
#include "bcm_hmiMsgDef.h"

/************************************ */
/* layout variable of principal types */
/************************************ */

typeLayout GenBootRequestLayout[] =
{
  { 1, sizeof(uint16) },
  { 0, 0              }
};

typeLayout BootRequestLayout[] =
{
  { 2, sizeof(uint32) },
  { 3, sizeof(uint16) },
  { 2, sizeof(uint8)  },
  { 0, 0              }
};

/* imageBinary field is ignored for this layout definition, as it must not be
swapped -- this is the target image -- while the size of the message is
variable, i.e. can't be computed from the type */
typeLayout BootPacketLayout[] =
{
  { 3, sizeof(uint32) },
  { 0, 0              }
};

typeLayout GoOperationalRequestLayout[] =
{
  { 3, sizeof(uint32) },        /* uint32 and int32 have same size */
  { 0, 0              }
};

typeLayout GoOperationalReplyLayout[] =
{
  { 1, sizeof(int32) },
  { 0, 0             }
};

typeLayout BootReadSmemMsgReqLayout[] =
{
  { 2, sizeof(uint32) },        /* uint32 and int32 have same size */
  { 0, 0              }
};

typeLayout BootReadSmemMsgRepLayout[] =
{
  { 488, sizeof(uint8) },
  { 0, 0             }
};

/************************************************ */
/* message layout using the macros in hmiMsgDef.h */
/************************************************ */

HMI_MSG_ALL_LAYOUT(GenerateBootRequest, GENERATE_BOOT_REQUEST,
                   GenBootRequest, BootRequest)

HMI_MSG_REQ_LAYOUT(SendBootPacket, SEND_BOOT_PACKET,
                   BootPacket)

HMI_MSG_ALL_LAYOUT(GoOperational, GO_OPERATIONAL,
                   GoOperationalRequest, GoOperationalReply)

HMI_MSG_ALL_LAYOUT(BootReadSmem, BOOT_READ_SMEM,
                   BootReadSmemMsgReq, BootReadSmemMsgRep)
