diff --git a/.gitignore b/.gitignore index 688611b41971a..1a330bdd34e01 100644 --- a/.gitignore +++ b/.gitignore @@ -61,6 +61,7 @@ etctmp/ /cscope.* /defconfig /defconfig.tmp.bak +/Image-* /Make.defs /nuttx /nuttx32 diff --git a/Documentation/platforms/risc-v/eic7700x/boards/eic7700-evb/eic7700-evb.jpg b/Documentation/platforms/risc-v/eic7700x/boards/eic7700-evb/eic7700-evb.jpg new file mode 100644 index 0000000000000..9561a901c4285 Binary files /dev/null and b/Documentation/platforms/risc-v/eic7700x/boards/eic7700-evb/eic7700-evb.jpg differ diff --git a/Documentation/platforms/risc-v/eic7700x/boards/eic7700-evb/index.rst b/Documentation/platforms/risc-v/eic7700x/boards/eic7700-evb/index.rst new file mode 100644 index 0000000000000..c1f4af889b2c4 --- /dev/null +++ b/Documentation/platforms/risc-v/eic7700x/boards/eic7700-evb/index.rst @@ -0,0 +1,154 @@ +================= +ESWIN EIC7700 EVB +================= + +.. tags:: chip:eic7700x, arch:risc-v, vendor:eswin, experimental + +.. figure:: eic7700-evb.jpg + :align: center + :alt: The ESWIN EIC7700 EVB, a development board carrying the EIC7700X SoC + + ESWIN EIC7700 EVB + +The `EIC7700 EVB `_ +is ESWIN's own evaluation board for the +:doc:`EIC7700X <../../index>` SoC. Where the +:doc:`PINE64 StarPro64 <../starpro64/index>` is a single board computer built +around the chip, the EVB brings out most of the SoC's interfaces, so it is the +board to develop drivers on. + +Features +======== + +* ESWIN EIC7700X, 4 x RV64GC 1.4 GHz RISC-V cores +* 16 GB LPDDR5 +* eMMC, microSD and SPI NOR flash, the last holding the boot firmware +* 2 x Ethernet (GMAC, RGMII) +* 2 x USB 3.0, host and device capable +* HDMI output, with CEC +* PCIe 3.0 slot, and two M.2 slots, for SATA and for a WiFi and Bluetooth + module +* USB serial console, RS232 on a DB9, and further UARTs on the headers +* Expansion headers carrying GPIO, I2C, SPI and PWM +* PWM fan header + +.. warning:: + + This port is under development and drives a subset of the board. + `Peripheral Support`_ below records what it drives. + +Serial Console +============== + +The console is UART0 at **115200 8N1**. It is wired to the on-board FT4232 +USB bridge, so a single USB cable carries it and no separate USB serial +adapter is needed. The bridge presents four ports, of which UART0 is the +third; on Linux that is usually ``/dev/ttyUSB2``, the first of the four +being the JTAG interface: + +.. code:: console + + $ screen /dev/ttyUSB2 115200 + +Buttons and LEDs +================ + +The board has four LEDs on GPIO lines 107 to 110 and one push button, ``OK``, +on GPIO line 6. NuttX does not drive any of them yet. + +Power Supply +============ + +The board is powered through its barrel jack. The core rails, including the +NPU rail, are set by regulators on I2C bus 1, which NuttX leaves alone: the +firmware has already configured them by the time NuttX starts, and writing to +them changes a core voltage. + +RISC-V Toolchain +================ + +Install `xPack GNU RISC-V Embedded GCC (riscv-none-elf) +`_ and +add its ``bin`` directory to ``PATH``, as described for the +:doc:`PINE64 StarPro64 <../starpro64/index>`. + +Building NuttX +============== + +Configure and build: + +.. code:: console + + $ cd nuttx + $ tools/configure.sh eic7700-evb:nsh + $ make + +Then build the applications filesystem and package it with the kernel: + +.. code:: console + + $ make export + $ pushd ../apps + $ tools/mkimport.sh -z -x ../nuttx/nuttx-export-*.tar.gz + $ make import + $ popd + $ boards/risc-v/eic7700x/common/tools/mkimage.sh + +The image is the kernel, then padding, then a RAM disk holding the +applications. Use the script rather than padding by hand: the RAM disk is +found at run time by searching memory for its header, and that search runs +after BSS has been cleared, so the disk has to start above ``_ebss`` or it is +zeroed before anything looks for it. The script reads ``_ebss`` from the +kernel and pads to suit. + +The result is ``Image-eic7700-evb``. + +Booting NuttX +============= + +The board boots over TFTP from U-Boot, as the +:doc:`PINE64 StarPro64 <../starpro64/index>` does. Copy +``Image-eic7700-evb`` and the device tree to the TFTP server: + +.. code:: console + + $ wget https://github.com/lupyuen/nuttx-starpro64/raw/refs/heads/main/eic7700-evb.dtb + $ scp Image-eic7700-evb eic7700-evb.dtb tftpserver:/tftpfolder/ + +Interrupt U-Boot with Ctrl-C at power on and boot the image: + +.. code:: console + + # Change to your TFTP Server + $ setenv tftp_server 192.168.x.x + $ saveenv + $ dhcp ${kernel_addr_r} ${tftp_server}:Image-eic7700-evb + $ tftpboot ${fdt_addr_r} ${tftp_server}:eic7700-evb.dtb + $ fdt addr ${fdt_addr_r} + $ booti ${kernel_addr_r} - ${fdt_addr_r} + +NuttShell appears on the console. + +Configurations +============== + +.. code:: console + + $ tools/configure.sh eic7700-evb: + +nsh +--- + +NuttShell on UART0 at 115200 8N1, with the RAM disk mounted and ``/proc`` +available. Built-in applications are supported; none are enabled. + +Peripheral Support +================== + +NuttX for the EIC7700 EVB supports these peripherals: + +======================== ======= ===== +Peripheral Support NOTES +======================== ======= ===== +UART Yes +======================== ======= ===== diff --git a/Documentation/platforms/risc-v/eic7700x/boards/starpro64/index.rst b/Documentation/platforms/risc-v/eic7700x/boards/starpro64/index.rst index 8e856423164bc..532a2664ade3d 100644 --- a/Documentation/platforms/risc-v/eic7700x/boards/starpro64/index.rst +++ b/Documentation/platforms/risc-v/eic7700x/boards/starpro64/index.rst @@ -2,6 +2,8 @@ PINE64 StarPro64 ================ +.. tags:: chip:eic7700x, arch:risc-v, vendor:pine64, experimental + `PINE64 StarPro64 `_ is a RISC-V Single-Board Computer based on the ESWIN EIC7700X RISC-V SoC with Quad-Core 64-bit RISC-V CPU, 32 GB LPDDR5 RAM and 100 Mbps Ethernet. @@ -89,16 +91,21 @@ This produces the NuttX Kernel ``nuttx.bin``. Next, build the NuttX Apps Filesy $ tools/mkimport.sh -z -x ../nuttx/nuttx-export-*.tar.gz $ make import $ popd - $ genromfs -f initrd -d ../apps/bin -V "NuttXBootVol" - -This generates the Initial RAM Disk ``initrd``. -Package the NuttX Kernel and Initial RAM Disk into a NuttX Image: +Package the NuttX Kernel and the applications into a NuttX Image: .. code:: console - $ head -c 65536 /dev/zero >/tmp/nuttx.pad - $ cat nuttx.bin /tmp/nuttx.pad initrd >Image-starpro64 + $ boards/risc-v/eic7700x/common/tools/mkimage.sh + +The image is the kernel, then padding, then a RAM disk holding the +applications. Use the script rather than padding by hand. The RAM disk is +found at run time by searching memory for its header, and that search runs +after BSS has been cleared, so the disk has to start above ``_ebss`` or it +is zeroed before anything looks for it. The script reads ``_ebss`` from the +kernel and pads to suit; a fixed pad works only until BSS grows past it, and +when it does the board hangs during start up with nothing on the console at +all, because the failure happens before there is a console to report it. The NuttX Image ``Image-starpro64`` will be copied to the TFTP Server in the next step. diff --git a/Documentation/platforms/risc-v/eic7700x/index.rst b/Documentation/platforms/risc-v/eic7700x/index.rst index e54ac50a58193..6fa44ebc45cdb 100644 --- a/Documentation/platforms/risc-v/eic7700x/index.rst +++ b/Documentation/platforms/risc-v/eic7700x/index.rst @@ -2,6 +2,8 @@ ESWIN EIC7700X ============== +.. tags:: chip:eic7700x, arch:risc-v, vendor:eswin + `ESWIN EIC7700X `_ is a 64-bit RISC-V SoC with 4 RISC-V Cores: - **Processors:** 4 x RV64GC 1.4 GHz 64-bit RISC-V Cores diff --git a/arch/risc-v/Kconfig b/arch/risc-v/Kconfig index 1c0c54b3e25fc..6ce72af7af77b 100644 --- a/arch/risc-v/Kconfig +++ b/arch/risc-v/Kconfig @@ -437,6 +437,8 @@ config ARCH_CHIP_SG2000 config ARCH_CHIP_EIC7700X bool "ESWIN EIC7700X" + select ARCH_BOARD_COMMON + select ARCH_HAVE_ELF_EXECUTABLE select ARCH_RV64 select ARCH_RV_ISA_M select ARCH_RV_ISA_A diff --git a/arch/risc-v/src/eic7700x/chip.h b/arch/risc-v/src/eic7700x/chip.h index 7aef3c2791953..dfe5069c09bc1 100644 --- a/arch/risc-v/src/eic7700x/chip.h +++ b/arch/risc-v/src/eic7700x/chip.h @@ -40,13 +40,17 @@ #include "riscv_percpu.h" /**************************************************************************** - * Public Data + * Pre-processor Definitions ****************************************************************************/ -/* Hart ID that booted NuttX (0 to 3) */ +/* The firmware does not hand over on a fixed Hart, so every Hart needs an + * idle stack of its own. With fewer than four, the Hart the firmware picked + * may have no slot and stops in __start before it can restart on Hart 0, + * which fails on some resets and not others. Fail the build instead. + */ -#ifndef __ASSEMBLY__ -extern int g_eic7700x_boot_hart; +#if defined(CONFIG_SMP) && CONFIG_SMP_NCPUS < 4 +# error "CONFIG_SMP_NCPUS must be 4: the firmware may boot NuttX on any Hart" #endif /**************************************************************************** diff --git a/arch/risc-v/src/eic7700x/eic7700x_head.S b/arch/risc-v/src/eic7700x/eic7700x_head.S index 795411b0f99eb..b29257daae669 100644 --- a/arch/risc-v/src/eic7700x/eic7700x_head.S +++ b/arch/risc-v/src/eic7700x/eic7700x_head.S @@ -72,19 +72,42 @@ __start: real_start: - /* Load the number of CPUs that the kernel supports */ + /* Take an idle stack. a0 holds the Hart ID, placed there by whoever + * entered us: the firmware on the first Hart in, and SBI on every Hart + * started afterwards. + */ #ifdef CONFIG_SMP + + /* One slot per CPU, indexed by Hart ID. A Hart outside the set NuttX + * knows about has no slot of its own and must not borrow one, so it stops + * here instead. chip.h refuses to build a configuration in which that + * could be the Hart the firmware handed over on. + */ + li t1, CONFIG_SMP_NCPUS + blt a0, t1, 1f + +2: + csrw CSR_SIE, zero + wfi + j 2b + +1: + riscv_set_inital_sp EIC7700X_IDLESTACK_BASE, SMP_STACK_SIZE, a0 + #else - li t1, 1 -#endif - /* Set stack pointer to the idle thread stack. Assume Hart 0. */ + /* One CPU, so one slot, and it belongs to Hart 0. Any other Hart is here + * only to restart on Hart 0 and park, so it borrows the same slot; the two + * briefly overlap, which is why the SMP path above does not do this. + */ li a2, 0 riscv_set_inital_sp EIC7700X_IDLESTACK_BASE, SMP_STACK_SIZE, a2 +#endif + /* Disable all interrupts (i.e. timer, external) in sie */ csrw CSR_SIE, zero diff --git a/arch/risc-v/src/eic7700x/eic7700x_irq.c b/arch/risc-v/src/eic7700x/eic7700x_irq.c index 7f3f450d1a53b..6d689bafc363b 100644 --- a/arch/risc-v/src/eic7700x/eic7700x_irq.c +++ b/arch/risc-v/src/eic7700x/eic7700x_irq.c @@ -155,8 +155,7 @@ void up_disable_irq(int irq) if (0 <= extirq && extirq <= EIC7700X_PLIC_IRQS) { - addr = EIC7700X_PLIC_ENABLE0 + - (g_eic7700x_boot_hart * EIC7700X_PLIC_ENABLE_HART); + addr = EIC7700X_PLIC_ENABLE_CPU0; modifyreg32(addr + (4 * (extirq / 32)), 1 << (extirq % 32), 0); } @@ -200,8 +199,7 @@ void up_enable_irq(int irq) if (0 <= extirq && extirq <= EIC7700X_PLIC_IRQS) { - addr = EIC7700X_PLIC_ENABLE0 + - (g_eic7700x_boot_hart * EIC7700X_PLIC_ENABLE_HART); + addr = EIC7700X_PLIC_ENABLE_CPU0; modifyreg32(addr + (4 * (extirq / 32)), 0, 1 << (extirq % 32)); } diff --git a/arch/risc-v/src/eic7700x/eic7700x_irq_dispatch.c b/arch/risc-v/src/eic7700x/eic7700x_irq_dispatch.c index 8cadae5a8c5e6..bbdd987cd2150 100644 --- a/arch/risc-v/src/eic7700x/eic7700x_irq_dispatch.c +++ b/arch/risc-v/src/eic7700x/eic7700x_irq_dispatch.c @@ -55,8 +55,7 @@ void *riscv_dispatch_irq(uintptr_t vector, uintptr_t *regs) { int irq = (vector >> RV_IRQ_MASK) | (vector & 0xf); - uintptr_t claim = EIC7700X_PLIC_CLAIM0 + - (g_eic7700x_boot_hart * EIC7700X_PLIC_CLAIM_HART); + uintptr_t claim = EIC7700X_PLIC_CLAIM_CPU0; /* Firstly, check if the irq is machine external interrupt */ diff --git a/arch/risc-v/src/eic7700x/eic7700x_mm_init.c b/arch/risc-v/src/eic7700x/eic7700x_mm_init.c index 2b68d6c721c76..60ea2ee6f6d1f 100644 --- a/arch/risc-v/src/eic7700x/eic7700x_mm_init.c +++ b/arch/risc-v/src/eic7700x/eic7700x_mm_init.c @@ -237,8 +237,16 @@ void eic7700x_kernel_mappings(void) binfo("map kernel text\n"); map_region(KFLASH_START, KFLASH_START, KFLASH_SIZE, MMU_KTEXT_FLAGS); + /* The kernel data region is mapped with 2 MiB pages rather than through + * map_region()'s 4 KiB ones. Everything in it, data, bss, the page + * tables, the idle stacks and the whole kernel heap, carries the same + * permissions, so the finer granularity buys nothing while costing one L3 + * slab per 2 MiB from a pool of exactly two. + */ + binfo("map kernel data\n"); - map_region(KSRAM_START, KSRAM_START, KSRAM_SIZE, MMU_KDATA_FLAGS); + mmu_ln_map_region(2, PGT_L2_VBASE, KSRAM_START, KSRAM_START, + KSRAM_SIZE, MMU_KDATA_FLAGS); /* Connect the L1 and L2 page tables for the kernel text and data */ @@ -250,6 +258,14 @@ void eic7700x_kernel_mappings(void) binfo("map the page pool\n"); mmu_ln_map_region(2, PGT_L2_VBASE, PGPOOL_START, PGPOOL_START, PGPOOL_SIZE, MMU_KDATA_FLAGS); + + /* Map the RAM disk. The page pool no longer covers it, so it needs its + * own mapping or the first read of /dev/ram0 faults. + */ + + binfo("map the RAM disk\n"); + mmu_ln_map_region(2, PGT_L2_VBASE, RAMDISK_START, RAMDISK_START, + RAMDISK_SIZE, MMU_KDATA_FLAGS); } /**************************************************************************** diff --git a/arch/risc-v/src/eic7700x/eic7700x_pgalloc.c b/arch/risc-v/src/eic7700x/eic7700x_pgalloc.c index 463b39d6ccf2e..81095a6c4e714 100644 --- a/arch/risc-v/src/eic7700x/eic7700x_pgalloc.c +++ b/arch/risc-v/src/eic7700x/eic7700x_pgalloc.c @@ -31,6 +31,21 @@ #include #include +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* The granule allocator behind mm_pgalloc() counts its pages in a uint16_t, + * and gran_initialize() refuses a pool with more than UINT16_MAX of them, + * returning NULL. mm_pginitialize() then asserts, so an oversized pool is a + * board that does not boot rather than a board with less memory than asked + * for. See mm/mm_gran/mm_gran.h and mm/mm_gran/mm_graninit.c. + */ + +#if (CONFIG_ARCH_PGPOOL_SIZE / CONFIG_MM_PGSIZE) > 65535 +# error "Page pool has more pages than the granule allocator can count" +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -50,6 +65,18 @@ void up_allocate_pgheap(void **heap_start, size_t *heap_size) { DEBUGASSERT(heap_start && heap_size); + /* The linker script and Kconfig describe this pool separately, and both + * descriptions are used: the size below comes from the linker, while + * riscv_pgvaddr() decides whether a page is in the pool using the Kconfig + * values. If they disagree, pages outside the smaller of the two get a + * virtual address of zero and are then written through, which on this SoC + * lands on the identity mapped low memory rather than faulting. Say so + * here instead of finding out that way. + */ + + DEBUGASSERT(PGPOOL_START == CONFIG_ARCH_PGPOOL_PBASE); + DEBUGASSERT(PGPOOL_SIZE == CONFIG_ARCH_PGPOOL_SIZE); + *heap_start = (void *)PGPOOL_START; *heap_size = (size_t)PGPOOL_SIZE; } diff --git a/arch/risc-v/src/eic7700x/eic7700x_start.c b/arch/risc-v/src/eic7700x/eic7700x_start.c index 8c55cf3538270..e2f9ff2e45830 100644 --- a/arch/risc-v/src/eic7700x/eic7700x_start.c +++ b/arch/risc-v/src/eic7700x/eic7700x_start.c @@ -50,11 +50,6 @@ #define showprogress(c) #endif -/* SBI Extension ID and Function ID for Hart Start */ - -#define SBI_EXT_HSM 0x0048534D -#define SBI_EXT_HSM_HART_START 0x0 - /**************************************************************************** * Extern Function Declarations ****************************************************************************/ @@ -63,12 +58,20 @@ extern void __start(void); extern void __trap_vec(void); /**************************************************************************** - * Public Data + * Private Data ****************************************************************************/ -/* Hart ID that booted NuttX (0 to 3) */ +/* Hart the firmware handed control to, which is not necessarily the one + * NuttX ends up running on: OpenSBI picks it, and it does not pick the same + * one every time. Recorded by whichever Hart arrives first, before it + * restarts on Hart 0. + * + * This lives in .data rather than .bss, and the non zero initialiser is what + * puts it there. It is read before eic7700x_clear_bss() and has to survive + * it. + */ -int g_eic7700x_boot_hart = -1; +static int g_eic7700x_handoff_hart = -1; /**************************************************************************** * Private Functions @@ -182,77 +185,75 @@ static void eic7700x_copy_ramdisk(void) } /**************************************************************************** - * Name: sbi_ecall + * Name: boot_secondary * * Description: - * Make a RISC-V ECALL to OpenSBI. + * Ask OpenSBI to start a Hart at the given address. The opaque argument + * the SBI call carries to the Hart is unused: eic7700x_start() takes only + * the Hart ID, which SBI supplies itself. * * Input Parameters: - * extid - Extension ID - * fid - Function ID - * parm0 to parm5 - Parameters to be passed + * hartid - Hart ID + * addr - Start Address * * Returned Value: - * Error and Value returned by OpenSBI. + * OK on success, or a negated errno on failure. * ****************************************************************************/ -static sbiret_t sbi_ecall(unsigned int extid, unsigned int fid, - uintreg_t parm0, uintreg_t parm1, - uintreg_t parm2, uintreg_t parm3, - uintreg_t parm4, uintreg_t parm5) +static int boot_secondary(uintreg_t hartid, uintreg_t addr) { - register long r0 asm("a0") = (long)(parm0); - register long r1 asm("a1") = (long)(parm1); - register long r2 asm("a2") = (long)(parm2); - register long r3 asm("a3") = (long)(parm3); - register long r4 asm("a4") = (long)(parm4); - register long r5 asm("a5") = (long)(parm5); - register long r6 asm("a6") = (long)(fid); - register long r7 asm("a7") = (long)(extid); - sbiret_t ret; - - asm volatile - ( - "ecall" - : "+r"(r0), "+r"(r1) - : "r"(r2), "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7) - : "memory" - ); - - ret.error = r0; - ret.value = (uintreg_t)r1; + int ret = riscv_sbi_boot_secondary(hartid, addr, 0); + + if (ret < 0) + { + _err("Boot Hart %d failed: %d\n", (int)hartid, ret); + } return ret; } /**************************************************************************** - * Name: boot_secondary + * Name: eic7700x_boot_harts * * Description: - * Call OpenSBI to boot the Hart, starting at the specified address. + * Release every Hart other than this one, each entering at __start. * - * Input Parameters: - * hartid - Hart ID - * addr - Start Address + * Hart 0 is always among them, unless this already is Hart 0. NuttX runs + * CPU0 on Hart 0 whichever Hart the firmware chose, because that is the + * only Hart riscv_set_inital_sp() gives a whole idle stack to; the others + * keep a frame back for the state up_initial_state() writes onto the stack + * they are already running on. * - * Returned Value: - * OK is always returned. + * The Harts released here reach riscv_cpu_boot() and wait there for the + * IPI that nx_smp_start() sends much later, so this returning says only + * that SBI accepted them, not that they have arrived. + * + * Input Parameters: + * mhartid - The Hart calling this, which is not started again * ****************************************************************************/ -static int boot_secondary(uintreg_t hartid, uintreg_t addr) +static void eic7700x_boot_harts(int mhartid) { - sbiret_t ret = sbi_ecall(SBI_EXT_HSM, SBI_EXT_HSM_HART_START, - hartid, addr, 0, 0, 0, 0); +#ifdef CONFIG_SMP + int hart; - if (ret.error < 0) + for (hart = 0; hart < CONFIG_SMP_NCPUS; hart++) { - _err("Boot Hart %d failed\n", hartid); - PANIC(); + if (hart != mhartid && boot_secondary(hart, (uintptr_t)&__start) < 0) + { + PANIC(); + } } +#else + /* One CPU, so Hart 0 is the only one wanted, and only if this is not it */ - return 0; + if (mhartid != 0 && boot_secondary(0, (uintptr_t)&__start) < 0) + { + PANIC(); + } +#endif } /**************************************************************************** @@ -295,7 +296,9 @@ void eic7700x_start_s(int mhartid) riscv_fpuconfig(); - if (mhartid != g_eic7700x_boot_hart) + /* CPU0 is Hart 0. See eic7700x_boot_harts() for why it has to be. */ + + if (mhartid != 0) { goto cpux; } @@ -308,6 +311,15 @@ void eic7700x_start_s(int mhartid) riscv_earlyserialinit(); #endif + /* The console only exists from here, so this is the earliest the Hart the + * firmware chose can be reported. It is worth reporting because nothing + * else in NuttX depends on it today, while everything about bringing up + * the other Harts does. + */ + + _info("Firmware handed off on Hart %d, NuttX running on Hart %d\n", + g_eic7700x_handoff_hart, mhartid); + /* Setup page tables for kernel and enable MMU */ showprogress('B'); @@ -345,44 +357,54 @@ void eic7700x_start_s(int mhartid) void eic7700x_start(int mhartid) { - /* If Boot Hart is not 0, restart with Hart 0 */ + /* Whichever Hart arrives first is the one the firmware chose, and it owns + * the one time setup. Everything below that only Hart does has to happen + * before any other Hart is released, since the BSS clear would otherwise + * run underneath them. + * + * The guard is read before the BSS is cleared, which is why it lives in + * .data. + */ - if (mhartid != 0) + if (g_eic7700x_handoff_hart < 0) { + g_eic7700x_handoff_hart = mhartid; + /* Clear the BSS */ eic7700x_clear_bss(); - /* Restart with Hart 0 */ + /* Copy the RAM Disk */ + + eic7700x_copy_ramdisk(); - boot_secondary(0, (uintptr_t)&__start); + /* Release the others, Hart 0 among them */ - /* Let this Hart idle forever */ + eic7700x_boot_harts(mhartid); + } +#ifndef CONFIG_SMP + /* One CPU, and it is Hart 0. A Hart that came here only to hand over has + * nothing further to do. It borrowed Hart 0's idle stack to get this far, + * so the sooner it stops using that stack the better. + */ + + if (mhartid != 0) + { while (true) { asm("WFI"); } - - PANIC(); /* Should not come here */ } +#endif - /* Init the globals once only. Remember the Boot Hart. */ + /* Only the Hart that goes on to run CPU0 registers itself here. The rest + * are registered by riscv_cpu_boot() once their IPI arrives, and a Hart + * that took a slot twice would exhaust a free list sized by the CPU count. + */ - if (g_eic7700x_boot_hart < 0) + if (mhartid == 0) { - g_eic7700x_boot_hart = mhartid; - - /* Clear the BSS */ - - eic7700x_clear_bss(); - - /* Copy the RAM Disk */ - - eic7700x_copy_ramdisk(); - - /* Initialize the per CPU areas */ - riscv_percpu_add_hart(mhartid); } diff --git a/arch/risc-v/src/eic7700x/hardware/eic7700x_plic.h b/arch/risc-v/src/eic7700x/hardware/eic7700x_plic.h index 0c9927a7bfebf..2e84fe631a5da 100644 --- a/arch/risc-v/src/eic7700x/hardware/eic7700x_plic.h +++ b/arch/risc-v/src/eic7700x/hardware/eic7700x_plic.h @@ -52,4 +52,21 @@ #define EIC7700X_PLIC_CLAIM0 (EIC7700X_PLIC_BASE + 0x201004) #define EIC7700X_PLIC_CLAIM_HART 0x2000 +/* The context every external interrupt is delivered to. + * + * The PLIC gives each Hart two contexts, M mode followed by S mode, which is + * why the strides above are twice a context: ENABLE0, THRESHOLD0 and CLAIM0 + * are Hart 0's S mode context, and one stride steps over the next Hart's M + * mode context to reach its S mode one. + * + * NuttX enables a source in one context only, CPU0's, so CPU0 is the only + * Hart that can be interrupted by it and the dispatcher claims from the same + * context that enabled it. That is a decision, not a limit of the hardware: + * steering a source at another Hart means choosing which, and NuttX has no + * way for a driver to say. CPU0 is Hart 0, so these are the base addresses. + */ + +#define EIC7700X_PLIC_ENABLE_CPU0 (EIC7700X_PLIC_ENABLE0) +#define EIC7700X_PLIC_CLAIM_CPU0 (EIC7700X_PLIC_CLAIM0) + #endif /* __ARCH_RISCV_SRC_EIC7700X_HARDWARE_EIC7700X_PLIC_H */ diff --git a/boards/Kconfig b/boards/Kconfig index 0eca78c8a968c..00e0db502fd4e 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -2404,6 +2404,37 @@ config ARCH_BOARD_EIC7700X_STARPRO64 This options selects support for NuttX on PINE64 StarPro64 based on ESWIN EIC7700X SoC. + UART0 is the console. There is no USB serial bridge on the + board, so it comes out level shifted to 3.3V on the 40 pin GPIO + header, transmit on pin 8 and receive on pin 10, which is where + a Raspberry Pi puts them too. + + UART1 carries the Bluetooth HCI of the on board AIC8800D80 WiFi + and Bluetooth combo, CTS and RTS included. + + Nothing else here is a UART, in spite of the UART map on sheet 3 + of the schematic. That table came from ESWIN's reference design + and does not describe this board: GPIO62, which is the UART2_TX + pad, drives the system state LED, GPIO63 is unconnected, the + UART3 pads carry I2C8, and the UART4 pads go nowhere. + +config ARCH_BOARD_EIC7700X_EVB + bool "ESWIN EIC7700 EVB" + depends on ARCH_CHIP_EIC7700X + ---help--- + ESWIN's own evaluation board for the EIC7700X, which U-Boot + identifies as "ESWIN EIC7700 EVB" and whose schematic calls it + ESWIN-EIC7700FG-LP4X-A1. + + UART0 is the console, on the FT4232 USB-C serial bridge. UART1 + goes to the Bluetooth M.2 Key-E connector, CTS and RTS included, + and is also broken out on the six pin header J97. UART2 goes to + the RS232 transceiver and its DB9 connector. UART3 and UART4 + are unused. + + The four boot select pads, GPIO107 to GPIO110, each drive a + system LED once the straps have been sampled. + config ARCH_BOARD_S32K118EVB bool "NXP S32K118EVB" depends on ARCH_CHIP_S32K118 @@ -3998,6 +4029,7 @@ config ARCH_BOARD default "ox64" if ARCH_BOARD_BL808_OX64 default "milkv_duos" if ARCH_BOARD_SG2000_MILKV_DUOS default "starpro64" if ARCH_BOARD_EIC7700X_STARPRO64 + default "eic7700-evb" if ARCH_BOARD_EIC7700X_EVB default "sabre-6quad" if ARCH_BOARD_SABRE_6QUAD default "a2g-tc397-5v-tft" if ARCH_BOARD_A2G_TC397_5V_TFT default "triboard_tc4x9_com" if ARCH_BOARD_TRIBOARD_TC4X9_COM @@ -5089,6 +5121,9 @@ endif if ARCH_BOARD_EIC7700X_STARPRO64 source "boards/risc-v/eic7700x/starpro64/Kconfig" endif +if ARCH_BOARD_EIC7700X_EVB +source "boards/risc-v/eic7700x/eic7700-evb/Kconfig" +endif if ARCH_BOARD_ESP32C3_LEGACY_DEVKIT source "boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/Kconfig" endif diff --git a/boards/risc-v/eic7700x/common/.gitignore b/boards/risc-v/eic7700x/common/.gitignore new file mode 100644 index 0000000000000..cc92d189b53c2 --- /dev/null +++ b/boards/risc-v/eic7700x/common/.gitignore @@ -0,0 +1,2 @@ +etctmp +etctmp.c diff --git a/boards/risc-v/eic7700x/starpro64/src/Makefile b/boards/risc-v/eic7700x/common/Makefile similarity index 88% rename from boards/risc-v/eic7700x/starpro64/src/Makefile rename to boards/risc-v/eic7700x/common/Makefile index 4c1536de06fee..e93815e065b12 100644 --- a/boards/risc-v/eic7700x/starpro64/src/Makefile +++ b/boards/risc-v/eic7700x/common/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# boards/risc-v/eic7700x/starpro64/src/Makefile +# boards/risc-v/eic7700x/common/Makefile # # SPDX-License-Identifier: Apache-2.0 # @@ -22,8 +22,10 @@ include $(TOPDIR)/Make.defs -RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS +include board/Make.defs +include src/Make.defs -CSRCS = eic7700x_boardinit.c +DEPPATH += --dep-path board +DEPPATH += --dep-path src include $(TOPDIR)/boards/Board.mk diff --git a/boards/risc-v/eic7700x/starpro64/src/etc/init.d/rc.sysinit b/boards/risc-v/eic7700x/common/etc/init.d/rc.sysinit similarity index 100% rename from boards/risc-v/eic7700x/starpro64/src/etc/init.d/rc.sysinit rename to boards/risc-v/eic7700x/common/etc/init.d/rc.sysinit diff --git a/boards/risc-v/eic7700x/starpro64/src/etc/init.d/rcS b/boards/risc-v/eic7700x/common/etc/init.d/rcS similarity index 100% rename from boards/risc-v/eic7700x/starpro64/src/etc/init.d/rcS rename to boards/risc-v/eic7700x/common/etc/init.d/rcS diff --git a/boards/risc-v/eic7700x/starpro64/scripts/Make.defs b/boards/risc-v/eic7700x/common/scripts/Make.defs similarity index 93% rename from boards/risc-v/eic7700x/starpro64/scripts/Make.defs rename to boards/risc-v/eic7700x/common/scripts/Make.defs index d885c4a4f99e4..21cc6cdeffcb8 100644 --- a/boards/risc-v/eic7700x/starpro64/scripts/Make.defs +++ b/boards/risc-v/eic7700x/common/scripts/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/risc-v/eic7700x/starpro64/scripts/Make.defs +# boards/risc-v/eic7700x/common/scripts/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -25,7 +25,7 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/risc-v/src/common/Toolchain.defs LDSCRIPT = ld.script -ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) +ARCHSCRIPT += $(call FINDSCRIPT,$(LDSCRIPT)) CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) diff --git a/boards/risc-v/eic7700x/starpro64/scripts/ld.script b/boards/risc-v/eic7700x/common/scripts/ld.script similarity index 75% rename from boards/risc-v/eic7700x/starpro64/scripts/ld.script rename to boards/risc-v/eic7700x/common/scripts/ld.script index b4e6a8fb91b62..795d4805dcb5d 100644 --- a/boards/risc-v/eic7700x/starpro64/scripts/ld.script +++ b/boards/risc-v/eic7700x/common/scripts/ld.script @@ -20,12 +20,26 @@ * ****************************************************************************/ +/* The SoC has 16 GiB of LPDDR5 and this describes 960 MiB of it, which is as + * much as the design can currently use. Three things decide that: + * + * - The kernel's RAM mapping hangs off a single 512 entry L2 page table at + * L1 index 2, so it reaches 0x80000000 to 0xc0000000 and no further. + * - The page pool cannot exceed 65535 pages, because the granule allocator + * behind mm_pgalloc() counts them in a uint16_t. At 4 KiB that is just + * under 256 MiB. + * - Nothing yet allocates enough for the rest to be worth mapping. + * + * Every boundary is 2 MiB aligned because everything except kflash is mapped + * with 2 MiB pages. 480 of the 512 L2 entries are used. + */ + MEMORY { kflash (rx) : ORIGIN = 0x80200000, LENGTH = 2048K /* w/ cache */ - ksram (rwx) : ORIGIN = 0x80400000, LENGTH = 2048K /* w/ cache */ - pgram (rwx) : ORIGIN = 0x80600000, LENGTH = 4096K /* w/ cache */ - ramdisk (rwx) : ORIGIN = 0x80A00000, LENGTH = 16M /* w/ cache */ + ksram (rwx) : ORIGIN = 0x80400000, LENGTH = 640M /* w/ cache */ + pgram (rwx) : ORIGIN = 0xA8400000, LENGTH = 254M /* w/ cache */ + ramdisk (rwx) : ORIGIN = 0xB8200000, LENGTH = 64M /* w/ cache */ } OUTPUT_ARCH("riscv") @@ -38,10 +52,17 @@ __ksram_start = ORIGIN(ksram); __ksram_size = LENGTH(ksram); __ksram_end = ORIGIN(ksram) + LENGTH(ksram); -/* Page heap */ +/* Page heap. + * + * This is pgram and nothing else. The RAM disk must not be part of it: the + * page allocator hands its pages out to user address environments, and there + * is nothing anywhere in NuttX that holds a region back from it, so a pool + * that covers the RAM disk is a pool that eventually returns pages of the + * mounted file system. + */ __pgheap_start = ORIGIN(pgram); -__pgheap_size = LENGTH(pgram) + LENGTH(ramdisk); +__pgheap_size = LENGTH(pgram); /* Application ramdisk */ diff --git a/boards/risc-v/eic7700x/common/src/Make.defs b/boards/risc-v/eic7700x/common/src/Make.defs new file mode 100644 index 0000000000000..08696495e1b4e --- /dev/null +++ b/boards/risc-v/eic7700x/common/src/Make.defs @@ -0,0 +1,33 @@ +############################################################################ +# boards/risc-v/eic7700x/common/src/Make.defs +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +ifeq ($(CONFIG_ARCH_BOARD_COMMON),y) + +CSRCS += eic7700x_boot.c + +RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS + +DEPPATH += --dep-path src +VPATH += :src +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)src + +endif diff --git a/boards/risc-v/eic7700x/starpro64/src/eic7700x_boardinit.c b/boards/risc-v/eic7700x/common/src/eic7700x_boot.c similarity index 96% rename from boards/risc-v/eic7700x/starpro64/src/eic7700x_boardinit.c rename to boards/risc-v/eic7700x/common/src/eic7700x_boot.c index a712fd760d638..9788924113b46 100644 --- a/boards/risc-v/eic7700x/starpro64/src/eic7700x_boardinit.c +++ b/boards/risc-v/eic7700x/common/src/eic7700x_boot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/risc-v/eic7700x/starpro64/src/eic7700x_boardinit.c + * boards/risc-v/eic7700x/common/src/eic7700x_boot.c * * SPDX-License-Identifier: Apache-2.0 * @@ -37,6 +37,8 @@ #include #include +#include "board_config.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -118,8 +120,10 @@ void board_late_initialize(void) mount_ramdisk(); - /* Perform board-specific initialization */ - mount(NULL, "/proc", "procfs", 0, NULL); + + /* Devices whose presence or order is this board's business */ + + eic7700x_bringup(); } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/risc-v/eic7700x/common/tools/mkimage.sh b/boards/risc-v/eic7700x/common/tools/mkimage.sh new file mode 100755 index 0000000000000..fdea867eb01cf --- /dev/null +++ b/boards/risc-v/eic7700x/common/tools/mkimage.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash +############################################################################ +# boards/risc-v/eic7700x/common/tools/mkimage.sh +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ +# +# Build the bootable image: the kernel, then padding, then the RAM disk. +# +# The padding is computed rather than fixed, and that is the whole point of +# this script. The RAM disk is appended to the kernel and found at run time +# by searching memory for its header, and that search happens after BSS has +# been cleared. So the disk has to start above _ebss or it is zeroed before +# anything looks for it. A fixed pad works only until BSS grows past it, +# and when it does the failure is a panic before the console exists, which +# looks like a board that hangs with no output at all. The kernel's own +# sanity check compares against the idle stack top, which sits below BSS +# rather than above it, so it does not catch this either. +# +# Usage: +# mkimage.sh [-o output] [-a apps-dir] [-n nm-tool] [-l load-addr] +# +# The default output name is Image-, taken from the configuration, +# so each board's image names itself. +# +# Run from the nuttx directory after "make" and after the apps have been +# built and installed into their bin directory. + +set -e + +APPSDIR="../apps" +BOARD=$(sed -n 's/^CONFIG_ARCH_BOARD="\(.*\)"$/\1/p' .config 2>/dev/null) +OUTPUT="Image-${BOARD:-eic7700x}" +NM="${CROSSDEV:-riscv-none-elf-}nm" +LOADADDR="0x80200000" +MARGIN=$((64 * 1024)) + +usage() +{ + sed -n '25,43p' "$0" + echo + echo " -o output image (default: $OUTPUT)" + echo " -a apps directory (default: $APPSDIR)" + echo " -n nm for the target (default: $NM)" + echo " -l kernel load address (default: $LOADADDR)" + exit 1 +} + +while getopts "o:a:n:l:h" opt; do + case $opt in + o) OUTPUT="$OPTARG" ;; + a) APPSDIR="$OPTARG" ;; + n) NM="$OPTARG" ;; + l) LOADADDR="$OPTARG" ;; + *) usage ;; + esac +done + +if [ ! -f nuttx ] || [ ! -f nuttx.bin ]; then + echo "mkimage: run this from the nuttx directory after make" >&2 + exit 1 +fi + +if [ ! -d "$APPSDIR/bin" ]; then + echo "mkimage: no $APPSDIR/bin; build and install the apps first" >&2 + exit 1 +fi + +# Where BSS ends, which is the earliest the RAM disk may start. + +EBSS=$("$NM" nuttx | awk '/ _ebss$/ { print $1 }') +if [ -z "$EBSS" ]; then + echo "mkimage: no _ebss in nuttx; is $NM right for this target?" >&2 + exit 1 +fi + +TMPDIR_="$(mktemp -d)" +trap 'rm -rf "$TMPDIR_"' EXIT + +genromfs -f "$TMPDIR_/initrd" -d "$APPSDIR/bin" -V "NuttXBootVol" + +# Pad so that the disk lands past the end of BSS, with a margin. wc -c is +# used rather than stat, whose flags differ between GNU and BSD. + +BINSZ=$(wc -c < nuttx.bin) +NEED=$(( 0x$EBSS - LOADADDR + MARGIN )) +PAD=$(( NEED - BINSZ )) +if [ "$PAD" -lt 0 ]; then + PAD=0 +fi + +head -c "$PAD" /dev/zero > "$TMPDIR_/pad" +cat nuttx.bin "$TMPDIR_/pad" "$TMPDIR_/initrd" > "$OUTPUT" + +printf '%s: _ebss 0x%s, kernel %s, pad %s, disk at %s\n' \ + "$OUTPUT" "$EBSS" "$BINSZ" "$PAD" "$(( BINSZ + PAD ))" diff --git a/boards/risc-v/eic7700x/eic7700-evb/Kconfig b/boards/risc-v/eic7700x/eic7700-evb/Kconfig new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/boards/risc-v/eic7700x/eic7700-evb/configs/nsh/defconfig b/boards/risc-v/eic7700x/eic7700-evb/configs/nsh/defconfig new file mode 100644 index 0000000000000..29b3d6c5483aa --- /dev/null +++ b/boards/risc-v/eic7700x/eic7700-evb/configs/nsh/defconfig @@ -0,0 +1,119 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_DISABLE_OS_API is not set +# CONFIG_NSH_DISABLE_LOSMART is not set +CONFIG_16550_ADDRWIDTH=0 +CONFIG_16550_DLF_SIZE=4 +CONFIG_16550_REGINCR=4 +CONFIG_16550_UART0=y +CONFIG_16550_UART0_BASE=0x50900000 +CONFIG_16550_UART0_CLOCK=200000000 +CONFIG_16550_UART0_IRQ=125 +CONFIG_16550_UART0_SERIAL_CONSOLE=y +CONFIG_16550_UART1=y +CONFIG_16550_UART1_BASE=0x50910000 +CONFIG_16550_UART1_CLOCK=200000000 +CONFIG_16550_UART1_IRQ=126 +CONFIG_16550_UART2=y +CONFIG_16550_UART2_BASE=0x50920000 +CONFIG_16550_UART2_CLOCK=200000000 +CONFIG_16550_UART2_IRQ=127 +CONFIG_16550_UART=y +CONFIG_16550_WAIT_LCR=y +CONFIG_ARCH="risc-v" +CONFIG_ARCH_ADDRENV=y +CONFIG_ARCH_BOARD="eic7700-evb" +CONFIG_ARCH_BOARD_COMMON=y +CONFIG_ARCH_BOARD_EIC7700X_EVB=y +CONFIG_ARCH_CHIP="eic7700x" +CONFIG_ARCH_CHIP_EIC7700X=y +CONFIG_ARCH_DATA_NPAGES=128 +CONFIG_ARCH_DATA_VBASE=0xC0100000 +CONFIG_ARCH_HEAP_NPAGES=128 +CONFIG_ARCH_HEAP_VBASE=0xC0200000 +CONFIG_ARCH_INTERRUPTSTACK=2048 +CONFIG_ARCH_KERNEL_STACKSIZE=3072 +CONFIG_ARCH_PGPOOL_MAPPING=y +CONFIG_ARCH_PGPOOL_PBASE=0xA8400000 +CONFIG_ARCH_PGPOOL_SIZE=266338304 +CONFIG_ARCH_PGPOOL_VBASE=0xA8400000 +CONFIG_ARCH_RISCV=y +CONFIG_ARCH_STACKDUMP=y +CONFIG_ARCH_TEXT_NPAGES=128 +CONFIG_ARCH_TEXT_VBASE=0xC0000000 +CONFIG_ARCH_USE_MMU=y +CONFIG_ARCH_USE_MPU=y +CONFIG_ARCH_USE_S_MODE=y +CONFIG_BINFMT_ELF_EXECUTABLE=y +CONFIG_BOARDCTL_ROMDISK=y +CONFIG_BOARD_LOOPSPERMSEC=1120 +CONFIG_BUILD_KERNEL=y +CONFIG_DEBUG_ASSERTIONS=y +CONFIG_DEBUG_ASSERTIONS_EXPRESSION=y +CONFIG_DEBUG_FEATURES=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_FS_ERROR=y +CONFIG_DEBUG_FULLOPT=y +CONFIG_DEBUG_MM=y +CONFIG_DEBUG_MM_ERROR=y +CONFIG_DEBUG_SCHED=y +CONFIG_DEBUG_SYMBOLS=y +CONFIG_DEFAULT_TASK_STACKSIZE=8192 +CONFIG_ELF=y +CONFIG_ELF_STACKSIZE=2048 +CONFIG_EXAMPLES_HELLO=m +CONFIG_FS_PROCFS=y +CONFIG_FS_ROMFS=y +CONFIG_IDLETHREAD_STACKSIZE=3072 +CONFIG_INIT_FILEPATH="/system/bin/init" +CONFIG_INIT_MOUNT=y +CONFIG_INIT_MOUNT_FLAGS=0x1 +CONFIG_INIT_MOUNT_TARGET="/system/bin" +CONFIG_INTELHEX_BINARY=y +CONFIG_IRQ_WORK_STACKSIZE=2048 +CONFIG_LIBC_ENVPATH=y +CONFIG_LIBC_EXECFUNCS=y +CONFIG_LIBC_PERROR_STDOUT=y +CONFIG_LIBC_STRERROR=y +CONFIG_MM_PGALLOC=y +CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_FILE_APPS=y +CONFIG_NSH_READLINE=y +CONFIG_PATH_INITIAL="/system/bin" +CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=2048 +CONFIG_RAMLOG=y +CONFIG_RAMLOG_BUFSIZE=32768 +CONFIG_RAMLOG_SYSLOG=y +CONFIG_RAM_SIZE=1006632960 +CONFIG_RAM_START=0x80200000 +CONFIG_RAW_BINARY=y +CONFIG_READLINE_CMD_HISTORY=y +CONFIG_RISCV_STRING_FUNCTION=y +CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_BACKTRACE=y +CONFIG_SCHED_CPULOAD_SYSCLK=y +CONFIG_SCHED_HAVE_PARENT=y +CONFIG_SCHED_LPNTHREADS=2 +CONFIG_SCHED_LPWORK=y +CONFIG_SCHED_WAITPID=y +CONFIG_SERIAL_UART_ARCH_MMIO=y +CONFIG_SMP=y +CONFIG_STACKCHECK_MARGIN=128 +CONFIG_STACK_COLORATION=y +CONFIG_START_MONTH=12 +CONFIG_START_YEAR=2021 +CONFIG_SYMTAB_ORDEREDBYNAME=y +CONFIG_SYSLOG_DEFAULT=y +CONFIG_SYSLOG_MAX_CHANNELS=2 +CONFIG_SYSTEM_NSH=y +CONFIG_SYSTEM_NSH_PROGNAME="init" +CONFIG_TESTING_GETPRIME=y +CONFIG_TESTING_OSTEST=y +CONFIG_TESTING_SMP=y +CONFIG_USEC_PER_TICK=1000 diff --git a/boards/risc-v/eic7700x/eic7700-evb/include/board.h b/boards/risc-v/eic7700x/eic7700-evb/include/board.h new file mode 100644 index 0000000000000..791c948206d9b --- /dev/null +++ b/boards/risc-v/eic7700x/eic7700-evb/include/board.h @@ -0,0 +1,70 @@ +/**************************************************************************** + * boards/risc-v/eic7700x/eic7700-evb/include/board.h + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __BOARDS_RISCV_EIC7700X_EIC7700_EVB_INCLUDE_BOARD_H +#define __BOARDS_RISCV_EIC7700X_EIC7700_EVB_INCLUDE_BOARD_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: eic7700x_boardinitialize + ****************************************************************************/ + +void eic7700x_boardinitialize(void); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif +#endif /* __ASSEMBLY__ */ +#endif /* __BOARDS_RISCV_EIC7700X_EIC7700_EVB_INCLUDE_BOARD_H */ diff --git a/boards/risc-v/eic7700x/eic7700-evb/include/board_memorymap.h b/boards/risc-v/eic7700x/eic7700-evb/include/board_memorymap.h new file mode 100644 index 0000000000000..d8f84172c4a27 --- /dev/null +++ b/boards/risc-v/eic7700x/eic7700-evb/include/board_memorymap.h @@ -0,0 +1,85 @@ +/**************************************************************************** + * boards/risc-v/eic7700x/eic7700-evb/include/board_memorymap.h + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __BOARDS_RISCV_EIC7700X_EIC7700_EVB_INCLUDE_BOARD_MEMORYMAP_H +#define __BOARDS_RISCV_EIC7700X_EIC7700_EVB_INCLUDE_BOARD_MEMORYMAP_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Kernel code memory (RX) */ + +#define KFLASH_START (uintptr_t)__kflash_start +#define KFLASH_SIZE (uintptr_t)__kflash_size +#define KSRAM_START (uintptr_t)__ksram_start +#define KSRAM_SIZE (uintptr_t)__ksram_size +#define KSRAM_END (uintptr_t)__ksram_end + +/* Kernel RAM (RW) */ + +#define PGPOOL_START (uintptr_t)__pgheap_start +#define PGPOOL_SIZE (uintptr_t)__pgheap_size + +/* Page pool (RWX) */ + +#define PGPOOL_START (uintptr_t)__pgheap_start +#define PGPOOL_SIZE (uintptr_t)__pgheap_size +#define PGPOOL_END (PGPOOL_START + PGPOOL_SIZE) + +/* Ramdisk (RW) */ + +#define RAMDISK_START (uintptr_t)__ramdisk_start +#define RAMDISK_SIZE (uintptr_t)__ramdisk_size + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* Kernel code memory (RX) */ + +extern uint8_t __kflash_start[]; +extern uint8_t __kflash_size[]; + +/* Kernel RAM (RW) */ + +extern uint8_t __ksram_start[]; +extern uint8_t __ksram_size[]; +extern uint8_t __ksram_end[]; + +/* Page pool (RWX) */ + +extern uint8_t __pgheap_start[]; +extern uint8_t __pgheap_size[]; + +/* Ramdisk (RW) */ + +extern uint8_t __ramdisk_start[]; +extern uint8_t __ramdisk_size[]; + +#endif /* __BOARDS_RISCV_EIC7700X_EIC7700_EVB_INCLUDE_BOARD_MEMORYMAP_H */ diff --git a/boards/risc-v/eic7700x/eic7700-evb/src/.gitignore b/boards/risc-v/eic7700x/eic7700-evb/src/.gitignore new file mode 100644 index 0000000000000..cc92d189b53c2 --- /dev/null +++ b/boards/risc-v/eic7700x/eic7700-evb/src/.gitignore @@ -0,0 +1,2 @@ +etctmp +etctmp.c diff --git a/boards/risc-v/eic7700x/eic7700-evb/src/Make.defs b/boards/risc-v/eic7700x/eic7700-evb/src/Make.defs new file mode 100644 index 0000000000000..ab77ae5d568cf --- /dev/null +++ b/boards/risc-v/eic7700x/eic7700-evb/src/Make.defs @@ -0,0 +1,27 @@ +############################################################################ +# boards/risc-v/eic7700x/eic7700-evb/src/Make.defs +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +CSRCS = eic7700x_bringup.c + +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/risc-v/eic7700x/eic7700-evb/src/board_config.h b/boards/risc-v/eic7700x/eic7700-evb/src/board_config.h new file mode 100644 index 0000000000000..afea7c5a9bac5 --- /dev/null +++ b/boards/risc-v/eic7700x/eic7700-evb/src/board_config.h @@ -0,0 +1,47 @@ +/**************************************************************************** + * boards/risc-v/eic7700x/eic7700-evb/src/board_config.h + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __BOARDS_RISCV_EIC7700X_EIC7700_EVB_SRC_BOARD_CONFIG_H +#define __BOARDS_RISCV_EIC7700X_EIC7700_EVB_SRC_BOARD_CONFIG_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: eic7700x_bringup + * + * Description: + * Bring up this board's devices, in this board's order. Called from the + * common layer's board_late_initialize(). + * + ****************************************************************************/ + +int eic7700x_bringup(void); + +#endif /* __BOARDS_RISCV_EIC7700X_EIC7700_EVB_SRC_BOARD_CONFIG_H */ diff --git a/boards/risc-v/eic7700x/eic7700-evb/src/eic7700x_bringup.c b/boards/risc-v/eic7700x/eic7700-evb/src/eic7700x_bringup.c new file mode 100644 index 0000000000000..3c23e6d9e1807 --- /dev/null +++ b/boards/risc-v/eic7700x/eic7700-evb/src/eic7700x_bringup.c @@ -0,0 +1,50 @@ +/**************************************************************************** + * boards/risc-v/eic7700x/eic7700-evb/src/eic7700x_bringup.c + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include "board_config.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: eic7700x_bringup + * + * Description: + * Bring up this board's devices, in this board's order. Device drivers + * register here as the port grows; the common layer owns everything that + * is true of the SoC rather than of this board. + * + ****************************************************************************/ + +int eic7700x_bringup(void) +{ + return OK; +} diff --git a/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig b/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig index 6bbcba05f1f26..4308596a4b458 100644 --- a/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig +++ b/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig @@ -14,11 +14,16 @@ CONFIG_16550_UART0_BASE=0x50900000 CONFIG_16550_UART0_CLOCK=198144000 CONFIG_16550_UART0_IRQ=125 CONFIG_16550_UART0_SERIAL_CONSOLE=y +CONFIG_16550_UART1=y +CONFIG_16550_UART1_BASE=0x50910000 +CONFIG_16550_UART1_CLOCK=198144000 +CONFIG_16550_UART1_IRQ=126 CONFIG_16550_UART=y CONFIG_16550_WAIT_LCR=y CONFIG_ARCH="risc-v" CONFIG_ARCH_ADDRENV=y CONFIG_ARCH_BOARD="starpro64" +CONFIG_ARCH_BOARD_COMMON=y CONFIG_ARCH_BOARD_EIC7700X_STARPRO64=y CONFIG_ARCH_CHIP="eic7700x" CONFIG_ARCH_CHIP_EIC7700X=y @@ -29,9 +34,9 @@ CONFIG_ARCH_HEAP_VBASE=0xC0200000 CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_KERNEL_STACKSIZE=3072 CONFIG_ARCH_PGPOOL_MAPPING=y -CONFIG_ARCH_PGPOOL_PBASE=0x80600000 -CONFIG_ARCH_PGPOOL_SIZE=4194304 -CONFIG_ARCH_PGPOOL_VBASE=0x80600000 +CONFIG_ARCH_PGPOOL_PBASE=0xA8400000 +CONFIG_ARCH_PGPOOL_SIZE=266338304 +CONFIG_ARCH_PGPOOL_VBASE=0xA8400000 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_TEXT_NPAGES=128 @@ -39,15 +44,23 @@ CONFIG_ARCH_TEXT_VBASE=0xC0000000 CONFIG_ARCH_USE_MMU=y CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y +CONFIG_BINFMT_ELF_EXECUTABLE=y CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARD_LOOPSPERMSEC=1120 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y CONFIG_DEBUG_ASSERTIONS_EXPRESSION=y CONFIG_DEBUG_FEATURES=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_FS_ERROR=y CONFIG_DEBUG_FULLOPT=y +CONFIG_DEBUG_MM=y +CONFIG_DEBUG_MM_ERROR=y +CONFIG_DEBUG_SCHED=y CONFIG_DEBUG_SYMBOLS=y +CONFIG_DEFAULT_TASK_STACKSIZE=8192 CONFIG_ELF=y +CONFIG_ELF_STACKSIZE=2048 CONFIG_EXAMPLES_HELLO=m CONFIG_FS_PROCFS=y CONFIG_FS_ROMFS=y @@ -56,12 +69,10 @@ CONFIG_INIT_FILEPATH="/system/bin/init" CONFIG_INIT_MOUNT=y CONFIG_INIT_MOUNT_FLAGS=0x1 CONFIG_INIT_MOUNT_TARGET="/system/bin" -CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y +CONFIG_IRQ_WORK_STACKSIZE=2048 CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y -CONFIG_LIBC_MEMSET_64BIT=y -CONFIG_LIBC_MEMSET_OPTSPEED=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_PGALLOC=y @@ -70,21 +81,34 @@ CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y CONFIG_PATH_INITIAL="/system/bin" -CONFIG_RAM_SIZE=1048576 +CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=2048 +CONFIG_RAMLOG=y +CONFIG_RAMLOG_BUFSIZE=32768 +CONFIG_RAMLOG_SYSLOG=y +CONFIG_RAM_SIZE=1006632960 CONFIG_RAM_START=0x80200000 CONFIG_RAW_BINARY=y CONFIG_READLINE_CMD_HISTORY=y +CONFIG_RISCV_STRING_FUNCTION=y CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_BACKTRACE=y +CONFIG_SCHED_CPULOAD_SYSCLK=y CONFIG_SCHED_HAVE_PARENT=y +CONFIG_SCHED_LPNTHREADS=2 CONFIG_SCHED_LPWORK=y CONFIG_SCHED_WAITPID=y CONFIG_SERIAL_UART_ARCH_MMIO=y +CONFIG_SMP=y +CONFIG_STACKCHECK_MARGIN=128 CONFIG_STACK_COLORATION=y CONFIG_START_MONTH=12 CONFIG_START_YEAR=2021 CONFIG_SYMTAB_ORDEREDBYNAME=y +CONFIG_SYSLOG_DEFAULT=y +CONFIG_SYSLOG_MAX_CHANNELS=2 CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_NSH_PROGNAME="init" CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y +CONFIG_TESTING_SMP=y CONFIG_USEC_PER_TICK=1000 diff --git a/boards/risc-v/eic7700x/starpro64/include/board.h b/boards/risc-v/eic7700x/starpro64/include/board.h index dda5f476555fb..89b9b1bc72406 100644 --- a/boards/risc-v/eic7700x/starpro64/include/board.h +++ b/boards/risc-v/eic7700x/starpro64/include/board.h @@ -33,16 +33,6 @@ * Pre-processor Definitions ****************************************************************************/ -#define LED_STARTED 0 /* N/A */ -#define LED_HEAPALLOCATE 1 /* N/A */ -#define LED_IRQSENABLED 2 /* N/A */ -#define LED_STACKCREATED 3 /* N/A */ -#define LED_INIRQ 4 /* N/A */ -#define LED_SIGNAL 5 /* N/A */ -#define LED_ASSERTION 6 /* N/A */ -#define LED_PANIC 7 /* N/A */ -#define LED_CPU 8 /* LED */ - /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/boards/risc-v/eic7700x/starpro64/include/board_memorymap.h b/boards/risc-v/eic7700x/starpro64/include/board_memorymap.h index 8bb29963a5eaf..d53b6bf4c0255 100644 --- a/boards/risc-v/eic7700x/starpro64/include/board_memorymap.h +++ b/boards/risc-v/eic7700x/starpro64/include/board_memorymap.h @@ -41,11 +41,6 @@ #define KSRAM_SIZE (uintptr_t)__ksram_size #define KSRAM_END (uintptr_t)__ksram_end -/* Kernel RAM (RW) */ - -#define PGPOOL_START (uintptr_t)__pgheap_start -#define PGPOOL_SIZE (uintptr_t)__pgheap_size - /* Page pool (RWX) */ #define PGPOOL_START (uintptr_t)__pgheap_start diff --git a/boards/risc-v/eic7700x/starpro64/src/Make.defs b/boards/risc-v/eic7700x/starpro64/src/Make.defs new file mode 100644 index 0000000000000..f1ff3c6c6933d --- /dev/null +++ b/boards/risc-v/eic7700x/starpro64/src/Make.defs @@ -0,0 +1,27 @@ +############################################################################ +# boards/risc-v/eic7700x/starpro64/src/Make.defs +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +CSRCS = eic7700x_bringup.c + +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/risc-v/eic7700x/starpro64/src/board_config.h b/boards/risc-v/eic7700x/starpro64/src/board_config.h new file mode 100644 index 0000000000000..b110bb7bf5e50 --- /dev/null +++ b/boards/risc-v/eic7700x/starpro64/src/board_config.h @@ -0,0 +1,47 @@ +/**************************************************************************** + * boards/risc-v/eic7700x/starpro64/src/board_config.h + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __BOARDS_RISCV_EIC7700X_STARPRO64_SRC_BOARD_CONFIG_H +#define __BOARDS_RISCV_EIC7700X_STARPRO64_SRC_BOARD_CONFIG_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: eic7700x_bringup + * + * Description: + * Bring up this board's devices, in this board's order. Called from the + * common layer's board_late_initialize(). + * + ****************************************************************************/ + +int eic7700x_bringup(void); + +#endif /* __BOARDS_RISCV_EIC7700X_STARPRO64_SRC_BOARD_CONFIG_H */ diff --git a/boards/risc-v/eic7700x/starpro64/src/eic7700x_bringup.c b/boards/risc-v/eic7700x/starpro64/src/eic7700x_bringup.c new file mode 100644 index 0000000000000..a22f826a4c03d --- /dev/null +++ b/boards/risc-v/eic7700x/starpro64/src/eic7700x_bringup.c @@ -0,0 +1,50 @@ +/**************************************************************************** + * boards/risc-v/eic7700x/starpro64/src/eic7700x_bringup.c + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include "board_config.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: eic7700x_bringup + * + * Description: + * Bring up this board's devices, in this board's order. Device drivers + * register here as the port grows; the common layer owns everything that + * is true of the SoC rather than of this board. + * + ****************************************************************************/ + +int eic7700x_bringup(void) +{ + return OK; +}