CONFIG_RISCV_GP

Enable RISC-V global pointer relative addressing

Type: bool

Help

Use global pointer relative addressing for small globals declared
anywhere in the executable. It can benefit performance and reduce
the code size.

Note: To support this feature, RISC-V SoC needs to initialize
global pointer at program start or earlier than any instruction
using GP relative addressing.

Direct dependencies

SOC_SERIES_RISCV32_IT8XXX2 || SOC_SERIES_RISCV_ANDES_V5 || (SOC_GD32VF103 && SOC_SERIES_GD32VF103) || SOC_SERIES_RISCV32_MIV || SOC_SERIES_NEORV32 || SOC_SERIES_RISCV_SIFIVE_FREEDOM || SOC_SERIES_STARFIVE_JH71XX || SOC_SERIES_RISCV_TELINK_B91 || SOC_SERIES_RISCV_VIRT || SOC_SERIES_RISCV32_IT8XXX2 || SOC_SERIES_RISCV_ANDES_V5 || (SOC_GD32VF103 && SOC_SERIES_GD32VF103) || SOC_SERIES_RISCV32_MIV || SOC_SERIES_NEORV32 || SOC_SERIES_RISCV_SIFIVE_FREEDOM || SOC_SERIES_STARFIVE_JH71XX || SOC_SERIES_RISCV_TELINK_B91 || SOC_SERIES_RISCV_VIRT || RISCV

(Includes any dependencies from ifs and menus.)

Defaults

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • y

  • n

Symbols that select this symbol

Kconfig definitions

At <Zephyr>/soc/riscv/riscv-ite/it8xxx2/Kconfig.defconfig.series:16

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/riscv/riscv-ite/Kconfig.defconfig:4

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV32_IT8XXX2

At <Zephyr>/soc/riscv/riscv-privilege/andes_v5/Kconfig.defconfig.series:33

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV_ANDES_V5

At <Zephyr>/soc/riscv/riscv-privilege/gd32vf103/Kconfig.defconfig.gd32vf103:27

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6<Zephyr>/soc/riscv/riscv-privilege/gd32vf103/Kconfig.defconfig.series:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_GD32VF103 && SOC_SERIES_GD32VF103

At <Zephyr>/soc/riscv/riscv-privilege/miv/Kconfig.defconfig.series:20

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV32_MIV

At <Zephyr>/soc/riscv/riscv-privilege/neorv32/Kconfig.defconfig.series:18

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_NEORV32

At <Zephyr>/soc/riscv/riscv-privilege/sifive-freedom/Kconfig.defconfig.series:20

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV_SIFIVE_FREEDOM

At <Zephyr>/soc/riscv/riscv-privilege/starfive_jh71xx/Kconfig.defconfig.series:21

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_STARFIVE_JH71XX

At <Zephyr>/soc/riscv/riscv-privilege/telink_b91/Kconfig.defconfig.series:26

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV_TELINK_B91

At <Zephyr>/soc/riscv/riscv-privilege/virt/Kconfig.defconfig.series:21

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV_VIRT

At <Zephyr>/soc/riscv/riscv-ite/it8xxx2/Kconfig.defconfig.series:16

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/riscv/riscv-ite/Kconfig.defconfig:4

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV32_IT8XXX2

At <Zephyr>/soc/riscv/riscv-privilege/andes_v5/Kconfig.defconfig.series:33

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV_ANDES_V5

At <Zephyr>/soc/riscv/riscv-privilege/gd32vf103/Kconfig.defconfig.gd32vf103:27

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6<Zephyr>/soc/riscv/riscv-privilege/gd32vf103/Kconfig.defconfig.series:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_GD32VF103 && SOC_SERIES_GD32VF103

At <Zephyr>/soc/riscv/riscv-privilege/miv/Kconfig.defconfig.series:20

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV32_MIV

At <Zephyr>/soc/riscv/riscv-privilege/neorv32/Kconfig.defconfig.series:18

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_NEORV32

At <Zephyr>/soc/riscv/riscv-privilege/sifive-freedom/Kconfig.defconfig.series:20

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV_SIFIVE_FREEDOM

At <Zephyr>/soc/riscv/riscv-privilege/starfive_jh71xx/Kconfig.defconfig.series:21

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_STARFIVE_JH71XX

At <Zephyr>/soc/riscv/riscv-privilege/telink_b91/Kconfig.defconfig.series:26

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV_TELINK_B91

At <Zephyr>/soc/riscv/riscv-privilege/virt/Kconfig.defconfig.series:21

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/riscv/riscv-privilege/Kconfig.defconfig:6

Menu path: (Top)

config RISCV_GP
    bool
    default y
    depends on SOC_SERIES_RISCV_VIRT

At <Zephyr>/arch/riscv/Kconfig:23

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:39<Zephyr>/arch/Kconfig:12

Menu path: (Top) → RISCV Options

config RISCV_GP
    bool "Enable RISC-V global pointer relative addressing"
    default n
    depends on RISCV
    help
      Use global pointer relative addressing for small globals declared
      anywhere in the executable. It can benefit performance and reduce
      the code size.

      Note: To support this feature, RISC-V SoC needs to initialize
      global pointer at program start or earlier than any instruction
      using GP relative addressing.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)