Config.in.riscv 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. config BR2_RISCV_64
  56. bool "64-bit"
  57. select BR2_ARCH_IS_64
  58. endchoice
  59. choice
  60. prompt "Target ABI"
  61. default BR2_RISCV_ABI_ILP32D if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  62. default BR2_RISCV_ABI_ILP32F if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  63. default BR2_RISCV_ABI_ILP32 if !BR2_ARCH_IS_64
  64. default BR2_RISCV_ABI_LP64D if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  65. default BR2_RISCV_ABI_LP64F if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  66. default BR2_RISCV_ABI_LP64 if BR2_ARCH_IS_64
  67. config BR2_RISCV_ABI_ILP32
  68. bool "ilp32"
  69. depends on !BR2_ARCH_IS_64
  70. config BR2_RISCV_ABI_ILP32F
  71. bool "ilp32f"
  72. depends on !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  73. config BR2_RISCV_ABI_ILP32D
  74. bool "ilp32d"
  75. depends on !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  76. config BR2_RISCV_ABI_LP64
  77. bool "lp64"
  78. depends on BR2_ARCH_IS_64
  79. config BR2_RISCV_ABI_LP64F
  80. bool "lp64f"
  81. depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  82. config BR2_RISCV_ABI_LP64D
  83. bool "lp64d"
  84. depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  85. endchoice
  86. config BR2_ARCH
  87. default "riscv32" if !BR2_ARCH_IS_64
  88. default "riscv64" if BR2_ARCH_IS_64
  89. config BR2_ENDIAN
  90. default "LITTLE"
  91. config BR2_GCC_TARGET_ABI
  92. default "ilp32" if BR2_RISCV_ABI_ILP32
  93. default "ilp32f" if BR2_RISCV_ABI_ILP32F
  94. default "ilp32d" if BR2_RISCV_ABI_ILP32D
  95. default "lp64" if BR2_RISCV_ABI_LP64
  96. default "lp64f" if BR2_RISCV_ABI_LP64F
  97. default "lp64d" if BR2_RISCV_ABI_LP64D
  98. config BR2_READELF_ARCH_NAME
  99. default "RISC-V"
  100. # vim: ft=kconfig
  101. # -*- mode:kconfig; -*-