Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm Support for the Broadcom BCM56340 iProc base...



details:   https://anonhg.NetBSD.org/src/rev/f415f4831b86
branches:  trunk
changeset: 790969:f415f4831b86
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Oct 28 22:35:07 2013 +0000

description:
Support for the Broadcom BCM56340 iProc based switch.

diffstat:

 sys/arch/evbarm/bcm53xx/bcm53xx_start.S |   55 ++++-
 sys/arch/evbarm/conf/BCM5301X           |   15 +-
 sys/arch/evbarm/conf/BCM56340           |  288 ++++++++++++++++++++++++++++++++
 sys/arch/evbarm/conf/BCM56340_INSTALL   |   10 +
 sys/arch/evbarm/conf/mk.bcm53xx         |    9 +-
 sys/arch/evbarm/conf/std.bcm53xx        |    7 +-
 6 files changed, 359 insertions(+), 25 deletions(-)

diffs (truncated from 539 to 300 lines):

diff -r 89bb951ffb40 -r f415f4831b86 sys/arch/evbarm/bcm53xx/bcm53xx_start.S
--- a/sys/arch/evbarm/bcm53xx/bcm53xx_start.S   Mon Oct 28 21:39:45 2013 +0000
+++ b/sys/arch/evbarm/bcm53xx/bcm53xx_start.S   Mon Oct 28 22:35:07 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm53xx_start.S,v 1.7 2013/08/04 01:02:01 matt Exp $   */
+/*     $NetBSD: bcm53xx_start.S,v 1.8 2013/10/28 22:35:07 matt Exp $   */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -45,7 +45,7 @@
 #define        CONADDR         0x18000300
 #endif
 
-RCSID("$NetBSD: bcm53xx_start.S,v 1.7 2013/08/04 01:02:01 matt Exp $")
+RCSID("$NetBSD: bcm53xx_start.S,v 1.8 2013/10/28 22:35:07 matt Exp $")
 
 #undef VERBOSE_INIT_ARM
 #define VERBOSE_INIT_ARM
@@ -74,8 +74,11 @@
        /*
         * Save any arguments u-boot passed us.
         */
-       ldr     r4, .Luboot_args
+       movw    r4, #:lower16:(uboot_args-.LPIC0)
+       movt    r4, #:upper16:(uboot_args-.LPIC0)
+       add     r4, r4, pc
        stmia   r4, {r0-r3}
+.LPIC0:
 
        /*
         * Let's turn on the CCA watchdog in case something goes horribly wrong.
@@ -98,6 +101,7 @@
        bl      arm_boot_l1pt_init
 
        XPUTC(#68)
+
        /*
         * Before we turn on the MMU, let's the other process out of the
         * SKU ROM but setting the magic LUT address to our own mp_start
@@ -116,9 +120,20 @@
        ldr     r0, .Ltemp_l1_table     /* The page table address */
        bl      arm_cpuinit
 
-       XPUTC(#33)
-       XPUTC(#10)
-       XPUTC(#13)
+       XPUTC(#89)
+
+       movw    r0, #:lower16:uboot_args
+       movt    r0, #:upper16:uboot_args
+       ldr     r2, [r0]
+       movw    r1, #:lower16:(uboot_args-.LPIC1)
+       movt    r1, #:upper16:(uboot_args-.LPIC1)
+       add     r1, r1, pc
+       ldr     r1, [r1]
+.LPIC1:
+       cmp     r1, r2
+1:     bne     1b
+
+       XPUTC(#90)
 
        /*
         * Let's turn off the CCA watchdog since nothing went horribly wrong.
@@ -127,10 +142,15 @@
        mov     r1, #0
        str     r1, [r0]
 
+       XPUTC(#33)
+       XPUTC(#10)
+       XPUTC(#13)
        /*
         * Jump to start in locore.S, which in turn will call initarm and main.
         */
-       b       start
+       movw    ip, #:lower16:start
+       movt    ip, #:upper16:start
+       bx      ip
        nop
        nop
        nop
@@ -138,9 +158,6 @@
 
        /* NOTREACHED */
 
-.Luboot_args:
-       .word   uboot_args
-
 .Lsku_rom_lut:
        .word   0xffff0400
 
@@ -150,19 +167,23 @@
 
 .Ltemp_l1_table:
        /* Put the temporary L1 translation table far enough away. */
-       .word   KERNEL_BASE_phys + 31 * 0x100000 - L1_TABLE_SIZE
+       .word   31 * 0x100000 - L1_TABLE_SIZE
 
 #include <arm/cortex/a9_mpsubr.S>
 
 mmu_init_table:
-       /* Add 32MB of VA==PA at 0x80000000 so we can keep the kernel going */
-       MMU_INIT(KERNEL_BASE, 0x80000000,
-           (128 * L1_S_SIZE + L1_S_SIZE - 1) / L1_S_SIZE,
-           L1_S_PROTO | L1_S_APv7_KRW  | L1_S_B | L1_S_C)
+       /* Add 128MB of VA==PA at 0x80000000 so we can keep the kernel going */
+#ifdef BCM5301X
+       MMU_INIT(KERNEL_BASE, 0x80000000, 128,
+           L1_S_PROTO | L1_S_APv7_KRW | L1_S_B | L1_S_C | L1_S_V6_S)
+#elif defined(BCM56340)
+       MMU_INIT(KERNEL_BASE, 0x60000000, 128,
+           L1_S_PROTO | L1_S_APv7_KRW | L1_S_B | L1_S_C | L1_S_V6_S)
+#endif
 
        MMU_INIT(0, 0x00000000,
-           (16 * L1_S_SIZE + L1_S_SIZE - 1) / L1_S_SIZE,
-           L1_S_PROTO | L1_S_APv7_KRW  | L1_S_B | L1_S_C)
+           (32 * L1_S_SIZE + L1_S_SIZE - 1) / L1_S_SIZE,
+           L1_S_PROTO | L1_S_APv7_KRW | L1_S_B | L1_S_C | L1_S_V6_S)
 
        /* Map the 2MB of primary peripherals */
        MMU_INIT(KERNEL_IO_IOREG_VBASE, BCM53XX_IOREG_PBASE,
diff -r 89bb951ffb40 -r f415f4831b86 sys/arch/evbarm/conf/BCM5301X
--- a/sys/arch/evbarm/conf/BCM5301X     Mon Oct 28 21:39:45 2013 +0000
+++ b/sys/arch/evbarm/conf/BCM5301X     Mon Oct 28 22:35:07 2013 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: BCM5301X,v 1.15 2013/06/30 21:38:56 rmind Exp $
+#      $NetBSD: BCM5301X,v 1.16 2013/10/28 22:35:07 matt Exp $
 #
 #      BCM5301X -- Broadcom BCM5301X Eval Board Kernel
 #
@@ -25,7 +25,7 @@
 #options       MULTIPROCESSOR
 options        CPU_CORTEXA9
 #options       MEMSIZE=256
-options        BCM5301
+options        BCM5301X
 options        PMAPCOUNTERS
 options        BUSDMA_COUNTERS
 
@@ -122,6 +122,7 @@
 options        DKWEDGE_METHOD_GPT
 
 # Miscellaneous kernel options
+options        MODULAR         # support dynamically loaded kernel modules
 options        KTRACE          # system call tracing, a la ktrace(1)
 #options       KMEMSTATS       # kernel memory statistics
 options        PCIVERBOSE      # Verbose PCI autoconfiguration messages
@@ -142,7 +143,7 @@
 #options       LOCKDEBUG       # Enable lock debugging
 #options       PMAP_DEBUG      # Enable pmap_debug_level code
 #options       IPKDB           # remote kernel debugging
-#options       VERBOSE_INIT_ARM # verbose bootstraping messages
+options        VERBOSE_INIT_ARM # verbose bootstraping messages
 options        DDB             # in-kernel debugger
 options                DDB_ONPANIC=1
 options        DDB_HISTORY_SIZE=100    # Enable history editing in DDB
@@ -150,7 +151,7 @@
 options        DB_MAX_LINE=INT_MAX
 #options       KGDB
 makeoptions    DEBUG="-g"      # compile full symbol table
-options        SYMTAB_SPACE=575000
+options        SYMTAB_SPACE=600000
 
 ## USB Debugging options
 options USB_DEBUG
@@ -188,6 +189,7 @@
 # ChipCommonA Peripherals
 bcmcca0                at mainbus?             # ChipCommonA
 #options       CONADDR=0x18000300, CONSPEED=115200
+options        CONSPEED=9600
 com0           at bcmcca? channel 0
 com*           at bcmcca? channel 1
 
@@ -237,6 +239,11 @@
 bcmi2c0        at bcmccb0
 iic*           at bcmi2c?
 
+# NAND Controller
+bcmnand0       at bcmccb0
+nand*          at nandbus?
+flash*         at nand?
+
 # Watchdog timers
 #bcmwdt*       at bcmccb0
 
diff -r 89bb951ffb40 -r f415f4831b86 sys/arch/evbarm/conf/BCM56340
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbarm/conf/BCM56340     Mon Oct 28 22:35:07 2013 +0000
@@ -0,0 +1,288 @@
+#
+#      $NetBSD: BCM56340,v 1.1 2013/10/28 22:35:07 matt Exp $
+#
+#      BCM5301X -- Broadcom BCM5301X Eval Board Kernel
+#
+
+include        "arch/evbarm/conf/std.bcm53xx"
+
+# estimated number of users
+
+maxusers       32
+
+# Standard system options
+
+options        RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+#options       NTP             # NTP phase/frequency locked loop
+
+# CPU options
+
+#makeoptions   DEFCOPTS="-O0"
+options        UVMHIST
+#options       UVMHIST_PRINT,A9WDT_PERIOD_DEFAULT=30
+options        BCM53XX_CONSOLE_EARLY
+options        BCMETH_COUNTERS
+#options       MULTIPROCESSOR
+options        CPU_CORTEXA9
+#options       MEMSIZE=256
+options        BCM563XX
+options        PMAPCOUNTERS
+options        BUSDMA_COUNTERS
+
+# Architecture options
+
+# File systems
+
+file-system    FFS             # UFS
+#file-system   LFS             # log-structured file system
+file-system    MFS             # memory file system
+file-system    NFS             # Network file system
+#file-system   ADOSFS          # AmigaDOS-compatible file system
+#file-system   EXT2FS          # second extended file system (linux)
+file-system    CD9660          # ISO 9660 + Rock Ridge file system
+file-system    MSDOSFS         # MS-DOS file system
+#file-system   FDESC           # /dev/fd
+file-system    KERNFS          # /kern
+#file-system   NULLFS          # loopback file system
+#file-system   PROCFS          # /proc
+#file-system   PUFFS           # Userspace file systems (e.g. ntfs-3g & sshfs)
+#file-system   UMAPFS          # NULLFS + uid and gid remapping
+#file-system   UNION           # union file system
+file-system    TMPFS           # memory file system
+file-system    PTYFS           # /dev/pts/N support
+
+# File system options
+#options       QUOTA           # legacy UFS quotas
+#options       QUOTA2          # new, in-filesystem UFS quotas
+#options       FFS_EI          # FFS Endian Independent support
+#options       NFSSERVER
+options        WAPBL           # File system journaling support
+#options       FFS_NO_SNAPSHOT # No FFS snapshot support
+
+# Networking options
+
+#options       GATEWAY         # packet forwarding
+options        INET            # IP + ICMP + TCP + UDP
+options        INET6           # IPV6
+#options       IPSEC           # IP security
+#options       IPSEC_DEBUG     # debug for IP security
+#options       MROUTING        # IP multicast routing
+#options       PIM             # Protocol Independent Multicast
+#options       NETATALK        # AppleTalk networking
+#options       PPP_BSDCOMP     # BSD-Compress compression support for PPP
+#options       PPP_DEFLATE     # Deflate compression support for PPP
+#options       PPP_FILTER      # Active filter support for PPP (requires bpf)
+#options       TCP_DEBUG       # Record last TCP_NDEBUG packets with SO_DEBUG
+
+options        NFS_BOOT_BOOTP
+options        NFS_BOOT_DHCP
+#options               NFS_BOOT_BOOTSTATIC
+#options               NFS_BOOTSTATIC_MYIP="\"192.168.1.4\""
+#options               NFS_BOOTSTATIC_GWIP="\"192.168.1.1\""
+#options               NFS_BOOTSTATIC_MASK="\"255.255.255.0\""
+#options               NFS_BOOTSTATIC_SERVADDR="\"192.168.1.1\""
+#options               NFS_BOOTSTATIC_SERVER="\"192.168.1.1:/nfs/sdp2430\""
+
+options                NFS_BOOT_RWSIZE=1024
+
+# Compatibility options
+
+#options       COMPAT_43       # 4.3BSD compatibility.
+options        COMPAT_60       # NetBSD 6.0 compatibility.
+options        COMPAT_50       # NetBSD 5.0 compatibility.
+options        COMPAT_40       # NetBSD 4.0 compatibility.
+options        COMPAT_30       # NetBSD 3.0 compatibility.
+#options       COMPAT_20       # NetBSD 2.0 compatibility.
+#options       COMPAT_16       # NetBSD 1.6 compatibility.
+#options       COMPAT_15       # NetBSD 1.5 compatibility.
+#options       COMPAT_14       # NetBSD 1.4 compatibility.
+#options       COMPAT_13       # NetBSD 1.3 compatibility.
+#options       COMPAT_12       # NetBSD 1.2 compatibility.
+#options       COMPAT_11       # NetBSD 1.1 compatibility.
+#options       COMPAT_10       # NetBSD 1.0 compatibility.
+#options       COMPAT_09       # NetBSD 0.9 compatibility.
+#options       TCP_COMPAT_42   # 4.2BSD TCP/IP bug compat. Not recommended.
+#options               COMPAT_BSDPTY   # /dev/[pt]ty?? ptys.
+
+# Shared memory options
+
+options        SYSVMSG         # System V-like message queues
+options        SYSVSEM         # System V-like semaphores



Home | Main Index | Thread Index | Old Index