summaryrefslogtreecommitdiffstats
path: root/sys/mips/nlm
diff options
context:
space:
mode:
authorjchandra <jchandra@FreeBSD.org>2013-01-24 14:33:25 +0000
committerjchandra <jchandra@FreeBSD.org>2013-01-24 14:33:25 +0000
commit6fe65a877ece9d2793ca4f75cbb71bfe83f69535 (patch)
tree29e9e870b4785f9b617d2f6d6771948ec644ee89 /sys/mips/nlm
parent9f6a60e0001aac859ac7ea8f3b3bf962811839a6 (diff)
downloadFreeBSD-src-6fe65a877ece9d2793ca4f75cbb71bfe83f69535.zip
FreeBSD-src-6fe65a877ece9d2793ca4f75cbb71bfe83f69535.tar.gz
Broadcom XLP updates for the new firmware
Support few more versions of board firmware. In case the security block is disabled, enable it at boot. Also increase the excluded memory region to cover the area used by the firmware to initialize devices.
Diffstat (limited to 'sys/mips/nlm')
-rw-r--r--sys/mips/nlm/hal/sys.h13
-rw-r--r--sys/mips/nlm/xlp_machdep.c21
2 files changed, 31 insertions, 3 deletions
diff --git a/sys/mips/nlm/hal/sys.h b/sys/mips/nlm/hal/sys.h
index adfd8a8..2092d37 100644
--- a/sys/mips/nlm/hal/sys.h
+++ b/sys/mips/nlm/hal/sys.h
@@ -140,5 +140,18 @@ enum {
INVALID_DFS_DEVICE = 0xFF
};
+static __inline
+void nlm_sys_enable_block(uint64_t sys_base, int block)
+{
+ uint32_t dfsdis, mask;
+
+ mask = 1 << block;
+ dfsdis = nlm_read_sys_reg(sys_base, SYS_DFS_DIS_CTRL);
+ if ((dfsdis & mask) == 0)
+ return; /* already enabled, nothing to do */
+ dfsdis &= ~mask;
+ nlm_write_sys_reg(sys_base, SYS_DFS_DIS_CTRL, dfsdis);
+}
+
#endif
#endif
diff --git a/sys/mips/nlm/xlp_machdep.c b/sys/mips/nlm/xlp_machdep.c
index a4ffc73..f95592e 100644
--- a/sys/mips/nlm/xlp_machdep.c
+++ b/sys/mips/nlm/xlp_machdep.c
@@ -157,6 +157,20 @@ xlp_setup_mmu(void)
}
static void
+xlp_enable_blocks(void)
+{
+ uint64_t sysbase;
+ int i;
+
+ for (i = 0; i < XLP_MAX_NODES; i++) {
+ if (!nlm_dev_exists(XLP_IO_SYS_OFFSET(i)))
+ continue;
+ sysbase = nlm_get_sys_regbase(i);
+ nlm_sys_enable_block(sysbase, DFS_DEVICE_RSA);
+ }
+}
+
+static void
xlp_parse_mmu_options(void)
{
uint64_t sysbase;
@@ -420,9 +434,8 @@ xlp_pic_init(void)
#define XLP_MEM_LIM 0xfffff000UL
#endif
static vm_paddr_t xlp_mem_excl[] = {
- 0, 0, /* entry for kernel image, set by xlp_mem_init*/
- 0x0c000000, 0x0d000000, /* uboot mess */
- 0x10000000, 0x14000000, /* cms queue and other stuff */
+ 0, 0, /* for kernel image region, see xlp_mem_init */
+ 0x0c000000, 0x14000000, /* uboot area, cms queue and other stuff */
0x1fc00000, 0x1fd00000, /* reset vec */
0x1e000000, 0x1e200000, /* poe buffers */
};
@@ -559,6 +572,8 @@ platform_start(__register_t a0 __unused,
/* setup for the startup core */
xlp_setup_mmu();
+ xlp_enable_blocks();
+
/* Read/Guess/setup board information */
nlm_board_info_setup();
OpenPOWER on IntegriCloud