/* $Id: ip27config.h,v 1.1.1.1 2003/06/23 22:18:40 jharrell Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc. * Copyright (C) 2000 by Colin Ngam */ #ifndef _ASM_SN_SN1_IP27CONFIG_H #define _ASM_SN_SN1_IP27CONFIG_H /* * Structure: ip27config_s * Typedef: ip27config_t * Purpose: Maps out the region of the boot prom used to define * configuration information. * Notes: Corresponds to ip27config structure found in start.s. * Fields are ulong where possible to facilitate IP27 PROM fetches. */ #define CONFIG_INFO_OFFSET 0x60 #define IP27CONFIG_ADDR (LBOOT_BASE + \ CONFIG_INFO_OFFSET) #define IP27CONFIG_ADDR_NODE(n) (NODE_RBOOT_BASE(n) + \ CONFIG_INFO_OFFSET) /* Offset to the config_type field within local ip27config structure */ #define CONFIG_FLAGS_ADDR (IP27CONFIG_ADDR + 72) /* Offset to the config_type field in the ip27config structure on * node with nasid n */ #define CONFIG_FLAGS_ADDR_NODE(n) (IP27CONFIG_ADDR_NODE(n) + 72) /* Meaning of each valid bit in the config flags * None are currently defined */ /* Meaning of each mach_type value */ #define SN1_MACH_TYPE 0 /* * Since 800 ns works well with various HUB frequencies, (such as 360, * 380, 390, and 400 MHZ), we now use 800ns rtc cycle time instead of * 1 microsec. */ #define IP27_RTC_FREQ 1250 /* 800ns cycle time */ #if _LANGUAGE_C typedef struct ip27config_s { /* KEEP IN SYNC w/ start.s & below */ uint time_const; /* Time constant */ uint r10k_mode; /* R10k boot mode bits */ uint64_t magic; /* CONFIG_MAGIC */ uint64_t freq_cpu; /* Hz */ uint64_t freq_hub; /* Hz */ uint64_t freq_rtc; /* Hz */ uint ecc_enable; /* ECC enable flag */ uint fprom_cyc; /* FPROM_CYC speed control */ uint mach_type; /* Inidicate IP27 (0) or Sn00 (1) */ uint check_sum_adj; /* Used after config hdr overlay */ /* to make the checksum 0 again */ uint flash_count; /* Value incr'd on each PROM flash */ uint fprom_wr; /* FPROM_WR speed control */ uint pvers_vers; /* Prom version number */ uint pvers_rev; /* Prom revision number */ uint config_type; /* To support special configurations * (none currently defined) */ } ip27config_t; typedef struct { uint r10k_mode; /* R10k boot mode bits */ uint freq_cpu; /* Hz */ uint freq_hub; /* Hz */ char fprom_cyc; /* FPROM_CYC speed control */ char mach_type; /* IP35(0) is only type defined */ char fprom_wr; /* FPROM_WR speed control */ } config_modifiable_t; #define IP27CONFIG (*(ip27config_t *) IP27CONFIG_ADDR) #define IP27CONFIG_NODE(n) (*(ip27config_t *) IP27CONFIG_ADDR_NODE(n)) #define SN00 0 /* IP35 has no Speedo equivalent */ /* Get the config flags from local ip27config */ #define CONFIG_FLAGS (*(uint *) (CONFIG_FLAGS_ADDR)) /* Get the config flags from ip27config on the node * with nasid n */ #define CONFIG_FLAGS_NODE(n) (*(uint *) (CONFIG_FLAGS_ADDR_NODE(n))) /* Macro to check if the local ip27config indicates a config * of 12 p 4io */ #define CONFIG_12P4I (0) /* IP35 has no 12p4i equivalent */ /* Macro to check if the ip27config on node with nasid n * indicates a config of 12 p 4io */ #define CONFIG_12P4I_NODE(n) (0) #endif /* _LANGUAGE_C */ #if _LANGUAGE_ASSEMBLY .struct 0 /* KEEP IN SYNC WITH C structure */ ip27c_time_const: .word 0 ip27c_r10k_mode: .word 0 ip27c_magic: .dword 0 ip27c_freq_cpu: .dword 0 ip27c_freq_hub: .dword 0 ip27c_freq_rtc: .dword 0 ip27c_ecc_enable: .word 1 ip27c_fprom_cyc: .word 0 ip27c_mach_type: .word 0 ip27c_check_sum_adj: .word 0 ip27c_flash_count: .word 0 ip27c_fprom_wr: .word 0 ip27c_pvers_vers: .word 0 ip27c_pvers_rev: .word 0 ip27c_config_type: .word 0 /* To recognize special configs */ #endif /* _LANGUAGE_ASSEMBLY */ /* * R10000 Configuration Cycle - These define the SYSAD values used * during the reset cycle. */ #define IP27C_R10000_KSEG0CA_SHFT 0 #define IP27C_R10000_KSEG0CA_MASK (7 << IP27C_R10000_KSEG0CA_SHFT) #define IP27C_R10000_KSEG0CA(_B) ((_B) << IP27C_R10000_KSEG0CA_SHFT) #define IP27C_R10000_DEVNUM_SHFT 3 #define IP27C_R10000_DEVNUM_MASK (3 << IP27C_R10000_DEVNUM_SHFT) #define IP27C_R10000_DEVNUM(_B) ((_B) << IP27C_R10000_DEVNUM_SHFT) #define IP27C_R10000_CRPT_SHFT 5 #define IP27C_R10000_CRPT_MASK (1 << IP27C_R10000_CRPT_SHFT) #define IP27C_R10000_CPRT(_B) ((_B)<