aboutsummaryrefslogtreecommitdiffstats
path: root/test/crypto/source/testref/ref_gcm.h
blob: cc2d4354487e245b3a9e2af4bc3d7f9ab8428fa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef TEST_REF_GCM_H_
#define TEST_REF_GCM_H_



#define K3_LEN      16
#define P3_LEN      16
#define IV3_LEN     (12+4)
#define AAD3_LEN    16
#define C3_LEN      16
#define T3_LEN      16

extern const uint8_t K3[K3_LEN];
extern const uint8_t IV3[IV3_LEN];
extern const uint8_t P3[P3_LEN];
extern const uint8_t A3[AAD3_LEN];
extern const uint8_t C3[C3_LEN];
extern const uint8_t T3[T3_LEN];

///////
// http://csrc.nist.gov/groups/STM/cavp/gcmtestvectors.zip gcmEncryptExtIV128.rsp
// [Keylen = 128]
// [IVlen = 96]
// [PTlen = 256]
// [AADlen = 128]
// [Taglen = 128]
// Count = 0
// K = 298efa1ccf29cf62ae6824bfc19557fc
// IV = 6f58a93fe1d207fae4ed2f6d
// P = cc38bccd6bc536ad919b1395f5d63801f99f8068d65ca5ac63872daf16b93901
// AAD = 021fafd238463973ffe80256e5b1c6b1
// C = dfce4e9cd291103d7fe4e63351d9e79d3dfd391e3267104658212da96521b7db
// T = 542465ef599316f73a7a560509a2d9f2
///////
#define K4_LEN      16
#define P4_LEN      32
#define IV4_LEN     (12+4)
#define AAD4_LEN    16
#define C4_LEN      32
#define T4_LEN      16

extern const uint8_t K4[K4_LEN] ;
extern const uint8_t IV4[IV4_LEN];
extern const uint8_t P4[P4_LEN] ;
extern const uint8_t A4[AAD4_LEN] ;
extern const uint8_t C4[C4_LEN] ;
extern const uint8_t T4[T4_LEN] ;

///////
// http://csrc.nist.gov/groups/STM/cavp/gcmtestvectors.zip gcmEncryptExtIV128.rsp
// [Keylen = 128]
// [IVlen = 96]
// [PTlen = 256]
// [AADlen = 128]
// [Taglen = 128]
// Count = 0
// K = 298efa1ccf29cf62ae6824bfc19557fc
// IV = 6f58a93fe1d207fae4ed2f6d
// P = cc38bccd6bc536ad919b1395f5d63801f99f8068d65ca5ac63872daf16b93901
// AAD = 021fafd238463973ffe80256e5b1c6b1
// C = dfce4e9cd291103d7fe4e63351d9e79d3dfd391e3267104658212da96521b7db
// T = 542465ef599316f73a7a560509a2d9f2
///////
#define K5_LEN      16
#define P5_LEN      32
#define IV5_LEN     (12+4)
#define AAD5_LEN    16
#define C5_LEN      32
#define T5_LEN      16

extern const uint8_t K5[K5_LEN] ;
extern const uint8_t IV5[IV5_LEN];
extern const uint8_t P5[P5_LEN] ;
extern const uint8_t A5[AAD5_LEN] ;
extern const uint8_t C5[C5_LEN] ;
extern const uint8_t T5[T5_LEN] ;





#endif //TEST_REF_GCM_H_
='n419' href='#n419'>419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -15,6 +15,8 @@
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
 #include <linux/spi/spi.h>
+#include <linux/spi/spi_gpio.h>
+#include <linux/spi/74x164.h>
 #include <asm/addrspace.h>
 #include <bcm63xx_board.h>
 #include <bcm63xx_cpu.h>
@@ -44,6 +46,12 @@
 #define CFE_OFFSET_64K		0x10000
 #define CFE_OFFSET_128K		0x20000
 
+#define NB4_PID_OFFSET		0xff80
+#define NB4_74X164_GPIO_BASE	64
+#define NB4_SPI_GPIO_MOSI	7
+#define NB4_SPI_GPIO_CLK	6
+#define NB4_74HC64_GPIO(X)	(NB4_74X164_GPIO_BASE + (X))
+
 static struct board_info board;
 
 /*
@@ -711,6 +719,596 @@ static struct board_info __initdata boar
 
 	.has_ohci0			= 1,
 };
+
+struct spi_gpio_platform_data nb4_spi_gpio_data = {
+	.sck		= NB4_SPI_GPIO_CLK,
+	.mosi		= NB4_SPI_GPIO_MOSI,
+	.miso		= SPI_GPIO_NO_MISO,
+	.num_chipselect	= 1,
+};
+
+
+static struct platform_device nb4_spi_gpio = {
+	.name = "spi_gpio",
+	.id   = 1,
+	.dev = {
+		.platform_data = &nb4_spi_gpio_data,
+	},
+};
+
+static struct platform_device * __initdata nb4_devices[] = {
+	&nb4_spi_gpio,
+};
+
+const struct gen_74x164_chip_platform_data nb4_74x164_platform_data = {
+	.base = NB4_74X164_GPIO_BASE
+};
+
+static struct spi_board_info nb4_spi_devices[] = {
+	{
+		.modalias = "74x164",
+		.max_speed_hz = 781000,
+		.bus_num = 1,
+		.controller_data = (void *) SPI_GPIO_NO_CHIPSELECT,
+		.mode = SPI_MODE_0,
+		.platform_data = &nb4_74x164_platform_data
+	}
+};
+
+static struct board_info __initdata board_nb4_ser_r0 = {
+	.name				= "NB4-SER-r0",
+	.expected_cpu_id		= 0x6358,
+
+	.has_uart0			= 1,
+	.has_enet0			= 1,
+	.has_enet1			= 1,
+	.has_pci			= 1,
+
+	.enet0 = {
+		.has_phy		= 1,
+		.use_internal_phy	= 1,
+	},
+
+	.enet1 = {
+		.has_phy		= 1,
+		.phy_id			= 0,
+		.force_speed_100	= 1,
+		.force_duplex_full	= 1,
+	},
+
+
+	.has_ohci0 = 1,
+	.has_pccard = 1,
+	.has_ehci0 = 1,
+
+	.leds = {
+		{
+			.name		= "NB4-SER-r0:white:adsl",
+			.gpio		= NB4_74HC64_GPIO(4),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r0:white:traffic",
+			.gpio		= 2,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r0:white:tel",
+			.gpio		= NB4_74HC64_GPIO(3),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r0:white:tv",
+			.gpio		= NB4_74HC64_GPIO(2),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r0:white:wifi",
+			.gpio		= 15,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r0:white:alarm",
+			.gpio		= NB4_74HC64_GPIO(0),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r0:red:service",
+			.gpio		= 29,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r0:green:service",
+			.gpio		= 30,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r0:blue:service",
+			.gpio		= 4,
+			.active_low	= 1,
+		},
+	},
+	.buttons = {
+		{
+			.desc		= "reset",
+			.gpio		= 34,
+			.type		= EV_KEY,
+			.code		= KEY_RESTART,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "wps",
+			.gpio		= 37,
+			.type		= EV_KEY,
+			.code		= KEY_WPS_BUTTON,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "service",
+			.gpio		= 27,
+			.type		= EV_KEY,
+			.code		= BTN_0,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "clip",
+			.gpio		= 31,
+			.type		= EV_KEY,
+			.code		= BTN_1,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+	},
+	.devs = nb4_devices,
+	.num_devs = ARRAY_SIZE(nb4_devices),
+	.spis = nb4_spi_devices,
+	.num_spis = ARRAY_SIZE(nb4_spi_devices),
+};
+
+static struct board_info __initdata board_nb4_ser_r1 = {
+	.name				= "NB4-SER-r1",
+	.expected_cpu_id		= 0x6358,
+
+	.has_uart0			= 1,
+	.has_enet0			= 1,
+	.has_enet1			= 1,
+	.has_pci			= 1,
+
+	.enet0 = {
+		.has_phy		= 1,
+		.use_internal_phy	= 1,
+	},
+
+	.enet1 = {
+		.has_phy		= 1,
+		.phy_id			= 0,
+		.force_speed_100	= 1,
+		.force_duplex_full	= 1,
+	},
+
+
+	.has_ohci0 = 1,
+	.has_pccard = 1,
+	.has_ehci0 = 1,
+
+	.leds = {
+		{
+			.name		= "NB4-SER-r1:white:adsl",
+			.gpio		= NB4_74HC64_GPIO(4),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r1:white:traffic",
+			.gpio		= 2,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r1:white:tel",
+			.gpio		= NB4_74HC64_GPIO(3),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r1:white:tv",
+			.gpio		= NB4_74HC64_GPIO(2),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r1:white:wifi",
+			.gpio		= 15,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r1:white:alarm",
+			.gpio		= NB4_74HC64_GPIO(0),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r1:red:service",
+			.gpio		= 29,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r1:green:service",
+			.gpio		= 30,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r1:blue:service",
+			.gpio		= 4,
+			.active_low	= 1,
+		},
+	},
+	.buttons = {
+		{
+			.desc		= "reset",
+			.gpio		= 34,
+			.type		= EV_KEY,
+			.code		= KEY_RESTART,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "wps",
+			.gpio		= 37,
+			.type		= EV_KEY,
+			.code		= KEY_WPS_BUTTON,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "service",
+			.gpio		= 27,
+			.type		= EV_KEY,
+			.code		= BTN_0,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "clip",
+			.gpio		= 31,
+			.type		= EV_KEY,
+			.code		= BTN_1,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+	},
+	.devs = nb4_devices,
+	.num_devs = ARRAY_SIZE(nb4_devices),
+	.spis = nb4_spi_devices,
+	.num_spis = ARRAY_SIZE(nb4_spi_devices),
+};
+
+static struct board_info __initdata board_nb4_ser_r2 = {
+	.name				= "NB4-SER-r2",
+	.expected_cpu_id		= 0x6358,
+
+	.has_uart0			= 1,
+	.has_enet0			= 1,
+	.has_enet1			= 1,
+	.has_pci			= 1,
+
+	.enet0 = {
+		.has_phy		= 1,
+		.use_internal_phy	= 1,
+	},
+
+	.enet1 = {
+		.has_phy		= 1,
+		.phy_id			= 0,
+		.force_speed_100	= 1,
+		.force_duplex_full	= 1,
+	},
+
+
+	.has_ohci0 = 1,
+	.has_pccard = 1,
+	.has_ehci0 = 1,
+
+	.leds = {
+		{
+			.name		= "NB4-SER-r2:white:adsl",
+			.gpio		= NB4_74HC64_GPIO(4),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r2:white:traffic",
+			.gpio		= 2,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r2:white:tel",
+			.gpio		= NB4_74HC64_GPIO(3),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r2:white:tv",
+			.gpio		= NB4_74HC64_GPIO(2),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r2:white:wifi",
+			.gpio		= 15,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r2:white:alarm",
+			.gpio		= NB4_74HC64_GPIO(0),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r2:red:service",
+			.gpio		= 29,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r2:green:service",
+			.gpio		= 30,
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-SER-r2:blue:service",
+			.gpio		= 4,
+			.active_low	= 1,
+		},
+	},
+	.buttons = {
+		{
+			.desc		= "reset",
+			.gpio		= 34,
+			.type		= EV_KEY,
+			.code		= KEY_RESTART,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "wps",
+			.gpio		= 37,
+			.type		= EV_KEY,
+			.code		= KEY_WPS_BUTTON,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "service",
+			.gpio		= 27,
+			.type		= EV_KEY,
+			.code		= BTN_0,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "clip",
+			.gpio		= 31,
+			.type		= EV_KEY,
+			.code		= BTN_1,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+	},
+	.devs = nb4_devices,
+	.num_devs = ARRAY_SIZE(nb4_devices),
+	.spis = nb4_spi_devices,
+	.num_spis = ARRAY_SIZE(nb4_spi_devices),
+};
+
+static struct board_info __initdata board_nb4_fxc_r1 = {
+	.name				= "NB4-FXC-r1",
+	.expected_cpu_id		= 0x6358,
+
+	.has_uart0			= 1,
+	.has_enet0			= 1,
+	.has_enet1			= 1,
+	.has_pci			= 1,
+
+	.enet0 = {
+		.has_phy		= 1,
+		.use_internal_phy	= 1,
+	},
+
+	.enet1 = {
+		.has_phy		= 1,
+		.phy_id			= 0,
+		.force_speed_100	= 1,
+		.force_duplex_full	= 1,
+	},
+
+
+	.has_ohci0 = 1,
+	.has_pccard = 1,
+	.has_ehci0 = 1,
+
+	.leds = {
+		{
+			.name		= "NB4-FXC-r1:white:adsl",
+			.gpio		= NB4_74HC64_GPIO(4),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-FXC-r1:white:traffic",
+			.gpio		= 2,
+		},
+		{
+			.name		= "NB4-FXC-r1:white:tel",
+			.gpio		= NB4_74HC64_GPIO(3),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-FXC-r1:white:tv",
+			.gpio		= NB4_74HC64_GPIO(2),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-FXC-r1:white:wifi",
+			.gpio		= 15,
+		},
+		{
+			.name		= "NB4-FXC-r1:white:alarm",
+			.gpio		= NB4_74HC64_GPIO(0),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-FXC-r1:red:service",
+			.gpio		= 29,
+		},
+		{
+			.name		= "NB4-FXC-r1:green:service",
+			.gpio		= 30,
+		},
+		{
+			.name		= "NB4-FXC-r1:blue:service",
+			.gpio		= 4,
+		},
+	},
+	.buttons = {
+		{
+			.desc		= "reset",
+			.gpio		= 34,
+			.type		= EV_KEY,
+			.code		= KEY_RESTART,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "wps",
+			.gpio		= 37,
+			.type		= EV_KEY,
+			.code		= KEY_WPS_BUTTON,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "service",
+			.gpio		= 27,
+			.type		= EV_KEY,
+			.code		= BTN_0,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "clip",
+			.gpio		= 31,
+			.type		= EV_KEY,
+			.code		= BTN_1,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+	},
+	.devs = nb4_devices,
+	.num_devs = ARRAY_SIZE(nb4_devices),
+	.spis = nb4_spi_devices,
+	.num_spis = ARRAY_SIZE(nb4_spi_devices),
+};
+
+static struct board_info __initdata board_nb4_fxc_r2 = {
+	.name				= "NB4-FXC-r2",
+	.expected_cpu_id		= 0x6358,
+
+	.has_uart0			= 1,
+	.has_enet0			= 1,
+	.has_enet1			= 1,
+	.has_pci			= 1,
+
+	.enet0 = {
+		.has_phy		= 1,
+		.use_internal_phy	= 1,
+	},
+
+	.enet1 = {
+		.has_phy		= 1,
+		.phy_id			= 0,
+		.force_speed_100	= 1,
+		.force_duplex_full	= 1,
+	},
+
+
+	.has_ohci0 = 1,
+	.has_pccard = 1,
+	.has_ehci0 = 1,
+
+	.leds = {
+		{
+			.name		= "NB4-FXC-r2:white:adsl",
+			.gpio		= NB4_74HC64_GPIO(4),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-FXC-r2:white:traffic",
+			.gpio		= 2,
+		},
+		{
+			.name		= "NB4-FXC-r2:white:tel",
+			.gpio		= NB4_74HC64_GPIO(3),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-FXC-r2:white:tv",
+			.gpio		= NB4_74HC64_GPIO(2),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-FXC-r2:white:wifi",
+			.gpio		= 15,
+		},
+		{
+			.name		= "NB4-FXC-r2:white:alarm",
+			.gpio		= NB4_74HC64_GPIO(0),
+			.active_low	= 1,
+		},
+		{
+			.name		= "NB4-FXC-r2:red:service",
+			.gpio		= 29,
+		},
+		{
+			.name		= "NB4-FXC-r2:green:service",
+			.gpio		= 30,
+		},
+		{
+			.name		= "NB4-FXC-r2:blue:service",
+			.gpio		= 4,
+		},
+	},
+	.buttons = {
+		{
+			.desc		= "reset",
+			.gpio		= 34,
+			.type		= EV_KEY,
+			.code		= KEY_RESTART,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "wps",
+			.gpio		= 37,
+			.type		= EV_KEY,
+			.code		= KEY_WPS_BUTTON,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "service",
+			.gpio		= 27,
+			.type		= EV_KEY,
+			.code		= BTN_0,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+		{
+			.desc		= "clip",
+			.gpio		= 31,
+			.type		= EV_KEY,
+			.code		= BTN_1,
+			.active_low	= 1,
+			.debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
+		},
+	},
+	.devs = nb4_devices,
+	.num_devs = ARRAY_SIZE(nb4_devices),
+	.spis = nb4_spi_devices,
+	.num_spis = ARRAY_SIZE(nb4_spi_devices),
+};
 #endif
 
 /*
@@ -744,6 +1342,11 @@ static const struct board_info __initdat
 	&board_96358vw2,
 	&board_AGPFS0,
 	&board_DWVS0,
+	&board_nb4_ser_r0,
+	&board_nb4_ser_r1,
+	&board_nb4_ser_r2,
+	&board_nb4_fxc_r1,
+	&board_nb4_fxc_r2,
 #endif
 };
 
@@ -798,6 +1401,16 @@ static void __init boardid_fixup(u8 *boo
 	struct bcm_tag *tag = (struct bcm_tag *)(boot_addr + CFE_OFFSET_64K);
 	char *board_name = (char *)bcm63xx_nvram_get_name();
 
+	if (BCMCPU_IS_6358() && (!strcmp(board_name, "96358VW"))) {
+		u8 *p = boot_addr + NB4_PID_OFFSET;
+
+		/* Extract nb4 PID */
+		if (!memcmp(p, "NB4-", 4)) {
+			memcpy(board_name, p, sizeof("NB4-XXX-rX"));
+			return;
+		}
+	}
+
 	/* check if bcm_tag is at 64k offset */
 	if (strncmp(board_name, tag->board_id, BOARDID_LEN) != 0) {
 		/* else try 128k */