···248248 * for _x.249249 */250250251251-#ifdef _STANDALONE252252-253253-/* DO NOT USE THESE DIRECTLY IN THE KERNEL. SEE BELOW. */254254-#define LOCAL_HUB(_x) (HUBREG_CAST (IALIAS_BASE + (_x)))255255-#define REMOTE_HUB(_n, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \256256- 0x800000 + (_x)))257257-#endif /* _STANDALONE */258258-259251/*260252 * WARNING:261253 * When certain Hub chip workaround are defined, it's not sufficient···313321#define ARCS_SPB_ADDR(nasid) \314322 PHYS_TO_K0(NODE_OFFSET(nasid) | ARCS_SPB_OFFSET)315323#define ARCS_SPB_SIZE 0x0400316316-317317-#ifdef _STANDALONE318318-319319-#define ARCS_TVECTOR_OFFSET 0x2800320320-#define ARCS_PVECTOR_OFFSET 0x2c00321321-322322-/*323323- * These addresses are used by the master CPU to install the transfer324324- * and private vectors. All others use the SPB to find them.325325- */326326-#define TVADDR (NODE_CAC_BASE(get_nasid()) + ARCS_TVECTOR_OFFSET)327327-#define PVADDR (NODE_CAC_BASE(get_nasid()) + ARCS_PVECTOR_OFFSET)328328-329329-#endif /* _STANDALONE */330324331325#define KLDIR_OFFSET 0x2000332326#define KLDIR_ADDR(nasid) \
+3-73
include/asm-mips/sn/sn0/addrs.h
···8585#define NASID_GET(_pa) (int) ((UINT64_CAST (_pa) >> \8686 NASID_SHFT) & NASID_BITMASK)87878888-#if !defined(__ASSEMBLY__) && !defined(_STANDALONE)8888+#if !defined(__ASSEMBLY__)89899090#define NODE_SWIN_BASE(nasid, widget) \9191 ((widget == 0) ? NODE_BWIN_BASE((nasid), SWIN0_BIGWIN) \9292 : RAW_NODE_SWIN_BASE(nasid, widget))9393-#else /* __ASSEMBLY__ || _STANDALONE */9393+#else /* __ASSEMBLY__ */9494#define NODE_SWIN_BASE(nasid, widget) \9595 (NODE_IO_BASE(nasid) + (UINT64_CAST (widget) << SWIN_SIZE_BITS))9696-#endif /* __ASSEMBLY__ || _STANDALONE */9696+#endif /* __ASSEMBLY__ */97979898/*9999 * The following definitions pertain to the IO special address···275275#endif /* !__ASSEMBLY__ */276276277277#define _ARCSPROM278278-279279-#ifdef _STANDALONE280280-281281-/*282282- * The PROM needs to pass the device base address and the283283- * device pci cfg space address to the device drivers during284284- * install. The COMPONENT->Key field is used for this purpose.285285- * Macros needed by SN0 device drivers to convert the286286- * COMPONENT->Key field to the respective base address.287287- * Key field looks as follows:288288- *289289- * +----------------------------------------------------+290290- * |devnasid | widget |pciid |hubwidid|hstnasid | adap |291291- * | 2 | 1 | 1 | 1 | 2 | 1 |292292- * +----------------------------------------------------+293293- * | | | | | | |294294- * 64 48 40 32 24 8 0295295- *296296- * These are used by standalone drivers till the io infrastructure297297- * is in place.298298- */299299-300300-#ifndef __ASSEMBLY__301301-302302-#define uchar unsigned char303303-304304-#define KEY_DEVNASID_SHFT 48305305-#define KEY_WIDID_SHFT 40306306-#define KEY_PCIID_SHFT 32307307-#define KEY_HUBWID_SHFT 24308308-#define KEY_HSTNASID_SHFT 8309309-310310-#define MK_SN0_KEY(nasid, widid, pciid) \311311- ((((__psunsigned_t)nasid)<< KEY_DEVNASID_SHFT |\312312- ((__psunsigned_t)widid) << KEY_WIDID_SHFT) |\313313- ((__psunsigned_t)pciid) << KEY_PCIID_SHFT)314314-315315-#define ADD_HUBWID_KEY(key,hubwid)\316316- (key|=((__psunsigned_t)hubwid << KEY_HUBWID_SHFT))317317-318318-#define ADD_HSTNASID_KEY(key,hstnasid)\319319- (key|=((__psunsigned_t)hstnasid << KEY_HSTNASID_SHFT))320320-321321-#define GET_DEVNASID_FROM_KEY(key) ((short)(key >> KEY_DEVNASID_SHFT))322322-#define GET_WIDID_FROM_KEY(key) ((uchar)(key >> KEY_WIDID_SHFT))323323-#define GET_PCIID_FROM_KEY(key) ((uchar)(key >> KEY_PCIID_SHFT))324324-#define GET_HUBWID_FROM_KEY(key) ((uchar)(key >> KEY_HUBWID_SHFT))325325-#define GET_HSTNASID_FROM_KEY(key) ((short)(key >> KEY_HSTNASID_SHFT))326326-327327-#define PCI_64_TARGID_SHFT 60328328-329329-#define GET_PCIBASE_FROM_KEY(key) (NODE_SWIN_BASE(GET_DEVNASID_FROM_KEY(key),\330330- GET_WIDID_FROM_KEY(key))\331331- | BRIDGE_DEVIO(GET_PCIID_FROM_KEY(key)))332332-333333-#define GET_PCICFGBASE_FROM_KEY(key) \334334- (NODE_SWIN_BASE(GET_DEVNASID_FROM_KEY(key),\335335- GET_WIDID_FROM_KEY(key))\336336- | BRIDGE_TYPE0_CFG_DEV(GET_PCIID_FROM_KEY(key)))337337-338338-#define GET_WIDBASE_FROM_KEY(key) \339339- (NODE_SWIN_BASE(GET_DEVNASID_FROM_KEY(key),\340340- GET_WIDID_FROM_KEY(key)))341341-342342-#define PUT_INSTALL_STATUS(c,s) c->Revision = s343343-#define GET_INSTALL_STATUS(c) c->Revision344344-345345-#endif /* !__ASSEMBLY__ */346346-347347-#endif /* _STANDALONE */348278349279#if defined (HUB_ERR_STS_WAR)350280