Changeset fe2cd01 in rtems


Ignore:
Timestamp:
Jun 22, 2018, 6:01:48 AM (10 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
5f5c450
Parents:
2086948a
git-author:
Sebastian Huber <sebastian.huber@…> (06/22/18 06:01:48)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/28/18 13:02:12)
Message:

bsp/riscv: Add device tree support

Update #3433.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • bsps/riscv/riscv/include/bsp.h

    r2086948a rfe2cd01  
    4545#endif
    4646
     47#define BSP_FDT_IS_SUPPORTED
     48
    4749/**
    4850  * @defgroup riscv_generic Register Definitions
  • bsps/riscv/riscv/start/start.S

    r2086948a rfe2cd01  
    2828 */
    2929
     30#include <rtems/asm.h>
     31#include <rtems/score/cpu.h>
     32#include <rtems/score/riscv-utility.h>
    3033#include <bsp/linker-symbols.h>
    31 #include <rtems/score/riscv-utility.h>
    32 #include <rtems/score/cpu.h>
    33 #include <rtems/asm.h>
     34#include <bspopts.h>
    3435
    3536EXTERN(bsp_section_bss_begin)
     
    5859#endif
    5960
     61        /* load stack and frame pointers */
     62        la      sp, _Configuration_Interrupt_stack_area_end
     63
     64#ifdef BSP_START_COPY_FDT_FROM_U_BOOT
     65        mv      a0, a1
     66        call    bsp_fdt_copy
     67#endif
     68
    6069        la      t0, ISR_Handler
    6170        csrw    mtvec, t0
    62 
    63         /* load stack and frame pointers */
    64         la      sp, _Configuration_Interrupt_stack_area_end
    6571
    6672        /* Clear .bss */
  • c/src/lib/libbsp/riscv/riscv/Makefile.am

    r2086948a rfe2cd01  
    4040librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
    4141librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
     42librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bsp-fdt.c
    4243librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
    4344librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
  • c/src/lib/libbsp/riscv/riscv/configure.ac

    r2086948a rfe2cd01  
    1515AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
    1616RTEMS_BSP_CONFIGURE
     17
     18RTEMS_BSPOPTS_SET([BSP_START_COPY_FDT_FROM_U_BOOT],[*],[1])
     19RTEMS_BSPOPTS_HELP([BSP_START_COPY_FDT_FROM_U_BOOT],[copy the U-Boot provided FDT to an internal storage])
     20
     21RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_SIZE_MAX],[*],[65536])
     22RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_SIZE_MAX],[maximum size of the FDT blob in bytes])
     23
     24RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_READ_ONLY],[*],[1])
     25RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_READ_ONLY],[place the FDT blob into the read-only data area])
     26
     27RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA],[*],[1])
     28RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA],[copy the FDT blob into the read-only load area via bsp_fdt_copy()])
    1729
    1830RTEMS_BSP_CLEANUP_OPTIONS
Note: See TracChangeset for help on using the changeset viewer.