aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2005-11-18 17:11:27 -0500
committerTony Luck <tony.luck@intel.com>2005-11-21 17:17:28 -0500
commit771388dc7d1efe26a40242bd509e87ade2c971d1 (patch)
tree210c724a31f993bc0f5f77f10b4c871b17285386 /include/asm-ia64
parent090de0b77ceed1f1d05883fa744760f0c65d9c31 (diff)
[IA64-SGI] support for older versions of PROM
Add support for old versions of the SN PROMs. Eventually this support will be deleted but it is useful right now to continue supporting older PROMs. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/sn/sn_sal.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h
index 3f7564dc0aa9..2a8b0d92a5d6 100644
--- a/include/asm-ia64/sn/sn_sal.h
+++ b/include/asm-ia64/sn/sn_sal.h
@@ -56,6 +56,7 @@
56#define SN_SAL_BUS_CONFIG 0x02000037 56#define SN_SAL_BUS_CONFIG 0x02000037
57#define SN_SAL_SYS_SERIAL_GET 0x02000038 57#define SN_SAL_SYS_SERIAL_GET 0x02000038
58#define SN_SAL_PARTITION_SERIAL_GET 0x02000039 58#define SN_SAL_PARTITION_SERIAL_GET 0x02000039
59#define SN_SAL_SYSCTL_PARTITION_GET 0x0200003a
59#define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b 60#define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b
60#define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c 61#define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c
61#define SN_SAL_COHERENCE 0x0200003d 62#define SN_SAL_COHERENCE 0x0200003d
@@ -581,6 +582,21 @@ sn_partition_serial_number_val(void) {
581} 582}
582 583
583/* 584/*
585 * Returns the partition id of the nasid passed in as an argument,
586 * or INVALID_PARTID if the partition id cannot be retrieved.
587 */
588static inline partid_t
589ia64_sn_sysctl_partition_get(nasid_t nasid)
590{
591 struct ia64_sal_retval ret_stuff;
592 SAL_CALL(ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid,
593 0, 0, 0, 0, 0, 0);
594 if (ret_stuff.status != 0)
595 return -1;
596 return ((partid_t)ret_stuff.v0);
597}
598
599/*
584 * Returns the physical address of the partition's reserved page through 600 * Returns the physical address of the partition's reserved page through
585 * an iterative number of calls. 601 * an iterative number of calls.
586 * 602 *
@@ -1018,6 +1034,24 @@ ia64_sn_get_sn_info(int fc, u8 *shubtype, u16 *nasid_bitmask, u8 *nasid_shift,
1018 ret_stuff.v2 = 0; 1034 ret_stuff.v2 = 0;
1019 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0); 1035 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0);
1020 1036
1037/***** BEGIN HACK - temp til old proms no longer supported ********/
1038 if (ret_stuff.status == SALRET_NOT_IMPLEMENTED) {
1039 int nasid = get_sapicid() & 0xfff;;
1040#define SH_SHUB_ID_NODES_PER_BIT_MASK 0x001f000000000000UL
1041#define SH_SHUB_ID_NODES_PER_BIT_SHFT 48
1042 if (shubtype) *shubtype = 0;
1043 if (nasid_bitmask) *nasid_bitmask = 0x7ff;
1044 if (nasid_shift) *nasid_shift = 38;
1045 if (systemsize) *systemsize = 10;
1046 if (sharing_domain_size) *sharing_domain_size = 8;
1047 if (partid) *partid = ia64_sn_sysctl_partition_get(nasid);
1048 if (coher) *coher = nasid >> 9;
1049 if (reg) *reg = (HUB_L((u64 *) LOCAL_MMR_ADDR(SH1_SHUB_ID)) & SH_SHUB_ID_NODES_PER_BIT_MASK) >>
1050 SH_SHUB_ID_NODES_PER_BIT_SHFT;
1051 return 0;
1052 }
1053/***** END HACK *******/
1054
1021 if (ret_stuff.status < 0) 1055 if (ret_stuff.status < 0)
1022 return ret_stuff.status; 1056 return ret_stuff.status;
1023 1057