diff options
Diffstat (limited to 'qemu/roms/SLOF/board-js2x/include')
-rw-r--r-- | qemu/roms/SLOF/board-js2x/include/bmc.h | 29 | ||||
-rw-r--r-- | qemu/roms/SLOF/board-js2x/include/hw.h | 27 | ||||
-rw-r--r-- | qemu/roms/SLOF/board-js2x/include/nvramlog.h | 65 | ||||
-rw-r--r-- | qemu/roms/SLOF/board-js2x/include/product.h | 31 | ||||
-rw-r--r-- | qemu/roms/SLOF/board-js2x/include/southbridge.h | 28 |
5 files changed, 180 insertions, 0 deletions
diff --git a/qemu/roms/SLOF/board-js2x/include/bmc.h b/qemu/roms/SLOF/board-js2x/include/bmc.h new file mode 100644 index 000000000..39dff80b2 --- /dev/null +++ b/qemu/roms/SLOF/board-js2x/include/bmc.h @@ -0,0 +1,29 @@ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation + * All rights reserved. + * This program and the accompanying materials + * are made available under the terms of the BSD License + * which accompanies this distribution, and is available at + * http://www.opensource.org/licenses/bsd-license.php + * + * Contributors: + * IBM Corporation - initial implementation + *****************************************************************************/ + +#ifndef __BMC_H +#define __BMC_H + +void (*bmc_system_reboot) (void); +void (*bmc_power_off) (void); + +short (*bmc_set_flashside) (short mode); +short (*bmc_get_flashside) (void); +int (*bmc_stop_bootwatchdog) (void); +int (*bmc_set_bootwatchdog) (unsigned short); + +uint32_t(*bmc_read_vpd) (uint8_t * dst, uint32_t len, uint32_t offset); +uint32_t(*bmc_write_vpd) (uint8_t * src, uint32_t len, uint32_t offset); + +uint32_t(*bmc_get_blade_descr) (uint8_t * dst, uint32_t maxlen, uint32_t * len); + +#endif /* __BMC_H */ diff --git a/qemu/roms/SLOF/board-js2x/include/hw.h b/qemu/roms/SLOF/board-js2x/include/hw.h new file mode 100644 index 000000000..27117c3f3 --- /dev/null +++ b/qemu/roms/SLOF/board-js2x/include/hw.h @@ -0,0 +1,27 @@ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation + * All rights reserved. + * This program and the accompanying materials + * are made available under the terms of the BSD License + * which accompanies this distribution, and is available at + * http://www.opensource.org/licenses/bsd-license.php + * + * Contributors: + * IBM Corporation - initial implementation + *****************************************************************************/ + +uint16_t bswap16_load(uint64_t addr) ; +uint32_t bswap32_load(uint64_t addr) ; + +void bswap16_store(uint64_t addr, uint16_t val) ; +void bswap32_store(uint64_t addr, uint32_t val) ; + +uint8_t load8_ci(uint64_t addr) ; +uint16_t load16_ci(uint64_t addr) ; +uint32_t load32_ci(uint64_t addr) ; +uint64_t load64_ci(uint64_t addr) ; + +void store8_ci(uint64_t addr, uint8_t val) ; +void store16_ci(uint64_t addr, uint16_t val) ; +void store32_ci(uint64_t addr, uint32_t val) ; +void store64_ci(uint64_t addr, uint64_t val) ; diff --git a/qemu/roms/SLOF/board-js2x/include/nvramlog.h b/qemu/roms/SLOF/board-js2x/include/nvramlog.h new file mode 100644 index 000000000..5d6c5d1c9 --- /dev/null +++ b/qemu/roms/SLOF/board-js2x/include/nvramlog.h @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation + * All rights reserved. + * This program and the accompanying materials + * are made available under the terms of the BSD License + * which accompanies this distribution, and is available at + * http://www.opensource.org/licenses/bsd-license.php + * + * Contributors: + * IBM Corporation - initial implementation + *****************************************************************************/ + +#ifndef NVRAMLOG_H + #define NVRAMLOG_H + +/* ---------------------------------------------------------------------------- + * NVRAM Log-Partition header design: + * + * Partition Header + * 00h - signature ( 1 byte) + * 01h - checksum ( 1 byte) + * 02h - length ( 2 byte) value = 1st_byte*256 + 2nd_byte + * 04h - name (12 byte) + * space for partiton header = 16 byte + * + * Log Header + * 10h - offset ( 2 byte) from Partition Header to Data Section + * 12h - flags ( 2 byte) control flags + * 14h - pointer ( 4 byte) pointer to first free byte in Data Section + * relative to the beginning of the data section + * 18h - zero ( 32 byte) reserved as stack for four 64 bit register + * 38h - reserved ( 8 byte) reserved for 64 bit CRC (not implemented yet) + * space for header = 64 byte + * Data Section + * 40h - cyclic data + * -------------------------------------------------------------------------------- */ + + // initial values + #define LLFW_LOG_BE0_SIGNATURE 0x51 // signature for general firmware usage + #define LLFW_LOG_BE0_NAME_PREFIX 0x69626D2C // first 4 bytes of name: "ibm," + #define LLFW_LOG_BE0_NAME 0x435055306C6F6700 // remaining 8 bytes : "CPU0log\0" + #define LLFW_LOG_BE0_LENGTH 0x2000 // Partition length in block of 16 bytes + #define LLFW_LOG_BE0_DATA_OFFSET 0x40 // offset in bytes between header and data + #define LLFW_LOG_BE0_FLAGS 0 // unused + + #define LLFW_LOG_BE1_SIGNATURE 0x51 // signature for general firmware usage + #define LLFW_LOG_BE1_NAME_PREFIX 0x69626D2C // first 4 bytes of name: "ibm," + #define LLFW_LOG_BE1_NAME 0x435055316C6F6700 // remaining 8 bytes : "CPU1log\0\0" + #define LLFW_LOG_BE1_LENGTH 0x500 // Partition length in block of 16 bytes + #define LLFW_LOG_BE1_DATA_OFFSET 0x40 // offset in bytes between header and data + #define LLFW_LOG_BE1_FLAGS 0x0 // unused + + // positions of the initial values + #define LLFW_LOG_POS_CHECKSUM 0x01 // 1 + #define LLFW_LOG_POS_LENGTH 0x02 // 2 + #define LLFW_LOG_POS_NAME 0x04 // 4 + #define LLFW_LOG_POS_DATA_OFFSET 0x10 // 16 + #define LLFW_LOG_POS_FLAGS 0x12 // 18 + #define LLFW_LOG_POS_POINTER 0x14 // 20 + + // NVRAM info + #define MAMBO_NVRAM_BASE 0x100000 // NVRAM Base for MAMBO + #define NVRAM_EMPTY_PATTERN 0x0000000000000000 // Pattern (64-bit) used to overwrite NVRAM + +#endif diff --git a/qemu/roms/SLOF/board-js2x/include/product.h b/qemu/roms/SLOF/board-js2x/include/product.h new file mode 100644 index 000000000..55e9132f8 --- /dev/null +++ b/qemu/roms/SLOF/board-js2x/include/product.h @@ -0,0 +1,31 @@ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation + * All rights reserved. + * This program and the accompanying materials + * are made available under the terms of the BSD License + * which accompanies this distribution, and is available at + * http://www.opensource.org/licenses/bsd-license.php + * + * Contributors: + * IBM Corporation - initial implementation + *****************************************************************************/ + +#ifndef _PRODUCT_H +#define _PRODUCT_H + +/* This is also the name which is also put in the flash and should + * therefore not excedd the length of 32 bytes */ +#define PRODUCT_NAME "JS2XBlade" + +/* Generic identifier used in the flash */ +#define FLASHFS_MAGIC "magic123" + +/* Magic identifying the platform */ +#define FLASHFS_PLATFORM_MAGIC "JS2XBlade" + +/* also used in the flash */ +#define FLASHFS_PLATFORM_REVISION "1" + +#define BOOT_MESSAGE "Press \"s\" to enter Open Firmware.\r\n\r\n\0" + +#endif diff --git a/qemu/roms/SLOF/board-js2x/include/southbridge.h b/qemu/roms/SLOF/board-js2x/include/southbridge.h new file mode 100644 index 000000000..1edeb6d76 --- /dev/null +++ b/qemu/roms/SLOF/board-js2x/include/southbridge.h @@ -0,0 +1,28 @@ +/****************************************************************************** + * Copyright (c) 2004, 2008 IBM Corporation + * All rights reserved. + * This program and the accompanying materials + * are made available under the terms of the BSD License + * which accompanies this distribution, and is available at + * http://www.opensource.org/licenses/bsd-license.php + * + * Contributors: + * IBM Corporation - initial implementation + *****************************************************************************/ + +#ifndef _SOUTHBRIDGE_H +#define _SOUTHBRIDGE_H + + +#define SB_FLASH_adr (0xff000000) // FLASH (EBC_CS0/Bank0) +#define SB_NVRAM_adr (0xff800000) // NonVolatile mapping +#define SB_NVRAM_FWONLY_adr (0xff8FF000) // NonVolatile mapping +#define NVRAM_LENGTH 0x100000 +#define NVRAM_FWONLY_LENGTH 0x1000 +#define SB_MAILBOX_adr 0 + +#define FLASH_LENGTH 0x400000 + +#define SB_IPMI_KCS_adr 0xF4000CA8 // IPMI KCS + +#endif |