fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * PHOTON CONFIGURATION MANAGER
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Downloadable code definitions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _ROM_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _ROM_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Include any headers you depend on.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * I18N message number ranges
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This file: 17500 - 17999
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Shared common messages: 1 - 1999
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The PLUTO controller has 4 proms (0-3). Prom 1-3 are writeable and are
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * soldered to the board while prom 0 is not writeable but socketed. The
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * following items are placed in the PLUTO prom set:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * - POST0 -Power On Self Test code. This code goes in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * pluto_prom0 and may not be modified in the field.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * It contains serial port downloading code.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * - FUNC -Pluto Functional code (SPARC)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * - SOC -SOC microcode
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * - ISP -ISP microcode
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * - OBP -Open Boot Prom code
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * - Date Code -date/time of prom creation.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * - WWN - World Wide Name
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This utility creates the writeable prom images for PLUTO. Three prom images
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * are created: pluto_prom1, pluto_prom2, pluto_prom3.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The following defines the layout of the 4 proms on the PLUTO controller:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * prom offset image
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * -----------------------------------
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * prom_0:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 0 POST
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * prom_1:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 0 FUNC
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * prom_2:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 0 FUNC cont'd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * prom_3:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * PROM_MAGIC_OFF PROM_MAGIC
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * DATE_OFF DATE_CODE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * WWN_OFF WWN
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * SOC_OFF SOC
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ISP_OFF ISP
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * OBP_OFF OBP
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PROM_MAGIC 0x2468
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PROMSIZE 0x00040000 /* 256K bytes each prom */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EEPROM_SECTSIZ 0x100
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define IBEEPROM 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MBEEPROM 2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FW_DL_INFO 0x2d0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FPM_DL_INFO 0x31000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestruct dl_info {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ushort_t unused;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ushort_t magic;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ulong_t cksum;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte time_t datecode;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte};
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define WWN_SIZE 8
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TEXT_SZ 64*1024
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define IDATA_SZ 32*1024
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FPM_SZ 60*1024
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* offsets in prom */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TEXT_OFFSET 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define IDATA_OFFSET 0x10000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FPM_OFFSET 0x31000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _ROM_H */