diff options
Diffstat (limited to 'sys/contrib/octeon-sdk/cvmx-bootloader.h')
-rw-r--r-- | sys/contrib/octeon-sdk/cvmx-bootloader.h | 100 |
1 files changed, 52 insertions, 48 deletions
diff --git a/sys/contrib/octeon-sdk/cvmx-bootloader.h b/sys/contrib/octeon-sdk/cvmx-bootloader.h index c1097aa..caf4609 100644 --- a/sys/contrib/octeon-sdk/cvmx-bootloader.h +++ b/sys/contrib/octeon-sdk/cvmx-bootloader.h @@ -1,43 +1,45 @@ /***********************license start*************** - * Copyright (c) 2008 Cavium Networks (support@cavium.com). All rights - * reserved. + * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * reserved. * * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * * Neither the name of Cavium Networks nor the names of - * its contributors may be used to endorse or promote products - * derived from this software without specific prior written - * permission. - * - * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS - * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH - * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY - * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT - * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES - * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR - * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET - * POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. - * - * - * For any questions regarding licensing please contact marketing@caviumnetworks.com + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + + * * Neither the name of Cavium Networks nor the names of + * its contributors may be used to endorse or promote products + * derived from this software without specific prior written + * permission. + + * This Software, including technical data, may be subject to U.S. export control + * laws, including the U.S. Export Administration Act and its associated + * regulations, and may be subject to export or import regulations in other + * countries. + + * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" + * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO + * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR + * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM + * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE, + * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF + * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR + * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR + * PERFORMANCE OF THE SOFTWARE LIES WITH YOU. ***********************license end**************************************/ + #ifndef __CVMX_BOOTLOADER__ #define __CVMX_BOOTLOADER__ @@ -48,7 +50,7 @@ * * Bootloader definitions that are shared with other programs * - * <hr>$Revision: 41586 $<hr> + * <hr>$Revision: 49448 $<hr> */ @@ -65,17 +67,18 @@ #define BOOTLOADER_HEADER_MAX_SIZE 0x200 /* limited by the space to the next exception handler */ #define BOOTLOADER_HEADER_CURRENT_MAJOR_REV 1 -#define BOOTLOADER_HEADER_CURRENT_MINOR_REV 1 +#define BOOTLOADER_HEADER_CURRENT_MINOR_REV 2 +/* Revision history +* 1.1 Initial released revision. (SDK 1.9) +* 1.2 TLB based relocatable image (SDK 2.0) +* +* +*/ /* offsets to struct bootloader_header fields for assembly use */ -#define MAGIC_OFFST 8 -#define HCRC_OFFST 12 -#define HLEN_OFFST 16 -#define DLEN_OFFST 24 -#define DCRC_OFFST 28 -#define GOT_OFFST 48 +#define GOT_ADDRESS_OFFSET 48 -#define LOOKUP_STEP 8192 +#define LOOKUP_STEP (64*1024) #ifndef __ASSEMBLY__ typedef struct bootloader_header @@ -86,7 +89,7 @@ typedef struct bootloader_header */ uint32_t nop_instr; /* Must be 0x0 */ uint32_t magic; /* Magic number to identify header */ - uint32_t hcrc; /* CRC of all of header excluding this field */ + uint32_t hcrc; /* CRC of all of header excluding this field */ uint16_t hlen; /* Length of header in bytes */ uint16_t maj_rev; /* Major revision */ @@ -99,12 +102,11 @@ typedef struct bootloader_header uint32_t flags; uint16_t image_type; /* Defined in bootloader_image_t enum */ uint16_t resv0; /* pad */ - - /* The next 4 fields are placed in compile-time, not by the utility */ - uint32_t got_address; /* compiled got address position in the image */ - uint32_t got_num_entries; /* number of got entries */ - uint32_t compiled_start; /* compaled start of the image address */ - uint32_t image_start; /* relocated start of image address */ + + uint32_t reserved1; + uint32_t reserved2; + uint32_t reserved3; + uint32_t reserved4; char comment_string[BOOTLOADER_HEADER_COMMENT_LEN]; /* Optional, for descriptive purposes */ char version_string[BOOTLOADER_HEADER_VERSION_LEN]; /* Optional, for descriptive purposes */ @@ -118,7 +120,7 @@ typedef struct bootloader_header typedef enum { - BL_HEADER_IMAGE_UKNOWN = 0x0, + BL_HEADER_IMAGE_UNKNOWN = 0x0, BL_HEADER_IMAGE_STAGE2, /* Binary bootloader stage2 image (NAND boot) */ BL_HEADER_IMAGE_STAGE3, /* Binary bootloader stage3 image (NAND boot)*/ BL_HEADER_IMAGE_NOR, /* Binary bootloader for NOR boot */ @@ -136,6 +138,8 @@ typedef enum ** by stage1 and stage2. */ #define MAX_NAND_SEARCH_ADDR 0x400000 +/* Maximum address to look for start of normal bootloader */ +#define MAX_NOR_SEARCH_ADDR 0x100000 /* Defines for RAM based environment set by the host or the previous bootloader ** in a chain boot configuration. */ |