Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc.
0007  * Copyright (C) 1999 by Ralf Baechle
0008  */
0009 #ifndef _ASM_SN_SN0_HUB_H
0010 #define _ASM_SN_SN0_HUB_H
0011 
0012 /* The secret password; used to release protection */
0013 #define HUB_PASSWORD        0x53474972756c6573ull
0014 
0015 #define CHIPID_HUB      0
0016 #define CHIPID_ROUTER       1
0017 
0018 #define HUB_REV_1_0     1
0019 #define HUB_REV_2_0     2
0020 #define HUB_REV_2_1     3
0021 #define HUB_REV_2_2     4
0022 #define HUB_REV_2_3     5
0023 #define HUB_REV_2_4     6
0024 
0025 #define MAX_HUB_PATH        80
0026 
0027 #include <asm/sn/sn0/addrs.h>
0028 #include <asm/sn/sn0/hubpi.h>
0029 #include <asm/sn/sn0/hubmd.h>
0030 #include <asm/sn/sn0/hubio.h>
0031 #include <asm/sn/sn0/hubni.h>
0032 //#include <asm/sn/sn0/hubcore.h>
0033 
0034 /* Translation of uncached attributes */
0035 #define UATTR_HSPEC 0
0036 #define UATTR_IO    1
0037 #define UATTR_MSPEC 2
0038 #define UATTR_UNCAC 3
0039 
0040 #ifdef __ASSEMBLY__
0041 /*
0042  * Returns the local nasid into res.
0043  */
0044     .macro GET_NASID_ASM res
0045     dli \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID)
0046     ld  \res, (\res)
0047     and \res, NSRI_NODEID_MASK
0048     dsrl    \res, NSRI_NODEID_SHFT
0049     .endm
0050 #else
0051 
0052 /*
0053  * get_nasid() returns the physical node id number of the caller.
0054  */
0055 static inline nasid_t get_nasid(void)
0056 {
0057     return (nasid_t)((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_NODEID_MASK)
0058              >> NSRI_NODEID_SHFT);
0059 }
0060 #endif
0061 
0062 #endif /* _ASM_SN_SN0_HUB_H */