|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
To be fair, I said the same thing a month or so ago and had the same thing pointed out to me!
-Allen
To be fair, I said the same thing a month or so ago and had the same thing pointed out to me!
-Allen
|
By
Allen Baum
·
#312
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
You're right, Allen. I didn't think that one was true. Delegation bits are presumably part of the core dispatch area and not kept somewhere else. It would be different to have exceptions depend on
You're right, Allen. I didn't think that one was true. Delegation bits are presumably part of the core dispatch area and not kept somewhere else. It would be different to have exceptions depend on
|
By
Bill Huffman
·
#311
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Prvi spec v1.12 sec 3.1.12:
When the CY, TM, IR, or HPMn bit in the mcounteren register is clear, attempts to read thecycle, time, instret, or hpmcountern register while
Prvi spec v1.12 sec 3.1.12:
When the CY, TM, IR, or HPMn bit in the mcounteren register is clear, attempts to read thecycle, time, instret, or hpmcountern register while
|
By
Allen Baum
·
#310
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
The CSRs can determine what happens on a write and what is read on a read. But they cannot control whether a read or write is legal as far as I know.
Bill
On 8/20/20 3:28 PM, Allen Baum wrote:
The CSRs can determine what happens on a write and what is read on a read. But they cannot control whether a read or write is legal as far as I know.
Bill
On 8/20/20 3:28 PM, Allen Baum wrote:
|
By
Bill Huffman
·
#309
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Well, I'd be a little bit more specific: access can be conditioned on more than the CSR number, as the existence of Mcounteren CSR proves.
But, in that case, the register bit that controls access is
Well, I'd be a little bit more specific: access can be conditioned on more than the CSR number, as the existence of Mcounteren CSR proves.
But, in that case, the register bit that controls access is
|
By
Allen Baum
·
#308
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Chuanhua,
The spec is set to determine writable (and required privilege) based entirely on CSR number. Anything that determined exceptions based on data or the current value of the register has been
Chuanhua,
The spec is set to determine writable (and required privilege) based entirely on CSR number. Anything that determined exceptions based on data or the current value of the register has been
|
By
Bill Huffman
·
#307
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Hi, Bill,
I understand your timing concern for generating an exception based on data values. However, the concern is for data values directly read out from the general registers (GPR/FPR) by the
Hi, Bill,
I understand your timing concern for generating an exception based on data values. However, the concern is for data values directly read out from the general registers (GPR/FPR) by the
|
By
Chuanhua Chang
·
#306
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Hi, Anup,
I am fine with dropping the proposal of letting the S-mode write HPMCOUNTER CSRs directly based on its limited use cases in debugging and analysis.
Regards,
Chuanhua
Hi, Anup,
I am fine with dropping the proposal of letting the S-mode write HPMCOUNTER CSRs directly based on its limited use cases in debugging and analysis.
Regards,
Chuanhua
|
By
Chuanhua Chang
·
#305
·
|
|
Re: Small tweak to Privileged spec regarding PMP management?
The potentially problematic case is that if one attempts to run M-mode-only code on a core that supports VM, it might not know that it needs to execute SFENCE.VMA at all. (This is not an especially
The potentially problematic case is that if one attempts to run M-mode-only code on a core that supports VM, it might not know that it needs to execute SFENCE.VMA at all. (This is not an especially
|
By
Andrew Waterman
·
#304
·
|
|
Re: Small tweak to Privileged spec regarding PMP management?
Here's the PR for this five-word tweak (as described below) to the spec: https://github.com/riscv/riscv-isa-manual/pull/568
Here's the PR for this five-word tweak (as described below) to the spec: https://github.com/riscv/riscv-isa-manual/pull/568
|
By
Greg Favor
·
#303
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
On 8/18/20 8:19 AM, Chuanhua Chang wrote:
They're not the same idea. The PMP L bit changes the meaning of a write. Rather than becoming a read-only register, it remains read-write, but writes behave
On 8/18/20 8:19 AM, Chuanhua Chang wrote:
They're not the same idea. The PMP L bit changes the meaning of a write. Rather than becoming a read-only register, it remains read-write, but writes behave
|
By
Bill Huffman
·
#302
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Hi Chuanhua,
Even if we ignore the RISC-V CSR range violation in allowing writes to HPMCOUNTER CSR from S-mode, still the “bypass-sbi” DT property is not an acceptable solution.
The
Hi Chuanhua,
Even if we ignore the RISC-V CSR range violation in allowing writes to HPMCOUNTER CSR from S-mode, still the “bypass-sbi” DT property is not an acceptable solution.
The
|
By
Anup Patel
·
#301
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Hi, Anup,
Regarding the aspect of a "read-only" CSR, in the RISC-V PMP design, a control bit "L" in the pmpcfg CSR, once set, will change the corresponding read/write pmpaddr CSR to a "read-only"
Hi, Anup,
Regarding the aspect of a "read-only" CSR, in the RISC-V PMP design, a control bit "L" in the pmpcfg CSR, once set, will change the corresponding read/write pmpaddr CSR to a "read-only"
|
By
Chuanhua Chang
·
#300
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Hi Chuanhua,
The fact that “write-enable” bit in HPMEVENT CSR makes corresponding HPMCOUNTER as writeable violates the RISC-V CSR numbering scheme of RISC-V privilege spec because it allows
Hi Chuanhua,
The fact that “write-enable” bit in HPMEVENT CSR makes corresponding HPMCOUNTER as writeable violates the RISC-V CSR numbering scheme of RISC-V privilege spec because it allows
|
By
Anup Patel
·
#299
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Hi Alan,
Like mentioned previously, having different mechanism for HS-mode and VS-mode to write HPMCOUNTER CSR is not acceptable. The “bypass-sbi” DT property only means that Linux PMU driver
Hi Alan,
Like mentioned previously, having different mechanism for HS-mode and VS-mode to write HPMCOUNTER CSR is not acceptable. The “bypass-sbi” DT property only means that Linux PMU driver
|
By
Anup Patel
·
#298
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
The idea of adding write enable bit without adding extra CSR in the read/write register range is that the setting of the write enable bit will change the read-only CSR to a read/write CSR.
Chuanhua
The idea of adding write enable bit without adding extra CSR in the read/write register range is that the setting of the write enable bit will change the read-only CSR to a read/write CSR.
Chuanhua
|
By
Chuanhua Chang
·
#297
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Hi Anup,
We did the experiment based on our own settings and not yet consider the SBI extension proposal.
Please consider the approach in #278 with one additional condition: Any platform that supports
Hi Anup,
We did the experiment based on our own settings and not yet consider the SBI extension proposal.
Please consider the approach in #278 with one additional condition: Any platform that supports
|
By
alankao
·
#296
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Hi Alan,
Thanks for the data points. The proposed SBI_PMU_COUNTER_CONFIG_MATCHING will helps us minimize SBI calls for configuring HPMEVENT CSR. I am not sure if you have considered latest SBI PMU
Hi Alan,
Thanks for the data points. The proposed SBI_PMU_COUNTER_CONFIG_MATCHING will helps us minimize SBI calls for configuring HPMEVENT CSR. I am not sure if you have considered latest SBI PMU
|
By
Anup Patel
·
#295
·
|
|
Re: A proposal to enhance RISC-V HPM (Hardware Performance Monitor)
Hi Anup,
Fair enough. Of course, your conclusion is totally correct: "we CAN EASILY set the HPM* ...," but the real question here is in point 1: Are counter updates really that in-frequent so?
Hi Anup,
Fair enough. Of course, your conclusion is totally correct: "we CAN EASILY set the HPM* ...," but the real question here is in point 1: Are counter updates really that in-frequent so?
|
By
alankao
·
#294
·
|
|
Re: csrrc/csrrs with mip, sip and uip
Allen Baum wrote:
The interpretation is supposed to be the second one.
Actually, no, for two reasons:
First, supervisor-level interrupts are normally handled in S mode, and
bit SEIP isn't writable
Allen Baum wrote:
The interpretation is supposed to be the second one.
Actually, no, for two reasons:
First, supervisor-level interrupts are normally handled in S mode, and
bit SEIP isn't writable
|
By
John Hauser
·
#293
·
|