1. Jan 23, 2019
  2. Jan 22, 2019
  3. Jan 21, 2019
    • Anup Patel's avatar
      lib: Use AMO instructions whenever __riscv_atomic is defined · 1ee745fe
      Anup Patel authored
      
      
      We should use AMO instructions whenever __riscv_atomic is
      defined (i.e. atomics are supported). We use LR/SC only when
      __riscv_atomic is not defined.
      
      Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
      1ee745fe
    • Damien Le Moal's avatar
      sbi: Add ecall helpers · b5be19f9
      Damien Le Moal authored
      
      
      Define sbi_ecall_console_puts() using sbi_ecall_console_putchar()
      renamed as sbi_ecall_console_putc() and remove the hardcoded version
      of the same funtion in the test payload code.
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      b5be19f9
    • Damien Le Moal's avatar
      payload: rename dummy payload to test payload · 42283461
      Damien Le Moal authored
      
      
      Use a more neutral term more representative of this payload intent.
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      42283461
    • Damien Le Moal's avatar
      kendryte/k210: Add device tree support · 868ad0b0
      Damien Le Moal authored
      
      
      The Kendryte k210 board initial loader does not provide a device tree
      for the firmware and subsequent payload. Add the k210.dts device tree
      description file to solve this. This file describes only the SoC core
      components: CPUs, memory and PLIC.
      
      Automatically compile and add this file to the firmware generated
      using the FW_PAYLOAD_FDT_PATH configuration parameter.
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      868ad0b0
    • Damien Le Moal's avatar
      kendryte/k210: Fix console · 58d9f298
      Damien Le Moal authored
      
      
      Clear console input when intializing it.
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      58d9f298
    • Damien Le Moal's avatar
      Makefile: Improve readability · 9c4aca4f
      Damien Le Moal authored
      
      
      Repeating "ifdef CROSS_COMPILE" multiple times does not help with
      readability. Simplify by grouping compilation command setup under a
      single ifdef statement.
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      9c4aca4f
    • Damien Le Moal's avatar
      Makefile: Add support for device tree compilation · 0df82694
      Damien Le Moal authored
      
      
      Add rules to compile dts files into dtb files using the device tree
      compiler (dtc). A platform can specify the DTS file to compile using
      the platform-dtb-y variable. The flattened device tree binary file to be
      used for building the final polatform firmware can be specified using
      the new FW_PAYLOAD_FDT firmware configuration option to point to the
      automatically compiled FDT file. Using the existing FW_PAYLOAD_FDT_PATH
      configuration option is still possible and will take precedence over
      the FW_PAYLOAD_FDT definition.
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      0df82694
    • Damien Le Moal's avatar
      lib: code cleanup · f4373731
      Damien Le Moal authored
      
      
      Use commonly accepted styles: newlines after declarations and before
      return to make the code more readable.
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      f4373731
    • Damien Le Moal's avatar
      lib: Fix banner · 6939d345
      Damien Le Moal authored
      
      
      Define the "OpenSBI" logo string as a macro renamed BANNER, since
      it is one rather than a logo.
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      6939d345
    • Damien Le Moal's avatar
      build: Introduce FW_PAYLOAD_ALIGN · ac3041f4
      Damien Le Moal authored
      
      
      The firmware payload offset defined by FW_PAYLOAD_OFFSET must
      specify a value large enough so the the payload does not overlap
      with the base firmware data, bss and text. For platforms without
      any strong requirement on the payload address, introduce the
      FW_PAYLOAD_ALIGN build parameter to automatically place the payload
      right after the base firmware at an address aligned with the defined
      value.
      
      Either FW_PAYLOAD_OFFSET or FW_PAYLOAD_ALIGN should be defined by a
      platform configuration. If both FW_PAYLOAD_OFFSET and FW_PAYLOAD_ALIGN
      are defined by a platform, FW_PAYLOAD_OFFSET has precedence and is
      used for building the final firmawre image.
      
      Using FW_PAYLOAD_ALIGN=4096 with the Kendryte platform rather than
      the abitrary FW_PAYLOAD_OFFSET=0x10000 value reduces the final
      firmware image size by about 20KB.
      
      Add a description of the FW_PAYLOAD_ALIGN configuration parameter in the
      fw_payload documentation file as well. And while at it, also fix
      various grammar and style issues in that file..
      
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      ac3041f4
  4. Jan 18, 2019
  5. Jan 16, 2019