···4949#include <asm/sn/clksupport.h>5050#include <asm/sn/sn_sal.h>5151#include <asm/sn/geo.h>5252+#include <asm/sn/sn_feature_sets.h>5253#include "xtalk/xwidgetdev.h"5354#include "xtalk/hubdev.h"5455#include <asm/sn/klconfig.h>···9897int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */999810099short physical_node_map[MAX_PHYSNODE_ID];100100+static unsigned long sn_prom_features[MAX_PROM_FEATURE_SETS];101101102102EXPORT_SYMBOL(physical_node_map);103103···273271 u32 version = sn_sal_rev();274272 extern void sn_cpu_init(void);275273276276- ia64_sn_plat_set_error_handling_features();274274+ ia64_sn_plat_set_error_handling_features(); // obsolete275275+ ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV);276276+ ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES);277277+277278278279#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)279280 /*···318313 }319314320315 printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF);321321-322322- /*323323- * Confirm the SAL we're running on is recent enough...324324- */325325- if (version < SN_SAL_MIN_VERSION) {326326- printk(KERN_ERR "This kernel needs SGI SAL version >= "327327- "%x.%02x\n", SN_SAL_MIN_VERSION >> 8,328328- SN_SAL_MIN_VERSION & 0x00FF);329329- panic("PROM version too old\n");330330- }331316332317 master_nasid = boot_get_nasid();333318···474479 */475480 if (nodepdaindr[0] == NULL)476481 return;482482+483483+ for (i = 0; i < MAX_PROM_FEATURE_SETS; i++)484484+ if (ia64_sn_get_prom_feature_set(i, &sn_prom_features[i]) != 0)485485+ break;477486478487 cpuid = smp_processor_id();479488 cpuphyid = get_sapicid();···650651651652 return -1;652653}654654+655655+int sn_prom_feature_available(int id)656656+{657657+ if (id >= BITS_PER_LONG * MAX_PROM_FEATURE_SETS)658658+ return 0;659659+ return test_bit(id, sn_prom_features);660660+}661661+EXPORT_SYMBOL(sn_prom_feature_available);662662+
+57
include/asm-ia64/sn/sn_feature_sets.h
···11+#ifndef _ASM_IA64_SN_FEATURE_SETS_H22+#define _ASM_IA64_SN_FEATURE_SETS_H33+44+/*55+ * SN PROM Features66+ *77+ * This file is subject to the terms and conditions of the GNU General Public88+ * License. See the file "COPYING" in the main directory of this archive99+ * for more details.1010+ *1111+ * Copyright (c) 2005 Silicon Graphics, Inc. All rights reserved.1212+ */1313+1414+1515+#include <asm/types.h>1616+#include <asm/bitops.h>1717+1818+/* --------------------- PROM Features -----------------------------*/1919+extern int sn_prom_feature_available(int id);2020+2121+#define MAX_PROM_FEATURE_SETS 22222+2323+/*2424+ * The following defines features that may or may not be supported by the2525+ * current PROM. The OS uses sn_prom_feature_available(feature) to test for2626+ * the presence of a PROM feature. Down rev (old) PROMs will always test2727+ * "false" for new features.2828+ *2929+ * Use:3030+ * if (sn_prom_feature_available(PRF_FEATURE_XXX))3131+ * ...3232+ */3333+3434+/*3535+ * Example: feature XXX3636+ */3737+#define PRF_FEATURE_XXX 03838+3939+4040+4141+/* --------------------- OS Features -------------------------------*/4242+4343+/*4444+ * The following defines OS features that are optionally present in4545+ * the operating system.4646+ * During boot, PROM is notified of these features via a series of calls:4747+ *4848+ * ia64_sn_set_os_feature(feature1);4949+ *5050+ * Once enabled, a feature cannot be disabled.5151+ *5252+ * By default, features are disabled unless explicitly enabled.5353+ */5454+#define OSF_MCA_SLV_TO_OS_INIT_SLV 05555+#define OSF_FEAT_LOG_SBES 15656+5757+#endif /* _ASM_IA64_SN_FEATURE_SETS_H */