Config.in.riscv 2.8 KB

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