Pull up following revision(s) (requested by mhitch in ticket #1010): sys/arch/alpha/alpha/dec_1000a.c: revision 1.29 sys/arch/alpha/alpha/dec_2100_a500.c: revision 1.19 sys/arch/alpha/alpha/dec_6600.c: revision 1.29 sys/arch/alpha/alpha/dec_kn300.c: revision 1.37 Add support for booting off a couple of common RAID adapters found on several models of alpha systems: mlx [Mylex DAC060] and iop [I2O]. Addresses PR #25829.diff -r1.26 -r1.26.10.1 src/sys/arch/alpha/alpha/dec_1000a.c
(snj)
--- src/sys/arch/alpha/alpha/dec_1000a.c 2008/04/28 20:23:10 1.26
+++ src/sys/arch/alpha/alpha/dec_1000a.c 2009/09/26 18:41:42 1.26.10.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: dec_1000a.c,v 1.26 2008/04/28 20:23:10 martin Exp $ */ | 1 | /* $NetBSD: dec_1000a.c,v 1.26.10.1 2009/09/26 18:41:42 snj Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is based on dec_kn20aa.c, written by Chris G. Demetriou at | 7 | * This code is based on dec_kn20aa.c, written by Chris G. Demetriou at | |
8 | * Carnegie-Mellon University. Platform support for Noritake, Pintake, and | 8 | * Carnegie-Mellon University. Platform support for Noritake, Pintake, and | |
9 | * Corelle by Ross Harvey with copyright assignment by permission of Avalon | 9 | * Corelle by Ross Harvey with copyright assignment by permission of Avalon | |
10 | * Computer Systems, Inc. | 10 | * Computer Systems, Inc. | |
11 | * | 11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | 14 | * are met: | |
@@ -55,27 +55,27 @@ | @@ -55,27 +55,27 @@ | |||
55 | * Pittsburgh PA 15213-3890 | 55 | * Pittsburgh PA 15213-3890 | |
56 | * | 56 | * | |
57 | * any improvements or extensions that they make and grant Carnegie the | 57 | * any improvements or extensions that they make and grant Carnegie the | |
58 | * rights to redistribute these changes. | 58 | * rights to redistribute these changes. | |
59 | */ | 59 | */ | |
60 | /* | 60 | /* | |
61 | * Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center | 61 | * Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center | |
62 | */ | 62 | */ | |
63 | 63 | |||
64 | #include "opt_kgdb.h" | 64 | #include "opt_kgdb.h" | |
65 | 65 | |||
66 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 66 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
67 | 67 | |||
68 | __KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.26 2008/04/28 20:23:10 martin Exp $"); | 68 | __KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.26.10.1 2009/09/26 18:41:42 snj Exp $"); | |
69 | 69 | |||
70 | #include <sys/param.h> | 70 | #include <sys/param.h> | |
71 | #include <sys/systm.h> | 71 | #include <sys/systm.h> | |
72 | #include <sys/device.h> | 72 | #include <sys/device.h> | |
73 | #include <sys/termios.h> | 73 | #include <sys/termios.h> | |
74 | #include <sys/conf.h> | 74 | #include <sys/conf.h> | |
75 | #include <dev/cons.h> | 75 | #include <dev/cons.h> | |
76 | 76 | |||
77 | #include <machine/rpb.h> | 77 | #include <machine/rpb.h> | |
78 | #include <machine/autoconf.h> | 78 | #include <machine/autoconf.h> | |
79 | #include <machine/cpuconf.h> | 79 | #include <machine/cpuconf.h> | |
80 | #include <machine/bus.h> | 80 | #include <machine/bus.h> | |
81 | 81 | |||
@@ -88,26 +88,29 @@ __KERNEL_RCSID(0, "$NetBSD: dec_1000a.c, | @@ -88,26 +88,29 @@ __KERNEL_RCSID(0, "$NetBSD: dec_1000a.c, | |||
88 | #include <dev/ic/pckbcvar.h> | 88 | #include <dev/ic/pckbcvar.h> | |
89 | #include <dev/pci/pcireg.h> | 89 | #include <dev/pci/pcireg.h> | |
90 | #include <dev/pci/pcivar.h> | 90 | #include <dev/pci/pcivar.h> | |
91 | 91 | |||
92 | #include <alpha/pci/apecsreg.h> | 92 | #include <alpha/pci/apecsreg.h> | |
93 | #include <alpha/pci/apecsvar.h> | 93 | #include <alpha/pci/apecsvar.h> | |
94 | #include <alpha/pci/ciareg.h> | 94 | #include <alpha/pci/ciareg.h> | |
95 | #include <alpha/pci/ciavar.h> | 95 | #include <alpha/pci/ciavar.h> | |
96 | 96 | |||
97 | #include <dev/scsipi/scsi_all.h> | 97 | #include <dev/scsipi/scsi_all.h> | |
98 | #include <dev/scsipi/scsipi_all.h> | 98 | #include <dev/scsipi/scsipi_all.h> | |
99 | #include <dev/scsipi/scsiconf.h> | 99 | #include <dev/scsipi/scsiconf.h> | |
100 | 100 | |||
101 | #include <dev/ic/mlxio.h> | |||
102 | #include <dev/ic/mlxvar.h> | |||
103 | ||||
101 | #include "pckbd.h" | 104 | #include "pckbd.h" | |
102 | 105 | |||
103 | #ifndef CONSPEED | 106 | #ifndef CONSPEED | |
104 | #define CONSPEED TTYDEF_SPEED | 107 | #define CONSPEED TTYDEF_SPEED | |
105 | #endif | 108 | #endif | |
106 | static int comcnrate = CONSPEED; | 109 | static int comcnrate = CONSPEED; | |
107 | 110 | |||
108 | void _dec_1000a_init __P((void)); | 111 | void _dec_1000a_init __P((void)); | |
109 | static void dec_1000a_cons_init __P((void)); | 112 | static void dec_1000a_cons_init __P((void)); | |
110 | static void dec_1000a_device_register __P((struct device *, void *)); | 113 | static void dec_1000a_device_register __P((struct device *, void *)); | |
111 | 114 | |||
112 | #ifdef KGDB | 115 | #ifdef KGDB | |
113 | #include <machine/db_machdep.h> | 116 | #include <machine/db_machdep.h> | |
@@ -247,27 +250,28 @@ static void | @@ -247,27 +250,28 @@ static void | |||
247 | dec_1000a_device_register(dev, aux) | 250 | dec_1000a_device_register(dev, aux) | |
248 | struct device *dev; | 251 | struct device *dev; | |
249 | void *aux; | 252 | void *aux; | |
250 | { | 253 | { | |
251 | static int found, initted, diskboot, netboot; | 254 | static int found, initted, diskboot, netboot; | |
252 | static struct device *pcidev, *ctrlrdev; | 255 | static struct device *pcidev, *ctrlrdev; | |
253 | struct bootdev_data *b = bootdev_data; | 256 | struct bootdev_data *b = bootdev_data; | |
254 | struct device *parent = device_parent(dev); | 257 | struct device *parent = device_parent(dev); | |
255 | 258 | |||
256 | if (found) | 259 | if (found) | |
257 | return; | 260 | return; | |
258 | 261 | |||
259 | if (!initted) { | 262 | if (!initted) { | |
260 | diskboot = (strcasecmp(b->protocol, "SCSI") == 0); | 263 | diskboot = (strcasecmp(b->protocol, "SCSI") == 0) || | |
264 | (strcasecmp(b->protocol, "RAID") == 0); | |||
261 | netboot = (strcasecmp(b->protocol, "BOOTP") == 0) || | 265 | netboot = (strcasecmp(b->protocol, "BOOTP") == 0) || | |
262 | (strcasecmp(b->protocol, "MOP") == 0); | 266 | (strcasecmp(b->protocol, "MOP") == 0); | |
263 | #if 0 | 267 | #if 0 | |
264 | printf("diskboot = %d, netboot = %d\n", diskboot, netboot); | 268 | printf("diskboot = %d, netboot = %d\n", diskboot, netboot); | |
265 | #endif | 269 | #endif | |
266 | initted =1; | 270 | initted =1; | |
267 | } | 271 | } | |
268 | 272 | |||
269 | if (pcidev == NULL) { | 273 | if (pcidev == NULL) { | |
270 | if (!device_is_a(dev, "pci")) | 274 | if (!device_is_a(dev, "pci")) | |
271 | return; | 275 | return; | |
272 | else { | 276 | else { | |
273 | struct pcibus_attach_args *pba = aux; | 277 | struct pcibus_attach_args *pba = aux; | |
@@ -327,14 +331,35 @@ dec_1000a_device_register(dev, aux) | @@ -327,14 +331,35 @@ dec_1000a_device_register(dev, aux) | |||
327 | unit = periph->periph_target * 100 + periph->periph_lun; | 331 | unit = periph->periph_target * 100 + periph->periph_lun; | |
328 | if (b->unit != unit) | 332 | if (b->unit != unit) | |
329 | return; | 333 | return; | |
330 | if (b->channel != periph->periph_channel->chan_channel) | 334 | if (b->channel != periph->periph_channel->chan_channel) | |
331 | return; | 335 | return; | |
332 | 336 | |||
333 | /* we've found it! */ | 337 | /* we've found it! */ | |
334 | booted_device = dev; | 338 | booted_device = dev; | |
335 | #if 0 | 339 | #if 0 | |
336 | printf("\nbooted_device = %s\n", dev->dv_xname); | 340 | printf("\nbooted_device = %s\n", dev->dv_xname); | |
337 | #endif | 341 | #endif | |
338 | found = 1; | 342 | found = 1; | |
339 | } | 343 | } | |
344 | ||||
345 | if (device_is_a(dev, "ld") && device_is_a(parent, "mlx")) { | |||
346 | /* | |||
347 | * Argh! The attach arguments for ld devices is not | |||
348 | * consistent, so each supported raid controller requires | |||
349 | * different checks. | |||
350 | */ | |||
351 | struct mlx_attach_args *mlxa = aux; | |||
352 | ||||
353 | if (parent != ctrlrdev) | |||
354 | return; | |||
355 | ||||
356 | if (b->unit != mlxa->mlxa_unit) | |||
357 | return; | |||
358 | /* we've found it! */ | |||
359 | booted_device = dev; | |||
360 | #if 0 | |||
361 | printf("\nbooted_device = %s\n", dev->dv_xname); | |||
362 | #endif | |||
363 | found = 1; | |||
364 | } | |||
340 | } | 365 | } |
--- src/sys/arch/alpha/alpha/dec_2100_a500.c 2008/04/28 20:23:10 1.18
+++ src/sys/arch/alpha/alpha/dec_2100_a500.c 2009/09/26 18:41:42 1.18.10.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: dec_2100_a500.c,v 1.18 2008/04/28 20:23:10 martin Exp $ */ | 1 | /* $NetBSD: dec_2100_a500.c,v 1.18.10.1 2009/09/26 18:41:42 snj Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1999 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1999 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -50,27 +50,27 @@ | @@ -50,27 +50,27 @@ | |||
50 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | 50 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
51 | * School of Computer Science | 51 | * School of Computer Science | |
52 | * Carnegie Mellon University | 52 | * Carnegie Mellon University | |
53 | * Pittsburgh PA 15213-3890 | 53 | * Pittsburgh PA 15213-3890 | |
54 | * | 54 | * | |
55 | * any improvements or extensions that they make and grant Carnegie the | 55 | * any improvements or extensions that they make and grant Carnegie the | |
56 | * rights to redistribute these changes. | 56 | * rights to redistribute these changes. | |
57 | */ | 57 | */ | |
58 | 58 | |||
59 | #include "opt_kgdb.h" | 59 | #include "opt_kgdb.h" | |
60 | 60 | |||
61 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 61 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
62 | 62 | |||
63 | __KERNEL_RCSID(0, "$NetBSD: dec_2100_a500.c,v 1.18 2008/04/28 20:23:10 martin Exp $"); | 63 | __KERNEL_RCSID(0, "$NetBSD: dec_2100_a500.c,v 1.18.10.1 2009/09/26 18:41:42 snj Exp $"); | |
64 | 64 | |||
65 | #include <sys/param.h> | 65 | #include <sys/param.h> | |
66 | #include <sys/systm.h> | 66 | #include <sys/systm.h> | |
67 | #include <sys/device.h> | 67 | #include <sys/device.h> | |
68 | #include <sys/termios.h> | 68 | #include <sys/termios.h> | |
69 | #include <sys/conf.h> | 69 | #include <sys/conf.h> | |
70 | #include <dev/cons.h> | 70 | #include <dev/cons.h> | |
71 | 71 | |||
72 | #include <machine/rpb.h> | 72 | #include <machine/rpb.h> | |
73 | #include <machine/autoconf.h> | 73 | #include <machine/autoconf.h> | |
74 | #include <machine/cpuconf.h> | 74 | #include <machine/cpuconf.h> | |
75 | #include <machine/bus.h> | 75 | #include <machine/bus.h> | |
76 | #include <machine/alpha.h> | 76 | #include <machine/alpha.h> | |
@@ -82,26 +82,29 @@ __KERNEL_RCSID(0, "$NetBSD: dec_2100_a50 | @@ -82,26 +82,29 @@ __KERNEL_RCSID(0, "$NetBSD: dec_2100_a50 | |||
82 | #include <dev/isa/isavar.h> | 82 | #include <dev/isa/isavar.h> | |
83 | #include <dev/ic/i8042reg.h> | 83 | #include <dev/ic/i8042reg.h> | |
84 | #include <dev/ic/pckbcvar.h> | 84 | #include <dev/ic/pckbcvar.h> | |
85 | #include <dev/pci/pcireg.h> | 85 | #include <dev/pci/pcireg.h> | |
86 | #include <dev/pci/pcivar.h> | 86 | #include <dev/pci/pcivar.h> | |
87 | 87 | |||
88 | #include <alpha/pci/ttwogareg.h> | 88 | #include <alpha/pci/ttwogareg.h> | |
89 | #include <alpha/pci/ttwogavar.h> | 89 | #include <alpha/pci/ttwogavar.h> | |
90 | 90 | |||
91 | #include <dev/scsipi/scsi_all.h> | 91 | #include <dev/scsipi/scsi_all.h> | |
92 | #include <dev/scsipi/scsipi_all.h> | 92 | #include <dev/scsipi/scsipi_all.h> | |
93 | #include <dev/scsipi/scsiconf.h> | 93 | #include <dev/scsipi/scsiconf.h> | |
94 | 94 | |||
95 | #include <dev/ic/mlxio.h> | |||
96 | #include <dev/ic/mlxvar.h> | |||
97 | ||||
95 | #include "pckbd.h" | 98 | #include "pckbd.h" | |
96 | 99 | |||
97 | #ifndef CONSPEED | 100 | #ifndef CONSPEED | |
98 | #define CONSPEED TTYDEF_SPEED | 101 | #define CONSPEED TTYDEF_SPEED | |
99 | #endif | 102 | #endif | |
100 | static int comcnrate = CONSPEED; | 103 | static int comcnrate = CONSPEED; | |
101 | 104 | |||
102 | void _dec_2100_a500_init(void); | 105 | void _dec_2100_a500_init(void); | |
103 | static void dec_2100_a500_cons_init(void); | 106 | static void dec_2100_a500_cons_init(void); | |
104 | static void dec_2100_a500_device_register(struct device *, void *); | 107 | static void dec_2100_a500_device_register(struct device *, void *); | |
105 | static void dec_2100_a500_machine_check(unsigned long, struct trapframe *, | 108 | static void dec_2100_a500_machine_check(unsigned long, struct trapframe *, | |
106 | unsigned long, unsigned long); | 109 | unsigned long, unsigned long); | |
107 | 110 | |||
@@ -233,27 +236,28 @@ dec_2100_a500_cons_init(void) | @@ -233,27 +236,28 @@ dec_2100_a500_cons_init(void) | |||
233 | 236 | |||
234 | static void | 237 | static void | |
235 | dec_2100_a500_device_register(struct device *dev, void *aux) | 238 | dec_2100_a500_device_register(struct device *dev, void *aux) | |
236 | { | 239 | { | |
237 | static int found, initted, diskboot, netboot; | 240 | static int found, initted, diskboot, netboot; | |
238 | static struct device *pcidev, *ctrlrdev; | 241 | static struct device *pcidev, *ctrlrdev; | |
239 | struct bootdev_data *b = bootdev_data; | 242 | struct bootdev_data *b = bootdev_data; | |
240 | struct device *parent = device_parent(dev); | 243 | struct device *parent = device_parent(dev); | |
241 | 244 | |||
242 | if (found) | 245 | if (found) | |
243 | return; | 246 | return; | |
244 | 247 | |||
245 | if (!initted) { | 248 | if (!initted) { | |
246 | diskboot = (strcasecmp(b->protocol, "SCSI") == 0); | 249 | diskboot = (strcasecmp(b->protocol, "SCSI") == 0) || | |
250 | (strcasecmp(b->protocol, "RAID") == 0); | |||
247 | netboot = (strcasecmp(b->protocol, "BOOTP") == 0) || | 251 | netboot = (strcasecmp(b->protocol, "BOOTP") == 0) || | |
248 | (strcasecmp(b->protocol, "MOP") == 0); | 252 | (strcasecmp(b->protocol, "MOP") == 0); | |
249 | #if 0 | 253 | #if 0 | |
250 | printf("diskboot = %d, netboot = %d\n", diskboot, netboot); | 254 | printf("diskboot = %d, netboot = %d\n", diskboot, netboot); | |
251 | #endif | 255 | #endif | |
252 | initted =1; | 256 | initted =1; | |
253 | } | 257 | } | |
254 | 258 | |||
255 | if (pcidev == NULL) { | 259 | if (pcidev == NULL) { | |
256 | if (!device_is_a(dev, "pci")) | 260 | if (!device_is_a(dev, "pci")) | |
257 | return; | 261 | return; | |
258 | else { | 262 | else { | |
259 | struct pcibus_attach_args *pba = aux; | 263 | struct pcibus_attach_args *pba = aux; | |
@@ -313,26 +317,47 @@ dec_2100_a500_device_register(struct dev | @@ -313,26 +317,47 @@ dec_2100_a500_device_register(struct dev | |||
313 | unit = periph->periph_target * 100 + periph->periph_lun; | 317 | unit = periph->periph_target * 100 + periph->periph_lun; | |
314 | if (b->unit != unit) | 318 | if (b->unit != unit) | |
315 | return; | 319 | return; | |
316 | if (b->channel != periph->periph_channel->chan_channel) | 320 | if (b->channel != periph->periph_channel->chan_channel) | |
317 | return; | 321 | return; | |
318 | 322 | |||
319 | /* we've found it! */ | 323 | /* we've found it! */ | |
320 | booted_device = dev; | 324 | booted_device = dev; | |
321 | #if 0 | 325 | #if 0 | |
322 | printf("\nbooted_device = %s\n", dev->dv_xname); | 326 | printf("\nbooted_device = %s\n", dev->dv_xname); | |
323 | #endif | 327 | #endif | |
324 | found = 1; | 328 | found = 1; | |
325 | } | 329 | } | |
330 | ||||
331 | if (device_is_a(dev, "ld") && device_is_a(parent, "mlx")) { | |||
332 | /* | |||
333 | * Argh! The attach arguments for ld devices is not | |||
334 | * consistent, so each supported raid controller requires | |||
335 | * different checks. | |||
336 | */ | |||
337 | struct mlx_attach_args *mlxa = aux; | |||
338 | ||||
339 | if (parent != ctrlrdev) | |||
340 | return; | |||
341 | ||||
342 | if (b->unit != mlxa->mlxa_unit) | |||
343 | return; | |||
344 | /* we've found it! */ | |||
345 | booted_device = dev; | |||
346 | #if 0 | |||
347 | printf("\nbooted_device = %s\n", dev->dv_xname); | |||
348 | #endif | |||
349 | found = 1; | |||
350 | } | |||
326 | } | 351 | } | |
327 | 352 | |||
328 | /* | 353 | /* | |
329 | * Sable, Sable-Gamma, and Lynx machine check handlers. | 354 | * Sable, Sable-Gamma, and Lynx machine check handlers. | |
330 | */ | 355 | */ | |
331 | 356 | |||
332 | static void | 357 | static void | |
333 | dec_2100_a500_machine_check(unsigned long mces, struct trapframe *framep, | 358 | dec_2100_a500_machine_check(unsigned long mces, struct trapframe *framep, | |
334 | unsigned long vector, unsigned long param) | 359 | unsigned long vector, unsigned long param) | |
335 | { | 360 | { | |
336 | struct mchkinfo *mcp = &curcpu()->ci_mcinfo; | 361 | struct mchkinfo *mcp = &curcpu()->ci_mcinfo; | |
337 | 362 | |||
338 | /* | 363 | /* |
--- src/sys/arch/alpha/alpha/dec_6600.c 2007/03/04 15:18:10 1.26
+++ src/sys/arch/alpha/alpha/dec_6600.c 2009/09/26 18:41:42 1.26.54.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: dec_6600.c,v 1.26 2007/03/04 15:18:10 yamt Exp $ */ | 1 | /* $NetBSD: dec_6600.c,v 1.26.54.1 2009/09/26 18:41:42 snj Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. | 4 | * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Author: Chris G. Demetriou | 7 | * Author: Chris G. Demetriou | |
8 | * | 8 | * | |
9 | * Permission to use, copy, modify and distribute this software and | 9 | * Permission to use, copy, modify and distribute this software and | |
10 | * its documentation is hereby granted, provided that both the copyright | 10 | * its documentation is hereby granted, provided that both the copyright | |
11 | * notice and this permission notice appear in all copies of the | 11 | * notice and this permission notice appear in all copies of the | |
12 | * software, derivative works or modified versions, and any portions | 12 | * software, derivative works or modified versions, and any portions | |
13 | * thereof, and that both notices appear in supporting documentation. | 13 | * thereof, and that both notices appear in supporting documentation. | |
14 | * | 14 | * | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | 21 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
22 | * School of Computer Science | 22 | * School of Computer Science | |
23 | * Carnegie Mellon University | 23 | * Carnegie Mellon University | |
24 | * Pittsburgh PA 15213-3890 | 24 | * Pittsburgh PA 15213-3890 | |
25 | * | 25 | * | |
26 | * any improvements or extensions that they make and grant Carnegie the | 26 | * any improvements or extensions that they make and grant Carnegie the | |
27 | * rights to redistribute these changes. | 27 | * rights to redistribute these changes. | |
28 | */ | 28 | */ | |
29 | 29 | |||
30 | #include "opt_kgdb.h" | 30 | #include "opt_kgdb.h" | |
31 | 31 | |||
32 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 32 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
33 | 33 | |||
34 | __KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.26 2007/03/04 15:18:10 yamt Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v 1.26.54.1 2009/09/26 18:41:42 snj Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/device.h> | 38 | #include <sys/device.h> | |
39 | #include <sys/termios.h> | 39 | #include <sys/termios.h> | |
40 | #include <sys/conf.h> | 40 | #include <sys/conf.h> | |
41 | #include <dev/cons.h> | 41 | #include <dev/cons.h> | |
42 | 42 | |||
43 | #include <machine/rpb.h> | 43 | #include <machine/rpb.h> | |
44 | #include <machine/autoconf.h> | 44 | #include <machine/autoconf.h> | |
45 | #include <machine/cpuconf.h> | 45 | #include <machine/cpuconf.h> | |
46 | #include <machine/bus.h> | 46 | #include <machine/bus.h> | |
47 | 47 | |||
@@ -53,26 +53,33 @@ __KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v | @@ -53,26 +53,33 @@ __KERNEL_RCSID(0, "$NetBSD: dec_6600.c,v | |||
53 | #include <dev/ic/i8042reg.h> | 53 | #include <dev/ic/i8042reg.h> | |
54 | #include <dev/ic/pckbcvar.h> | 54 | #include <dev/ic/pckbcvar.h> | |
55 | #include <dev/pci/pcireg.h> | 55 | #include <dev/pci/pcireg.h> | |
56 | #include <dev/pci/pcivar.h> | 56 | #include <dev/pci/pcivar.h> | |
57 | 57 | |||
58 | #include <alpha/pci/tsreg.h> | 58 | #include <alpha/pci/tsreg.h> | |
59 | #include <alpha/pci/tsvar.h> | 59 | #include <alpha/pci/tsvar.h> | |
60 | 60 | |||
61 | #include <dev/scsipi/scsi_all.h> | 61 | #include <dev/scsipi/scsi_all.h> | |
62 | #include <dev/scsipi/scsipi_all.h> | 62 | #include <dev/scsipi/scsipi_all.h> | |
63 | #include <dev/scsipi/scsiconf.h> | 63 | #include <dev/scsipi/scsiconf.h> | |
64 | #include <dev/ata/atavar.h> | 64 | #include <dev/ata/atavar.h> | |
65 | 65 | |||
66 | #include <dev/ic/mlxio.h> | |||
67 | #include <dev/ic/mlxvar.h> | |||
68 | ||||
69 | #include <dev/i2o/i2o.h> | |||
70 | #include <dev/i2o/iopio.h> | |||
71 | #include <dev/i2o/iopvar.h> | |||
72 | ||||
66 | #include "pckbd.h" | 73 | #include "pckbd.h" | |
67 | 74 | |||
68 | #ifndef CONSPEED | 75 | #ifndef CONSPEED | |
69 | #define CONSPEED TTYDEF_SPEED | 76 | #define CONSPEED TTYDEF_SPEED | |
70 | #endif | 77 | #endif | |
71 | 78 | |||
72 | #define DR_VERBOSE(f) while (0) | 79 | #define DR_VERBOSE(f) while (0) | |
73 | 80 | |||
74 | static int comcnrate __attribute__((unused)) = CONSPEED; | 81 | static int comcnrate __attribute__((unused)) = CONSPEED; | |
75 | 82 | |||
76 | void dec_6600_init __P((void)); | 83 | void dec_6600_init __P((void)); | |
77 | static void dec_6600_cons_init __P((void)); | 84 | static void dec_6600_cons_init __P((void)); | |
78 | static void dec_6600_device_register __P((struct device *, void *)); | 85 | static void dec_6600_device_register __P((struct device *, void *)); | |
@@ -182,26 +189,28 @@ dec_6600_device_register(dev, aux) | @@ -182,26 +189,28 @@ dec_6600_device_register(dev, aux) | |||
182 | struct device *dev; | 189 | struct device *dev; | |
183 | void *aux; | 190 | void *aux; | |
184 | { | 191 | { | |
185 | static int found, initted, diskboot, netboot; | 192 | static int found, initted, diskboot, netboot; | |
186 | static struct device *primarydev, *pcidev, *ctrlrdev; | 193 | static struct device *primarydev, *pcidev, *ctrlrdev; | |
187 | struct bootdev_data *b = bootdev_data; | 194 | struct bootdev_data *b = bootdev_data; | |
188 | struct device *parent = device_parent(dev); | 195 | struct device *parent = device_parent(dev); | |
189 | 196 | |||
190 | if (found) | 197 | if (found) | |
191 | return; | 198 | return; | |
192 | 199 | |||
193 | if (!initted) { | 200 | if (!initted) { | |
194 | diskboot = (strcasecmp(b->protocol, "SCSI") == 0) || | 201 | diskboot = (strcasecmp(b->protocol, "SCSI") == 0) || | |
202 | (strcasecmp(b->protocol, "RAID") == 0) || | |||
203 | (strcasecmp(b->protocol, "I2O") == 0) || | |||
195 | (strcasecmp(b->protocol, "IDE") == 0); | 204 | (strcasecmp(b->protocol, "IDE") == 0); | |
196 | netboot = (strcasecmp(b->protocol, "BOOTP") == 0) || | 205 | netboot = (strcasecmp(b->protocol, "BOOTP") == 0) || | |
197 | (strcasecmp(b->protocol, "MOP") == 0); | 206 | (strcasecmp(b->protocol, "MOP") == 0); | |
198 | DR_VERBOSE(printf("diskboot = %d, netboot = %d\n", diskboot, | 207 | DR_VERBOSE(printf("diskboot = %d, netboot = %d\n", diskboot, | |
199 | netboot)); | 208 | netboot)); | |
200 | initted = 1; | 209 | initted = 1; | |
201 | } | 210 | } | |
202 | 211 | |||
203 | if (primarydev == NULL) { | 212 | if (primarydev == NULL) { | |
204 | if (!device_is_a(dev, "tsp")) | 213 | if (!device_is_a(dev, "tsp")) | |
205 | return; | 214 | return; | |
206 | else { | 215 | else { | |
207 | struct tsp_attach_args *tsp = aux; | 216 | struct tsp_attach_args *tsp = aux; | |
@@ -282,26 +291,64 @@ dec_6600_device_register(dev, aux) | @@ -282,26 +291,64 @@ dec_6600_device_register(dev, aux) | |||
282 | 291 | |||
283 | unit = periph->periph_target * 100 + periph->periph_lun; | 292 | unit = periph->periph_target * 100 + periph->periph_lun; | |
284 | if (b->unit != unit) | 293 | if (b->unit != unit) | |
285 | return; | 294 | return; | |
286 | if (b->channel != periph->periph_channel->chan_channel) | 295 | if (b->channel != periph->periph_channel->chan_channel) | |
287 | return; | 296 | return; | |
288 | 297 | |||
289 | /* we've found it! */ | 298 | /* we've found it! */ | |
290 | booted_device = dev; | 299 | booted_device = dev; | |
291 | DR_VERBOSE(printf("\nbooted_device = %s\n", dev->dv_xname)); | 300 | DR_VERBOSE(printf("\nbooted_device = %s\n", dev->dv_xname)); | |
292 | found = 1; | 301 | found = 1; | |
293 | } | 302 | } | |
294 | 303 | |||
304 | if (device_is_a(dev, "ld") && device_is_a(parent, "iop")) { | |||
305 | /* | |||
306 | * Argh! The attach arguments for ld devices is not | |||
307 | * consistent, so each supported raid controller requires | |||
308 | * different checks. | |||
309 | */ | |||
310 | struct iop_attach_args *iopa = aux; | |||
311 | ||||
312 | if (parent != ctrlrdev) | |||
313 | return; | |||
314 | ||||
315 | if (b->unit != iopa->ia_tid) | |||
316 | return; | |||
317 | /* we've found it! */ | |||
318 | booted_device = dev; | |||
319 | DR_VERBOSE(printf("\nbooted_device = %s\n", dev->dv_xname)); | |||
320 | found = 1; | |||
321 | } | |||
322 | ||||
323 | if (device_is_a(dev, "ld") && device_is_a(parent, "mlx")) { | |||
324 | /* | |||
325 | * Argh! The attach arguments for ld devices is not | |||
326 | * consistent, so each supported raid controller requires | |||
327 | * different checks. | |||
328 | */ | |||
329 | struct mlx_attach_args *mlxa = aux; | |||
330 | ||||
331 | if (parent != ctrlrdev) | |||
332 | return; | |||
333 | ||||
334 | if (b->unit != mlxa->mlxa_unit) | |||
335 | return; | |||
336 | /* we've found it! */ | |||
337 | booted_device = dev; | |||
338 | DR_VERBOSE(printf("\nbooted_device = %s\n", dev->dv_xname)); | |||
339 | found = 1; | |||
340 | } | |||
341 | ||||
295 | /* | 342 | /* | |
296 | * Support to boot from IDE drives. | 343 | * Support to boot from IDE drives. | |
297 | */ | 344 | */ | |
298 | if (device_is_a(dev, "wd")) { | 345 | if (device_is_a(dev, "wd")) { | |
299 | struct ata_device *adev = aux; | 346 | struct ata_device *adev = aux; | |
300 | 347 | |||
301 | if (!device_is_a(parent, "atabus")) | 348 | if (!device_is_a(parent, "atabus")) | |
302 | return; | 349 | return; | |
303 | if (device_parent(parent) != ctrlrdev) | 350 | if (device_parent(parent) != ctrlrdev) | |
304 | return; | 351 | return; | |
305 | 352 | |||
306 | DR_VERBOSE(printf("\nAtapi info: drive: %d, channel %d\n", | 353 | DR_VERBOSE(printf("\nAtapi info: drive: %d, channel %d\n", | |
307 | adev->adev_drv_data->drive, adev->adev_channel)); | 354 | adev->adev_drv_data->drive, adev->adev_channel)); |
--- src/sys/arch/alpha/alpha/dec_kn300.c 2007/03/04 15:18:10 1.34
+++ src/sys/arch/alpha/alpha/dec_kn300.c 2009/09/26 18:41:42 1.34.54.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: dec_kn300.c,v 1.34 2007/03/04 15:18:10 yamt Exp $ */ | 1 | /* $NetBSD: dec_kn300.c,v 1.34.54.1 2009/09/26 18:41:42 snj Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 by Matthew Jacob | 4 | * Copyright (c) 1998 by Matthew Jacob | |
5 | * NASA AMES Research Center. | 5 | * NASA AMES Research Center. | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice immediately at the beginning of the file, without modification, | 12 | * notice immediately at the beginning of the file, without modification, | |
13 | * this list of conditions, and the following disclaimer. | 13 | * this list of conditions, and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -24,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | * SUCH DAMAGE. | 30 | * SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include "opt_kgdb.h" | 33 | #include "opt_kgdb.h" | |
34 | 34 | |||
35 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 35 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
36 | 36 | |||
37 | __KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.34 2007/03/04 15:18:10 yamt Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.34.54.1 2009/09/26 18:41:42 snj Exp $"); | |
38 | 38 | |||
39 | #include <sys/param.h> | 39 | #include <sys/param.h> | |
40 | #include <sys/systm.h> | 40 | #include <sys/systm.h> | |
41 | #include <sys/device.h> | 41 | #include <sys/device.h> | |
42 | #include <sys/termios.h> | 42 | #include <sys/termios.h> | |
43 | #include <sys/conf.h> | 43 | #include <sys/conf.h> | |
44 | #include <dev/cons.h> | 44 | #include <dev/cons.h> | |
45 | 45 | |||
46 | #include <machine/rpb.h> | 46 | #include <machine/rpb.h> | |
47 | #include <machine/alpha.h> | 47 | #include <machine/alpha.h> | |
48 | #include <machine/autoconf.h> | 48 | #include <machine/autoconf.h> | |
49 | #include <machine/frame.h> | 49 | #include <machine/frame.h> | |
50 | #include <machine/cpuconf.h> | 50 | #include <machine/cpuconf.h> | |
@@ -62,26 +62,29 @@ __KERNEL_RCSID(0, "$NetBSD: dec_kn300.c, | @@ -62,26 +62,29 @@ __KERNEL_RCSID(0, "$NetBSD: dec_kn300.c, | |||
62 | #include <uvm/uvm_extern.h> | 62 | #include <uvm/uvm_extern.h> | |
63 | 63 | |||
64 | #include <alpha/mcbus/mcbusreg.h> | 64 | #include <alpha/mcbus/mcbusreg.h> | |
65 | #include <alpha/mcbus/mcbusvar.h> | 65 | #include <alpha/mcbus/mcbusvar.h> | |
66 | #include <alpha/pci/mcpciareg.h> | 66 | #include <alpha/pci/mcpciareg.h> | |
67 | #include <alpha/pci/mcpciavar.h> | 67 | #include <alpha/pci/mcpciavar.h> | |
68 | #include <alpha/pci/pci_kn300.h> | 68 | #include <alpha/pci/pci_kn300.h> | |
69 | #include <machine/logout.h> | 69 | #include <machine/logout.h> | |
70 | 70 | |||
71 | #include <dev/scsipi/scsi_all.h> | 71 | #include <dev/scsipi/scsi_all.h> | |
72 | #include <dev/scsipi/scsipi_all.h> | 72 | #include <dev/scsipi/scsipi_all.h> | |
73 | #include <dev/scsipi/scsiconf.h> | 73 | #include <dev/scsipi/scsiconf.h> | |
74 | 74 | |||
75 | #include <dev/ic/mlxio.h> | |||
76 | #include <dev/ic/mlxvar.h> | |||
77 | ||||
75 | 78 | |||
76 | #include "pckbd.h" | 79 | #include "pckbd.h" | |
77 | 80 | |||
78 | #ifndef CONSPEED | 81 | #ifndef CONSPEED | |
79 | #define CONSPEED TTYDEF_SPEED | 82 | #define CONSPEED TTYDEF_SPEED | |
80 | #endif | 83 | #endif | |
81 | static int comcnrate = CONSPEED; | 84 | static int comcnrate = CONSPEED; | |
82 | 85 | |||
83 | void dec_kn300_init __P((void)); | 86 | void dec_kn300_init __P((void)); | |
84 | void dec_kn300_cons_init __P((void)); | 87 | void dec_kn300_cons_init __P((void)); | |
85 | static void dec_kn300_device_register __P((struct device *, void *)); | 88 | static void dec_kn300_device_register __P((struct device *, void *)); | |
86 | static void dec_kn300_mcheck_handler | 89 | static void dec_kn300_mcheck_handler | |
87 | __P((unsigned long, struct trapframe *, unsigned long, unsigned long)); | 90 | __P((unsigned long, struct trapframe *, unsigned long, unsigned long)); | |
@@ -221,27 +224,28 @@ static void | @@ -221,27 +224,28 @@ static void | |||
221 | dec_kn300_device_register(dev, aux) | 224 | dec_kn300_device_register(dev, aux) | |
222 | struct device *dev; | 225 | struct device *dev; | |
223 | void *aux; | 226 | void *aux; | |
224 | { | 227 | { | |
225 | static int found, initted, diskboot, netboot; | 228 | static int found, initted, diskboot, netboot; | |
226 | static struct device *primarydev, *pcidev, *ctrlrdev; | 229 | static struct device *primarydev, *pcidev, *ctrlrdev; | |
227 | struct bootdev_data *b = bootdev_data; | 230 | struct bootdev_data *b = bootdev_data; | |
228 | struct device *parent = device_parent(dev); | 231 | struct device *parent = device_parent(dev); | |
229 | 232 | |||
230 | if (found) | 233 | if (found) | |
231 | return; | 234 | return; | |
232 | 235 | |||
233 | if (!initted) { | 236 | if (!initted) { | |
234 | diskboot = (strcasecmp(b->protocol, "SCSI") == 0); | 237 | diskboot = (strcasecmp(b->protocol, "SCSI") == 0) || | |
238 | (strcasecmp(b->protocol, "RAID") == 0); | |||
235 | netboot = (strcasecmp(b->protocol, "BOOTP") == 0) || | 239 | netboot = (strcasecmp(b->protocol, "BOOTP") == 0) || | |
236 | (strcasecmp(b->protocol, "MOP") == 0); | 240 | (strcasecmp(b->protocol, "MOP") == 0); | |
237 | #ifdef BDEBUG | 241 | #ifdef BDEBUG | |
238 | printf("proto:%s bus:%d slot:%d chan:%d", b->protocol, | 242 | printf("proto:%s bus:%d slot:%d chan:%d", b->protocol, | |
239 | b->bus, b->slot, b->channel); | 243 | b->bus, b->slot, b->channel); | |
240 | if (b->remote_address) | 244 | if (b->remote_address) | |
241 | printf(" remote_addr:%s", b->remote_address); | 245 | printf(" remote_addr:%s", b->remote_address); | |
242 | printf(" un:%d bdt:%d", b->unit, b->boot_dev_type); | 246 | printf(" un:%d bdt:%d", b->unit, b->boot_dev_type); | |
243 | if (b->ctrl_dev_type) | 247 | if (b->ctrl_dev_type) | |
244 | printf(" cdt:%s\n", b->ctrl_dev_type); | 248 | printf(" cdt:%s\n", b->ctrl_dev_type); | |
245 | else | 249 | else | |
246 | printf("\n"); | 250 | printf("\n"); | |
247 | printf("diskboot = %d, netboot = %d\n", diskboot, netboot); | 251 | printf("diskboot = %d, netboot = %d\n", diskboot, netboot); | |
@@ -337,26 +341,47 @@ dec_kn300_device_register(dev, aux) | @@ -337,26 +341,47 @@ dec_kn300_device_register(dev, aux) | |||
337 | unit = periph->periph_target * 100 + periph->periph_lun; | 341 | unit = periph->periph_target * 100 + periph->periph_lun; | |
338 | if (b->unit != unit) | 342 | if (b->unit != unit) | |
339 | return; | 343 | return; | |
340 | if (b->channel != periph->periph_channel->chan_channel) | 344 | if (b->channel != periph->periph_channel->chan_channel) | |
341 | return; | 345 | return; | |
342 | 346 | |||
343 | /* we've found it! */ | 347 | /* we've found it! */ | |
344 | booted_device = dev; | 348 | booted_device = dev; | |
345 | #ifdef BDEBUG | 349 | #ifdef BDEBUG | |
346 | printf("\nbooted_device = %s\n", dev->dv_xname); | 350 | printf("\nbooted_device = %s\n", dev->dv_xname); | |
347 | #endif | 351 | #endif | |
348 | found = 1; | 352 | found = 1; | |
349 | } | 353 | } | |
354 | ||||
355 | if (device_is_a(dev, "ld") && device_is_a(parent, "mlx")) { | |||
356 | /* | |||
357 | * Argh! The attach arguments for ld devices is not | |||
358 | * consistent, so each supported raid controller requires | |||
359 | * different checks. | |||
360 | */ | |||
361 | struct mlx_attach_args *mlxa = aux; | |||
362 | ||||
363 | if (parent != ctrlrdev) | |||
364 | return; | |||
365 | ||||
366 | if (b->unit != mlxa->mlxa_unit) | |||
367 | return; | |||
368 | /* we've found it! */ | |||
369 | booted_device = dev; | |||
370 | #if 0 | |||
371 | printf("\nbooted_device = %s\n", dev->dv_xname); | |||
372 | #endif | |||
373 | found = 1; | |||
374 | } | |||
350 | } | 375 | } | |
351 | 376 | |||
352 | 377 | |||
353 | /* | 378 | /* | |
354 | * KN300 Machine Check Handlers. | 379 | * KN300 Machine Check Handlers. | |
355 | */ | 380 | */ | |
356 | static void kn300_softerr __P((unsigned long, unsigned long, | 381 | static void kn300_softerr __P((unsigned long, unsigned long, | |
357 | unsigned long, struct trapframe *)); | 382 | unsigned long, struct trapframe *)); | |
358 | 383 | |||
359 | static void kn300_mcheck __P((unsigned long, unsigned long, | 384 | static void kn300_mcheck __P((unsigned long, unsigned long, | |
360 | unsigned long, struct trapframe *)); | 385 | unsigned long, struct trapframe *)); | |
361 | 386 | |||
362 | /* | 387 | /* |