Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RISC-V configMTIMECMP_BASE_ADDRESS (64-bit) stored in 32-bit int #1176

Merged

Conversation

vishwamartur
Copy link
Contributor

Related to #189

Update configMTIMECMP_BASE_ADDRESS to be stored in a 64-bit integer.

  • Change the type of ullMachineTimerCompareRegisterBase to uint64_t in portable/GCC/RISC-V/port.c.
  • Change the type of ullMachineTimerCompareRegisterBase to uint64_t in portable/IAR/RISC-V/port.c.
  • Update the initialization of ullMachineTimerCompareRegisterBase to use configMTIMECMP_BASE_ADDRESS in both files.

Related to FreeRTOS#189

Update `configMTIMECMP_BASE_ADDRESS` to be stored in a 64-bit integer.

* Change the type of `ullMachineTimerCompareRegisterBase` to `uint64_t` in `portable/GCC/RISC-V/port.c`.
* Change the type of `ullMachineTimerCompareRegisterBase` to `uint64_t` in `portable/IAR/RISC-V/port.c`.
* Update the initialization of `ullMachineTimerCompareRegisterBase` to use `configMTIMECMP_BASE_ADDRESS` in both files.
@vishwamartur vishwamartur requested a review from a team as a code owner November 1, 2024 07:06
@ActoryOu
Copy link
Member

ActoryOu commented Nov 2, 2024

Hello @vishwamartur,
Thanks for your contribution! Could you share your verification results on this PR? I'm curious what platform you're using to verify this.

Thank you!

@aggarg
Copy link
Member

aggarg commented Nov 4, 2024

@vishwamartur Would you please share how you tested these changes on 32-bit and 64-bit platforms as the same code is used on both the platforms.

@vishwamartur
Copy link
Contributor Author

Hi @ActoryOu and @aggarg,

Thank you for the feedback! I haven’t tested these changes yet, as I currently lack access to a compatible platform for both 32-bit and 64-bit verification. If you have any suggestions for alternative testing methods or an emulator that could support this setup, I’d be glad to give it a try.

Thanks again!

Copy link

sonarcloud bot commented Nov 4, 2024

@aggarg
Copy link
Member

aggarg commented Nov 4, 2024

I tested this change using Qemu and looks good to me.

On a side note, I'd suggest to use the PR template as it guides you what all information to provide when creating a PR (which includes testing).

@aggarg aggarg merged commit b4a9707 into FreeRTOS:main Nov 4, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants