From owner-svn-src-all@FreeBSD.ORG Thu Jan 24 14:33:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1D60CF67; Thu, 24 Jan 2013 14:33:28 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EBFB3AEB; Thu, 24 Jan 2013 14:33:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0OEXQUg068033; Thu, 24 Jan 2013 14:33:26 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0OEXQtu068031; Thu, 24 Jan 2013 14:33:26 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201301241433.r0OEXQtu068031@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 24 Jan 2013 14:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245879 - in head/sys/mips/nlm: . hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2013 14:33:28 -0000 Author: jchandra Date: Thu Jan 24 14:33:25 2013 New Revision: 245879 URL: http://svnweb.freebsd.org/changeset/base/245879 Log: 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. Modified: head/sys/mips/nlm/hal/sys.h head/sys/mips/nlm/xlp_machdep.c Modified: head/sys/mips/nlm/hal/sys.h ============================================================================== --- head/sys/mips/nlm/hal/sys.h Thu Jan 24 14:29:31 2013 (r245878) +++ head/sys/mips/nlm/hal/sys.h Thu Jan 24 14:33:25 2013 (r245879) @@ -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 Modified: head/sys/mips/nlm/xlp_machdep.c ============================================================================== --- head/sys/mips/nlm/xlp_machdep.c Thu Jan 24 14:29:31 2013 (r245878) +++ head/sys/mips/nlm/xlp_machdep.c Thu Jan 24 14:33:25 2013 (r245879) @@ -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();