diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-04-15 20:32:51 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-04-15 20:32:51 +0000 |
commit | 47c61ca92ad419eb576491683a267b3ee8bbd3fc (patch) | |
tree | 935fb39c7b137f6af0e342cdb631e68315a8da4e /sys/arch/sgi | |
parent | 15e3b25a33b1be4381bc79cabdef947bb3839be2 (diff) |
Match the interleaving scheme used on dual-PIMM capable IP35 systems (i.e.
every ip35 but Fuel), when fetching spdmem records, so the DIMM number
reported matches the numbering on the PIMM.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/sgi/l1.c | 14 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/l1.h | 10 |
2 files changed, 16 insertions, 8 deletions
diff --git a/sys/arch/sgi/sgi/l1.c b/sys/arch/sgi/sgi/l1.c index dd7bea7187b..06ec4321054 100644 --- a/sys/arch/sgi/sgi/l1.c +++ b/sys/arch/sgi/sgi/l1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: l1.c,v 1.4 2010/03/22 21:22:08 miod Exp $ */ +/* $OpenBSD: l1.c,v 1.5 2010/04/15 20:32:50 miod Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -524,8 +524,12 @@ l1_receive_response(int16_t nasid, u_char *pkt, size_t *pktlen) if (rc < 0) /* bad packet */ continue; - if (pkt[0] != (L1PKT_RESPONSE | L1CH_MISC)) + if (pkt[0] != (L1PKT_RESPONSE | L1CH_MISC)) { +#ifdef L1_DEBUG + printf("unexpected L1 packet: head %02x\n", pkt[0]); +#endif continue; /* it's not our response */ + } *pktlen = (size_t)rc; return 0; @@ -980,14 +984,14 @@ l1_get_brick_spd_record(int16_t nasid, int dimm, u_char **rspd, size_t *rspdlen) * The L1 address of SPD records differs between Fuel and Origin 350 * systems. This is likely because the Fuel is a single-PIMM system, * while all other IP35 are dual-PIMM, and thus carry one more PIMM - * record at a lower address. + * record at a lower address (and are interleaving DIMM accesses). * Since Fuel is also a single-node system, we can safely check for * the system subtype to decide which address to use. */ if (sys_config.system_subtype == IP35_FUEL) - address = L1_EEP_DIMMBASE_SINGLEPIMM + dimm; + address = L1_EEP_DIMM_NOINTERLEAVE(dimm); else - address = L1_EEP_DIMMBASE_DUALPIMM + dimm; + address = L1_EEP_DIMM_INTERLEAVE(dimm); /* * Build a first packet, asking for 0 bytes to be read. diff --git a/sys/arch/sgi/sgi/l1.h b/sys/arch/sgi/sgi/l1.h index 8ba17b9509e..542052f14db 100644 --- a/sys/arch/sgi/sgi/l1.h +++ b/sys/arch/sgi/sgi/l1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: l1.h,v 1.3 2010/03/22 21:22:08 miod Exp $ */ +/* $OpenBSD: l1.h,v 1.4 2010/04/15 20:32:50 miod Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -72,8 +72,12 @@ #define L1_EEP_POWER 0x00 /* power board */ #define L1_EEP_LOGIC 0x01 /* logic board */ /* C-brick component */ -#define L1_EEP_DIMMBASE_SINGLEPIMM 0x04 -#define L1_EEP_DIMMBASE_DUALPIMM 0x05 +#define L1_EEP_DIMM_NOINTERLEAVE_BASE 0x04 +#define L1_EEP_DIMM_INTERLEAVE_BASE 0x05 +#define L1_EEP_DIMM_NOINTERLEAVE(d) \ + (L1_EEP_DIMM_NOINTERLEAVE_BASE + (d)) +#define L1_EEP_DIMM_INTERLEAVE(d) \ + (L1_EEP_DIMM_INTERLEAVE_BASE + ((d) >> 1) + ((d) & 0x01 ? 4 : 0)) /* ia code */ #define L1_EEP_CHASSIS 0x01 /* chassis ia */ #define L1_EEP_BOARD 0x02 /* board ia */ |