2
1

Config.in.riscv 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # RISC-V CPU ISA extensions.
  2. choice
  3. prompt "Target Architecture Variant"
  4. default BR2_riscv_g
  5. config BR2_riscv_g
  6. bool "General purpose (G)"
  7. select BR2_RISCV_ISA_RVI
  8. select BR2_RISCV_ISA_RVM
  9. select BR2_RISCV_ISA_RVA
  10. select BR2_RISCV_ISA_RVF
  11. select BR2_RISCV_ISA_RVD
  12. help
  13. General purpose (G) is equivalent to IMAFD.
  14. config BR2_riscv_custom
  15. bool "Custom architecture"
  16. select BR2_RISCV_ISA_RVI
  17. endchoice
  18. comment "Instruction Set Extensions"
  19. config BR2_RISCV_ISA_RVI
  20. bool "Base Integer (I)"
  21. config BR2_RISCV_ISA_RVM
  22. bool "Integer Multiplication and Division (M)"
  23. config BR2_RISCV_ISA_RVA
  24. bool "Atomic Instructions (A)"
  25. config BR2_RISCV_ISA_RVF
  26. bool "Single-precision Floating-point (F)"
  27. config BR2_RISCV_ISA_RVD
  28. bool "Double-precision Floating-point (D)"
  29. depends on BR2_RISCV_ISA_RVF
  30. config BR2_RISCV_ISA_RVC
  31. bool "Compressed Instructions (C)"
  32. config BR2_RISCV_ISA_RVV
  33. bool "Vector Instructions (V)"
  34. select BR2_ARCH_NEEDS_GCC_AT_LEAST_12
  35. choice
  36. prompt "Target Architecture Size"
  37. default BR2_RISCV_64
  38. config BR2_RISCV_32
  39. bool "32-bit"
  40. select BR2_USE_MMU
  41. config BR2_RISCV_64
  42. bool "64-bit"
  43. select BR2_ARCH_IS_64
  44. endchoice
  45. config BR2_RISCV_USE_MMU
  46. bool "MMU support"
  47. default y
  48. depends on BR2_RISCV_64
  49. select BR2_USE_MMU
  50. help
  51. Enable this option if your RISC-V core has a MMU (Memory
  52. Management Unit).
  53. choice
  54. prompt "Target ABI"
  55. default BR2_RISCV_ABI_ILP32D if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  56. default BR2_RISCV_ABI_ILP32F if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  57. default BR2_RISCV_ABI_ILP32 if !BR2_ARCH_IS_64
  58. default BR2_RISCV_ABI_LP64D if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  59. default BR2_RISCV_ABI_LP64F if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  60. default BR2_RISCV_ABI_LP64 if BR2_ARCH_IS_64
  61. config BR2_RISCV_ABI_ILP32
  62. bool "ilp32"
  63. depends on !BR2_ARCH_IS_64
  64. config BR2_RISCV_ABI_ILP32F
  65. bool "ilp32f"
  66. depends on !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  67. config BR2_RISCV_ABI_ILP32D
  68. bool "ilp32d"
  69. depends on !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  70. config BR2_RISCV_ABI_LP64
  71. bool "lp64"
  72. depends on BR2_ARCH_IS_64
  73. config BR2_RISCV_ABI_LP64F
  74. bool "lp64f"
  75. depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  76. depends on BR2_USE_MMU
  77. config BR2_RISCV_ABI_LP64D
  78. bool "lp64d"
  79. depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  80. endchoice
  81. config BR2_ARCH
  82. default "riscv32" if !BR2_ARCH_IS_64
  83. default "riscv64" if BR2_ARCH_IS_64
  84. config BR2_NORMALIZED_ARCH
  85. default "riscv"
  86. config BR2_ENDIAN
  87. default "LITTLE"
  88. config BR2_GCC_TARGET_ABI
  89. default "ilp32" if BR2_RISCV_ABI_ILP32
  90. default "ilp32f" if BR2_RISCV_ABI_ILP32F
  91. default "ilp32d" if BR2_RISCV_ABI_ILP32D
  92. default "lp64" if BR2_RISCV_ABI_LP64
  93. default "lp64f" if BR2_RISCV_ABI_LP64F
  94. default "lp64d" if BR2_RISCV_ABI_LP64D
  95. config BR2_READELF_ARCH_NAME
  96. default "RISC-V"
  97. # vim: ft=kconfig
  98. # -*- mode:kconfig; -*-