-/* this is a fake FIT that's used on the medusa simulator which
- * doesn't usually run a complete PROM.
- */
-#ifdef CONFIG_IA64_SGI_SN_SIM
-static unsigned long fakefit[] = {
- /* this is all we need to satisfy the code below */
- FIT_SIGNATURE,
- FIT_ENTRY(FIT_ENTRY_FIT_HEADER, 0x02, 0x60, 2),
- /* dump something arbitrary for
- * /proc/sgi_prominfo/nodeX/version */
- 0xbadbeef00fa3ef17ul,
- FIT_ENTRY(FIT_ENTRY_SAL_A, 0, 0x99, 0x100)
-};
-#endif
-
-static unsigned long *
-lookup_fit(int nasid)
-{
- unsigned long *fitp;
- unsigned long fit_paddr;
- unsigned long *fit_vaddr;
-
-#ifdef CONFIG_IA64_SGI_SN_SIM
- if (IS_RUNNING_ON_SIMULATOR())
- return fakefit;
-#endif
-
- fitp = (void *)GLOBAL_MMR_ADDR(nasid, LB_PROM_SPACE - 32);
- DPRINTK("pointer to fit at %p\n", (void *)fitp);
- fit_paddr = readq(fitp);
- DPRINTK("fit pointer contains %lx\n", fit_paddr);
- /* snag just the node-relative offset */
- fit_paddr &= ~0ul >> (63-35);
- /* the pointer to the FIT is relative to IA-64 compatibility
- * space. However, the PROM is mapped at a different offset
- * in MMR space (both local and global)
- */
- fit_paddr += 0x700000000;
- fit_vaddr = (void *)GLOBAL_MMR_ADDR(nasid, fit_paddr);
- DPRINTK("fit at %p\n", (void *)fit_vaddr);
- return fit_vaddr;
-}
-