/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 * $Id: boot1_ppcboot.h,v 1.2 2008/05/27 23:06:31 cnguyen Exp $
 */
#ifndef __BOOT1_PPCBOOT__
#define __BOOT1_PPCBOOT__

#ifdef __ATI_BUILD__
/* 16 instructions to load into EXI regs */
#define INSN16_BLOCK  2
#define INSN16_START_PAGE 64
#define INSN16_END_PAGE   64

#define LDR1_BLOCK  2
#define LDR1_LOAD_ADDR 0x00000100
#define LDR1_START_PAGE 65
#define LDR1_END_PAGE   127

#define LDR2_LOAD_ADDR  (LDR1_LOAD_ADDR + 2048*(LDR1_END_PAGE - LDR1_START_PAGE +1))
#define LDR2_BLOCK  3
#define LDR2_START_PAGE 128
#define LDR2_END_PAGE   191 
#endif /* __ATI_BUILD__ */

#ifdef __RVL_BUILD__
/* 16 instructions to load into EXI regs */
#define INSN16_BLOCK  2
#define INSN16_START_PAGE 64
#define INSN16_END_PAGE   64

/* RvlBootInfo loaded into Napa */
#define BOOTINFO_LOAD_ADDR  0x00003100
#define BOOTINFO_BLOCK  2
#define BOOTINFO_START_PAGE 65
#define BOOTINFO_END_PAGE   65

/* BS1 loaded into Napa */
#define BS1_LOAD_ADDR  0x00003400
#define BS1_BLOCK  2
#define BS1_START_PAGE 66
#define BS1_END_PAGE   66

/* BS2 loaded into Napa */
#define BS2_LOAD_ADDR  0x01330000
#define BS2_BLOCK  3
#define BS2_START_PAGE 128
#define BS2_END_PAGE   191
#endif /* __RVL_BUILD__ */

/* Boot failure codes */
#define BOOT_ERR_NOEXISTS             0x70
#define BOOT_ERR_INVALID              0x71
#define BOOT_ERR_FL_INIT              0x72
#define BOOT_ERR_FL_RD                0x73
#define BOOT_ERR_EEPROM               0x74

/* Flash related defs. XXX horti: put into some common place */
#define BYTES_PER_PAGE  2048
#define BYTES_PER_SPARE 64
#endif /* __BOOT1_PPCBOOT__ */

