xlp.h (233563) | xlp.h (238290) |
---|---|
1/*- 2 * Copyright 2003-2011 Netlogic Microsystems (Netlogic). All rights 3 * reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: 8 * --- 12 unchanged lines hidden (view full) --- 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26 * THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * NETLOGIC_BSD | 1/*- 2 * Copyright 2003-2011 Netlogic Microsystems (Netlogic). All rights 3 * reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: 8 * --- 12 unchanged lines hidden (view full) --- 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26 * THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * NETLOGIC_BSD |
29 * $FreeBSD: head/sys/mips/nlm/xlp.h 233563 2012-03-27 15:39:55Z jchandra $ | 29 * $FreeBSD: head/sys/mips/nlm/xlp.h 238290 2012-07-09 10:24:45Z jchandra $ |
30 */ 31 32#ifndef __NLM_XLP_H__ 33#define __NLM_XLP_H__ 34#include <mips/nlm/hal/mips-extns.h> 35#include <mips/nlm/hal/iomap.h> 36 37#define PIC_UART_0_IRQ 9 --- 14 unchanged lines hidden (view full) --- 52#define CHIP_PROCESSOR_ID_XLP_416 0x94 53#define CHIP_PROCESSOR_ID_XLP_432 0x14 54 55/* Revision id's */ 56#define XLP_REVISION_A0 0x00 57#define XLP_REVISION_A1 0x01 58#define XLP_REVISION_A2 0x02 59#define XLP_REVISION_B0 0x03 | 30 */ 31 32#ifndef __NLM_XLP_H__ 33#define __NLM_XLP_H__ 34#include <mips/nlm/hal/mips-extns.h> 35#include <mips/nlm/hal/iomap.h> 36 37#define PIC_UART_0_IRQ 9 --- 14 unchanged lines hidden (view full) --- 52#define CHIP_PROCESSOR_ID_XLP_416 0x94 53#define CHIP_PROCESSOR_ID_XLP_432 0x14 54 55/* Revision id's */ 56#define XLP_REVISION_A0 0x00 57#define XLP_REVISION_A1 0x01 58#define XLP_REVISION_A2 0x02 59#define XLP_REVISION_B0 0x03 |
60#define XLP_REVISION_B1 0x04 |
|
60 61#ifndef LOCORE 62/* 63 * FreeBSD can be started with few threads and cores turned off, 64 * so have a hardware thread id to FreeBSD cpuid mapping. 65 */ 66extern int xlp_ncores; 67extern int xlp_threads_per_core; --- 14 unchanged lines hidden (view full) --- 82} 83 84static __inline int nlm_is_xlp3xx(void) 85{ 86 87 return (nlm_processor_id() == CHIP_PROCESSOR_ID_XLP_3XX); 88} 89 | 61 62#ifndef LOCORE 63/* 64 * FreeBSD can be started with few threads and cores turned off, 65 * so have a hardware thread id to FreeBSD cpuid mapping. 66 */ 67extern int xlp_ncores; 68extern int xlp_threads_per_core; --- 14 unchanged lines hidden (view full) --- 83} 84 85static __inline int nlm_is_xlp3xx(void) 86{ 87 88 return (nlm_processor_id() == CHIP_PROCESSOR_ID_XLP_3XX); 89} 90 |
91static __inline int nlm_is_xlp3xx_ax(void) 92{ 93 uint32_t procid = mips_rd_prid(); 94 int prid = (procid >> 8) & 0xff; 95 int rev = procid & 0xff; 96 97 return (prid == CHIP_PROCESSOR_ID_XLP_3XX && 98 rev < XLP_REVISION_B0); 99} 100 |
|
90static __inline int nlm_is_xlp4xx(void) 91{ 92 int prid = nlm_processor_id(); 93 94 return (prid == CHIP_PROCESSOR_ID_XLP_432 || 95 prid == CHIP_PROCESSOR_ID_XLP_416); 96} 97 --- 13 unchanged lines hidden (view full) --- 111 int rev = procid & 0xff; 112 113 return ((prid == CHIP_PROCESSOR_ID_XLP_8XX || 114 prid == CHIP_PROCESSOR_ID_XLP_432 || 115 prid == CHIP_PROCESSOR_ID_XLP_416) && 116 (rev < XLP_REVISION_B0)); 117} 118 | 101static __inline int nlm_is_xlp4xx(void) 102{ 103 int prid = nlm_processor_id(); 104 105 return (prid == CHIP_PROCESSOR_ID_XLP_432 || 106 prid == CHIP_PROCESSOR_ID_XLP_416); 107} 108 --- 13 unchanged lines hidden (view full) --- 122 int rev = procid & 0xff; 123 124 return ((prid == CHIP_PROCESSOR_ID_XLP_8XX || 125 prid == CHIP_PROCESSOR_ID_XLP_432 || 126 prid == CHIP_PROCESSOR_ID_XLP_416) && 127 (rev < XLP_REVISION_B0)); 128} 129 |
130static __inline int nlm_is_xlp8xx_b0(void) 131{ 132 uint32_t procid = mips_rd_prid(); 133 int prid = (procid >> 8) & 0xff; 134 int rev = procid & 0xff; 135 136 return ((prid == CHIP_PROCESSOR_ID_XLP_8XX || 137 prid == CHIP_PROCESSOR_ID_XLP_432 || 138 prid == CHIP_PROCESSOR_ID_XLP_416) && 139 rev == XLP_REVISION_B0); 140} 141 |
|
119#endif /* LOCORE */ 120#endif /* __NLM_XLP_H__ */ | 142#endif /* LOCORE */ 143#endif /* __NLM_XLP_H__ */ |