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

target/riscv: Add support for Sv57 (and Sv57x4) translation mode #904

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

kr-sc
Copy link
Contributor

@kr-sc kr-sc commented Aug 14, 2023

Also fix Sv48x4 translation mode (riscv.c:224). According to riscv privileged specification, pa_ppn_mask in sv48x4 mode should be same as in sv48 mode.

…-stage translations)

Also fix Sv48x4 translation mode
@timsifive
Copy link
Collaborator

This looks good. What testing have you done?

@kr-sc
Copy link
Contributor Author

kr-sc commented Aug 18, 2023

I run this tests. Sv57 I check on spike + telnet + custom script for generate page table

spike32
test list CeaseMultiTest CeaseRunTest CeaseStepiTest CheckMisa CustomRegisterTest DebugBreakpoint DebugChangeString DebugCompareSections DebugExit DebugFunctionCall DebugSymbols DebugTurbostep DisconnectTest DownloadTest EbreakTest EtriggerTest FreeRtosTest Hwbp1 Hwbp2 HwbpManual IcountTest InfoTest InstantChangePc InstantHaltTest InterruptTest ItriggerTest JumpHbreak MemTest16 MemTest32 MemTest64 MemTest8 MemTestBlock0 MemTestBlock1 MemTestBlock2 MemTestBlockReadInvalid MemTestReadInvalid MemorySampleMixed MemorySampleSingle MulticoreRegTest MulticoreRtosSwitchActiveHartTest MulticoreRunAllHaltOne PrivChange PrivRw ProgramHwWatchpoint ProgramSwWatchpoint Registers RepeatReadTest Semihosting SemihostingFileio SimpleF18Test SimpleNoExistTest SimpleS0Test SimpleS1Test SimpleT0Test SimpleT1Test SimpleV13Test SmpSimultaneousRunHalt StepTest StepThread2Test Sv32Test Sv39Test Sv48Test TooManyHwbp TriggerDmode TriggerExecuteInstant TriggerLoadAddressInstant TriggerStoreAddressInstant UserInterrupt VectorTest WriteCsrs WriteGprs

:::::::::::::::::::::::::::[ ran 71 tests in 190s ]:::::::::::::::::::::::::::
14 tests returned not_applicable
57 tests returned pass

spike64
test list CeaseMultiTest CeaseRunTest CeaseStepiTest CheckMisa CustomRegisterTest DebugBreakpoint DebugChangeString DebugCompareSections DebugExit DebugFunctionCall DebugSymbols DebugTurbostep DisconnectTest DownloadTest EbreakTest EtriggerTest FreeRtosTest Hwbp1 Hwbp2 HwbpManual IcountTest InfoTest InstantChangePc InstantHaltTest InterruptTest ItriggerTest JumpHbreak MemTest16 MemTest32 MemTest64 MemTest8 MemTestBlock0 MemTestBlock1 MemTestBlock2 MemTestBlockReadInvalid MemTestReadInvalid MemorySampleMixed MemorySampleSingle MulticoreRegTest MulticoreRtosSwitchActiveHartTest MulticoreRunAllHaltOne PrivChange PrivRw ProgramHwWatchpoint ProgramSwWatchpoint Registers RepeatReadTest Semihosting SemihostingFileio SimpleF18Test SimpleNoExistTest SimpleS0Test SimpleS1Test SimpleT0Test SimpleT1Test SimpleV13Test SmpSimultaneousRunHalt StepTest StepThread2Test Sv32Test Sv39Test Sv48Test TooManyHwbp TriggerDmode TriggerExecuteInstant TriggerLoadAddressInstant TriggerStoreAddressInstant UserInterrupt VectorTest WriteCsrs WriteGprs

:::::::::::::::::::::::::::[ ran 71 tests in 202s ]:::::::::::::::::::::::::::
12 tests returned not_applicable
59 tests returned pass

spike32-2-hwthread
test list CeaseMultiTest CeaseRunTest CeaseStepiTest CheckMisa CustomRegisterTest DebugBreakpoint DebugChangeString DebugCompareSections DebugExit DebugFunctionCall DebugSymbols DebugTurbostep DisconnectTest DownloadTest EbreakTest EtriggerTest FreeRtosTest Hwbp1 Hwbp2 HwbpManual IcountTest InfoTest InstantChangePc InstantHaltTest InterruptTest ItriggerTest JumpHbreak MemTest16 MemTest32 MemTest64 MemTest8 MemTestBlock0 MemTestBlock1 MemTestBlock2 MemTestBlockReadInvalid MemTestReadInvalid MemorySampleMixed MemorySampleSingle MulticoreRegTest MulticoreRtosSwitchActiveHartTest MulticoreRunAllHaltOne PrivChange PrivRw ProgramHwWatchpoint ProgramSwWatchpoint Registers RepeatReadTest Semihosting SemihostingFileio SimpleF18Test SimpleNoExistTest SimpleS0Test SimpleS1Test SimpleT0Test SimpleT1Test SimpleV13Test SmpSimultaneousRunHalt StepTest StepThread2Test Sv32Test Sv39Test Sv48Test TooManyHwbp TriggerDmode TriggerExecuteInstant TriggerLoadAddressInstant TriggerStoreAddressInstant UserInterrupt VectorTest WriteCsrs WriteGprs

:::::::::::::::::::::::::::[ ran 71 tests in 244s ]:::::::::::::::::::::::::::
12 tests returned not_applicable
59 tests returned pass

spike64-2
test list CeaseMultiTest CeaseRunTest CeaseStepiTest CheckMisa CustomRegisterTest DebugBreakpoint DebugChangeString DebugCompareSections DebugExit DebugFunctionCall DebugSymbols DebugTurbostep DisconnectTest DownloadTest EbreakTest EtriggerTest FreeRtosTest Hwbp1 Hwbp2 HwbpManual IcountTest InfoTest InstantChangePc InstantHaltTest InterruptTest ItriggerTest JumpHbreak MemTest16 MemTest32 MemTest64 MemTest8 MemTestBlock0 MemTestBlock1 MemTestBlock2 MemTestBlockReadInvalid MemTestReadInvalid MemorySampleMixed MemorySampleSingle MulticoreRegTest MulticoreRtosSwitchActiveHartTest MulticoreRunAllHaltOne PrivChange PrivRw ProgramHwWatchpoint ProgramSwWatchpoint Registers RepeatReadTest Semihosting SemihostingFileio SimpleF18Test SimpleNoExistTest SimpleS0Test SimpleS1Test SimpleT0Test SimpleT1Test SimpleV13Test SmpSimultaneousRunHalt StepTest StepThread2Test Sv32Test Sv39Test Sv48Test TooManyHwbp TriggerDmode TriggerExecuteInstant TriggerLoadAddressInstant TriggerStoreAddressInstant UserInterrupt VectorTest WriteCsrs WriteGprs

:::::::::::::::::::::::::::[ ran 71 tests in 264s ]:::::::::::::::::::::::::::
14 tests returned not_applicable
57 tests returned pass

spike32-2
test list CeaseMultiTest CeaseRunTest CeaseStepiTest CheckMisa CustomRegisterTest DebugBreakpoint DebugChangeString DebugCompareSections DebugExit DebugFunctionCall DebugSymbols DebugTurbostep DisconnectTest DownloadTest EbreakTest EtriggerTest FreeRtosTest Hwbp1 Hwbp2 HwbpManual IcountTest InfoTest InstantChangePc InstantHaltTest InterruptTest ItriggerTest JumpHbreak MemTest16 MemTest32 MemTest64 MemTest8 MemTestBlock0 MemTestBlock1 MemTestBlock2 MemTestBlockReadInvalid MemTestReadInvalid MemorySampleMixed MemorySampleSingle MulticoreRegTest MulticoreRtosSwitchActiveHartTest MulticoreRunAllHaltOne PrivChange PrivRw ProgramHwWatchpoint ProgramSwWatchpoint Registers RepeatReadTest Semihosting SemihostingFileio SimpleF18Test SimpleNoExistTest SimpleS0Test SimpleS1Test SimpleT0Test SimpleT1Test SimpleV13Test SmpSimultaneousRunHalt StepTest StepThread2Test Sv32Test Sv39Test Sv48Test TooManyHwbp TriggerDmode TriggerExecuteInstant TriggerLoadAddressInstant TriggerStoreAddressInstant UserInterrupt VectorTest WriteCsrs WriteGprs

:::::::::::::::::::::::::::[ ran 71 tests in 270s ]:::::::::::::::::::::::::::
13 tests returned not_applicable
58 tests returned pass

spike64-2-hwthread
test list CeaseMultiTest CeaseRunTest CeaseStepiTest CheckMisa CustomRegisterTest DebugBreakpoint DebugChangeString DebugCompareSections DebugExit DebugFunctionCall DebugSymbols DebugTurbostep DisconnectTest DownloadTest EbreakTest EtriggerTest FreeRtosTest Hwbp1 Hwbp2 HwbpManual IcountTest InfoTest InstantChangePc InstantHaltTest InterruptTest ItriggerTest JumpHbreak MemTest16 MemTest32 MemTest64 MemTest8 MemTestBlock0 MemTestBlock1 MemTestBlock2 MemTestBlockReadInvalid MemTestReadInvalid MemorySampleMixed MemorySampleSingle MulticoreRegTest MulticoreRtosSwitchActiveHartTest MulticoreRunAllHaltOne PrivChange PrivRw ProgramHwWatchpoint ProgramSwWatchpoint Registers RepeatReadTest Semihosting SemihostingFileio SimpleF18Test SimpleNoExistTest SimpleS0Test SimpleS1Test SimpleT0Test SimpleT1Test SimpleV13Test SmpSimultaneousRunHalt StepTest StepThread2Test Sv32Test Sv39Test Sv48Test TooManyHwbp TriggerDmode TriggerExecuteInstant TriggerLoadAddressInstant TriggerStoreAddressInstant UserInterrupt VectorTest WriteCsrs WriteGprs

:::::::::::::::::::::::::::[ ran 71 tests in 326s ]:::::::::::::::::::::::::::
12 tests returned not_applicable
59 tests returned pass

@timsifive
Copy link
Collaborator

Sounds good. Could you extend https://github.com/riscv-software-src/riscv-tests/blob/d4eaa5bd6674b51d3b9b24913713c4638e99cdd9/debug/gdbserver.py#L1635 to also test Sv57? It already tests the other (non-x4) translation modes?

@kr-sc
Copy link
Contributor Author

kr-sc commented Aug 23, 2023

Extension for riscv-tests in progress, trying to figure out in infrastructure.

@timsifive
Copy link
Collaborator

Extension for riscv-tests in progress, trying to figure out in infrastructure.

Thanks. Let me know if you have any questions.

@timsifive timsifive merged commit 928f2b3 into riscv-collab:riscv Aug 23, 2023
5 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.

2 participants