/openbmc/qemu/hw/intc/ |
H A D | riscv_aclint.c | 60 int hartid, in riscv_aclint_mtimer_write_timecmp() argument 70 hartid = hartid - mtimer->hartid_base; in riscv_aclint_mtimer_write_timecmp() 72 mtimer->timecmp[hartid] = value; in riscv_aclint_mtimer_write_timecmp() 73 if (mtimer->timecmp[hartid] <= rtc) { in riscv_aclint_mtimer_write_timecmp() 78 qemu_irq_raise(mtimer->timer_irqs[hartid]); in riscv_aclint_mtimer_write_timecmp() 83 qemu_irq_lower(mtimer->timer_irqs[hartid]); in riscv_aclint_mtimer_write_timecmp() 84 diff = mtimer->timecmp[hartid] - rtc; in riscv_aclint_mtimer_write_timecmp() 109 timer_mod(mtimer->timers[hartid], next); in riscv_aclint_mtimer_write_timecmp() 131 size_t hartid = mtimer->hartid_base + in riscv_aclint_mtimer_read() local 133 CPUState *cpu = cpu_by_arch_id(hartid); in riscv_aclint_mtimer_read() [all …]
|
H A D | sifive_plic.c | 121 uint32_t hartid = plic->addr_config[addrid].hartid; in sifive_plic_update() local 127 qemu_set_irq(plic->m_external_irqs[hartid - plic->hartid_base], level); in sifive_plic_update() 130 qemu_set_irq(plic->s_external_irqs[hartid - plic->hartid_base], level); in sifive_plic_update() 299 int addrid, hartid, modes, m; in parse_hart_config() local 304 addrid = 0, hartid = 0, modes = 0; in parse_hart_config() 310 hartid++; in parse_hart_config() 325 hartid++; in parse_hart_config() 330 plic->num_harts = hartid; in parse_hart_config() 334 addrid = 0, hartid = plic->hartid_base; in parse_hart_config() 339 hartid++; in parse_hart_config() [all …]
|
H A D | riscv_imsic.c | 348 RISCVCPU *rcpu = RISCV_CPU(cpu_by_arch_id(imsic->hartid)); in riscv_imsic_realize() 349 CPUState *cpu = cpu_by_arch_id(imsic->hartid); in riscv_imsic_realize() 393 DEFINE_PROP_UINT32("hartid", RISCVIMSICState, hartid, 0), 443 DeviceState *riscv_imsic_create(hwaddr addr, uint32_t hartid, bool mmode, in type_init() 447 CPUState *cpu = cpu_by_arch_id(hartid); in type_init() 461 qdev_prop_set_uint32(dev, "hartid", hartid); in type_init()
|
/openbmc/linux/arch/riscv/kernel/ |
H A D | cpu_ops_sbi.c | 26 static int sbi_hsm_hart_start(unsigned long hartid, unsigned long saddr, in sbi_hsm_hart_start() argument 32 hartid, saddr, priv, 0, 0, 0); in sbi_hsm_hart_start() 52 static int sbi_hsm_hart_get_status(unsigned long hartid) in sbi_hsm_hart_get_status() argument 57 hartid, 0, 0, 0, 0, 0); in sbi_hsm_hart_get_status() 68 unsigned long hartid = cpuid_to_hartid_map(cpuid); in sbi_cpu_start() local 79 return sbi_hsm_hart_start(hartid, boot_addr, hsm_data); in sbi_cpu_start() 110 unsigned long hartid = cpuid_to_hartid_map(cpuid); in sbi_cpu_is_stopped() local 112 rc = sbi_hsm_hart_get_status(hartid); in sbi_cpu_is_stopped()
|
H A D | sbi.c | 74 unsigned long cpuid, hartid; in __sbi_v01_cpumask_to_hartmask() local 85 hartid = cpuid_to_hartid_map(cpuid); in __sbi_v01_cpumask_to_hartmask() 86 if (hartid >= BITS_PER_LONG) { in __sbi_v01_cpumask_to_hartmask() 90 hmask |= BIT(hartid); in __sbi_v01_cpumask_to_hartmask() 305 unsigned long hartid, cpuid, hmask = 0, hbase = 0, htop = 0; in __sbi_rfence_v02() local 312 hartid = cpuid_to_hartid_map(cpuid); in __sbi_rfence_v02() 314 if (hartid + BITS_PER_LONG <= htop || in __sbi_rfence_v02() 315 hbase + BITS_PER_LONG <= hartid) { in __sbi_rfence_v02() 321 } else if (hartid < hbase) { in __sbi_rfence_v02() 323 hmask <<= hbase - hartid; in __sbi_rfence_v02() [all …]
|
H A D | cpu_ops_spinwait.c | 23 unsigned long hartid = cpuid_to_hartid_map(cpuid); in cpu_update_secondary_bootdata() local 32 if (hartid == INVALID_HARTID || hartid >= (unsigned long) NR_CPUS) in cpu_update_secondary_bootdata() 37 WRITE_ONCE(__cpu_spinwait_stack_pointer[hartid], task_pt_regs(tidle)); in cpu_update_secondary_bootdata() 38 WRITE_ONCE(__cpu_spinwait_task_pointer[hartid], tidle); in cpu_update_secondary_bootdata()
|
H A D | cpu.c | 126 int riscv_of_parent_hartid(struct device_node *node, unsigned long *hartid) in riscv_of_parent_hartid() argument 130 *hartid = (unsigned long)of_get_cpu_hwid(node, 0); in riscv_of_parent_hartid() 131 if (*hartid == ~0UL) { in riscv_of_parent_hartid()
|
H A D | hibernate.c | 59 unsigned long hartid; member 101 hdr->hartid = cpuid_to_hartid_map(sleep_cpu); in arch_hibernation_header_save() 125 sleep_cpu = riscv_hartid_to_cpuid(hdr->hartid); in arch_hibernation_header_restore()
|
H A D | smp.c | 53 int riscv_hartid_to_cpuid(unsigned long hartid) in riscv_hartid_to_cpuid() argument 58 if (cpuid_to_hartid_map(i) == hartid) in riscv_hartid_to_cpuid()
|
/openbmc/linux/drivers/firmware/efi/libstub/ |
H A D | riscv.c | 16 static unsigned long hartid; variable 37 hartid = (unsigned long) fdt32_to_cpu(*(fdt32_t *)prop); in get_boot_hartid_from_fdt() 39 hartid = (unsigned long) fdt64_to_cpu(__get_unaligned_t(fdt64_t, prop)); in get_boot_hartid_from_fdt() 56 return efi_call_proto(boot_protocol, get_boot_hartid, &hartid); in get_boot_hartid_from_efi() 97 jump_kernel(hartid, fdt); in efi_enter_kernel()
|
/openbmc/linux/arch/riscv/mm/ |
H A D | cacheflush.c | 104 unsigned long hartid; in cbo_get_block_size() local 107 if (riscv_of_processor_hartid(node, &hartid)) in cbo_get_block_size() 115 *first_hartid = hartid; in cbo_get_block_size() 118 name, *first_hartid, hartid); in cbo_get_block_size()
|
/openbmc/linux/drivers/clocksource/ |
H A D | timer-riscv.c | 181 unsigned long hartid; in riscv_timer_init_dt() local 184 error = riscv_of_processor_hartid(n, &hartid); in riscv_timer_init_dt() 187 n, hartid); in riscv_timer_init_dt() 191 cpuid = riscv_hartid_to_cpuid(hartid); in riscv_timer_init_dt() 193 pr_warn("Invalid cpuid for hartid [%lu]\n", hartid); in riscv_timer_init_dt()
|
/openbmc/linux/arch/riscv/include/asm/ |
H A D | smp.h | 40 int riscv_hartid_to_cpuid(unsigned long hartid); 82 static inline int riscv_hartid_to_cpuid(unsigned long hartid) in riscv_hartid_to_cpuid() argument 84 if (hartid == boot_cpu_hartid) in riscv_hartid_to_cpuid()
|
H A D | processor.h | 120 int riscv_of_processor_hartid(struct device_node *node, unsigned long *hartid); 121 int riscv_early_of_processor_hartid(struct device_node *node, unsigned long *hartid); 122 int riscv_of_parent_hartid(struct device_node *node, unsigned long *hartid);
|
H A D | suspend.h | 39 int __cpu_resume_enter(unsigned long hartid, unsigned long context);
|
H A D | kexec.h | 52 unsigned long hartid,
|
/openbmc/qemu/include/hw/intc/ |
H A D | riscv_imsic.h | 60 uint32_t hartid; member 65 DeviceState *riscv_imsic_create(hwaddr addr, uint32_t hartid, bool mmode,
|
H A D | sifive_plic.h | 41 uint32_t hartid; member
|
/openbmc/linux/drivers/irqchip/ |
H A D | irq-riscv-intc.c | 192 unsigned long hartid; in riscv_intc_init() local 195 rc = riscv_of_parent_hartid(node, &hartid); in riscv_intc_init() 207 if (riscv_hartid_to_cpuid(hartid) != smp_processor_id()) { in riscv_intc_init()
|
H A D | irq-sifive-plic.c | 463 unsigned long hartid; in __plic_init() local 487 error = riscv_of_parent_hartid(parent.np, &hartid); in __plic_init() 493 cpu = riscv_hartid_to_cpuid(hartid); in __plic_init()
|
/openbmc/linux/Documentation/riscv/ |
H A D | boot.rst | 26 * ``$a0`` to contain the hartid of the current core. 95 When booting with UEFI, the EFI stub requires the boot hartid in order to pass 96 it to the RISC-V kernel in ``$a1``. The EFI stub retrieves the boot hartid using 100 - ``boot-hartid`` devicetree subnode (**deprecated**).
|
/openbmc/qemu/target/riscv/ |
H A D | trace-events | 2 riscv_trap(uint64_t hartid, bool async, uint64_t cause, uint64_t epc, uint64_t tval, const char *de…
|
/openbmc/linux/drivers/acpi/ |
H A D | processor_core.c | 114 phys_cpuid_t *hartid) in map_rintc_hartid() argument 128 *hartid = rintc->hart_id; in map_rintc_hartid()
|
/openbmc/u-boot/doc/ |
H A D | README.sifive-fu540 | 180 [ 0.000000] CPU with hartid=0 has a non-okay status of "masked" 181 [ 0.000000] CPU with hartid=0 has a non-okay status of "masked" 198 [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [1]
|
/openbmc/linux/arch/riscv/ |
H A D | Kconfig | 663 variable. This method cannot support CPU hotplug and sparse hartid
|