2
1

Config.in.riscv 3.0 KB

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