/******************************************************************************/
/*                       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.h                                       */
/*   Purpose         : Header for all boot messages BasicTypes                */
/*   Limitations     : None                                                   */
/*   Author          : Emmanuel Hanssens                                      */
/*   Creation Date   : 24-Sep-2001                                            */
/*   History         : Compiled by CVS                                        */
/******************************************************************************/
/*   $Id: bcm_hmiBootMsg.h,v 1.8 2004/09/29 08:10:14 hanssens Exp $  */
/******************************************************************************/
#ifndef HMI_BOOT_MSG_H
# define HMI_BOOT_MSG_H

# include "bcm_userdef.h"
# include "bcm_layout.h"

/* {{{ Application ID */

# define BOOT_APPLICATION_ID            0x200

/* }}} */
/* {{{ Available services */

# define GENERATE_BOOT_REQUEST          0x0200
# define SEND_BOOT_PACKET               0x0201
# define GO_OPERATIONAL                 0x0202
# define BOOT_READ_SMEM                 0x0205

/* }}} */

/* {{{ GenerateBootRequest service */

typedef struct GenBootRequest GenBootRequest;
struct GenBootRequest
{
  uint16 interval;
} BCM_PACKING_ATTRIBUTE ;

typedef struct BootRequest BootRequest;
struct BootRequest
{
  uint32 imageType;
  uint32 hwChipId;
  uint16 downloadProtocolMajorVersion;
  uint16 downloadProtocolMinorVersion;
  uint16 booterMajorVersion;
  uint8  booterMinorVersion;
  uint8  booterFixVersion;
} BCM_PACKING_ATTRIBUTE ;


typedef GenBootRequest GenerateBootRequestMsgReq;
typedef BootRequest    GenerateBootRequestMsgRep;

extern  MsgLayout      GenerateBootRequestLayout;

/* }}} */
/* {{{ SendBootPacket service */

typedef struct BootPacket BootPacket;
struct BootPacket
{
  uint32 imageType;
  uint32 offset;
  uint32 packetSize;
  /* binary image is appended at the end of this structure */
} BCM_PACKING_ATTRIBUTE ;

typedef BootPacket   SendBootPacketMsgReq;
extern  MsgLayout    SendBootPacketLayout;

/* }}} */
/* {{{ GoOperational service */

typedef struct GoOperationalRequest GoOperationalRequest;
struct GoOperationalRequest
{
  uint32 imageType;
  uint32 imageSize;
  int32  controlUtopiaAddr;   
} BCM_PACKING_ATTRIBUTE ;

typedef struct GoOperationalReply GoOperationalReply;
struct GoOperationalReply
{
  int32 result;
} BCM_PACKING_ATTRIBUTE ;


typedef GoOperationalRequest   GoOperationalMsgReq;
typedef GoOperationalReply     GoOperationalMsgRep;
extern  MsgLayout              GoOperationalLayout;

/* }}} */
/* {{{ BootReadSmem service */

typedef struct BootReadSmemMsgReq BootReadSmemMsgReq;
struct BootReadSmemMsgReq
{
  uint32 start;
  uint32 length;
} BCM_PACKING_ATTRIBUTE ;

typedef struct BootReadSmemMsgRep BootReadSmemMsgRep;
struct BootReadSmemMsgRep
{
  uint8 smem[488];
} BCM_PACKING_ATTRIBUTE ;

extern  MsgLayout BootReadSmemLayout;

/* }}} */

#endif
