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

fixup! target/hexagon: Implement modify SSR #117

Closed
wants to merge 126 commits into from

Conversation

SidManning
Copy link

No description provided.

androm3da and others added 30 commits March 18, 2025 13:22
The BADVA reg is referred to with the wrong identifier.  The
CAUSE reg field of SSR is not yet modeled, we will dump
the SSR in a subsequent commit.

Signed-off-by: Brian Cain <[email protected]>
These registers are defined in the Qualcomm Hexagon V71 Programmer's
Reference Manual -
https://docs.qualcomm.com/bundle/publicresource/80-N2040-51_REV_AB_Hexagon_V71_ProgrammerS_Reference_Manual.pdf
Refer to §11.9.1 SYSTEM GUEST, §11.9.2 SYSTEM MONITOR.

Signed-off-by: Brian Cain <[email protected]>
Also: add nop TCG overrides for break,unpause,fetchbo,dczeroa

break: this hardware breakpoint instruction is used with the in-silicon
debugger feature, this is not modeled.

unpause: this instruction is used to resume hardware threads that are
stalled by pause instructions.  pause is modeled as a nop, or in RR
mode as an EXCP_YIELD.  This instruction is safe to ignore.

Since cache/prefetch functions are not modeled, dczero and fetchbo are
safe to ignore.

Signed-off-by: Brian Cain <[email protected]>
This commit provides handlers to generate TCG for guest and system
register reads and writes.  They will be leveraged by a future commit.

Signed-off-by: Brian Cain <[email protected]>
Define the register fields for ssr, schedcfg, stid, bestwait, ccr,
modectl, imask, ipendad.

Define the fields for TLB entries.

Signed-off-by: Brian Cain <[email protected]>
Define TCG overrides for setprio(), crswap(,sgp{0,1,1:0}).

Signed-off-by: Brian Cain <[email protected]>
Define TCG overrides for {c,}swi {c,s}iad, iassign{r,w}, {s,g}etimask
instructions.

Signed-off-by: Brian Cain <[email protected]>
Define TCG overrides for start, stop, wait, resume instructions.

Signed-off-by: Brian Cain <[email protected]>
Co-authored-by: Sid Manning <[email protected]>
Signed-off-by: Brian Cain <[email protected]>
quic-mathbern and others added 23 commits March 18, 2025 13:22
This also adds the a minimal crt0/libc for hexagon, allowing us to build
and run standalone system emulation tests in the future.

Signed-off-by: Matheus Tavares Bernardino <[email protected]>
This register should store the revision identifier for the running
Hexagon arch cpu. Let's save the cpu revision and fill the register with
it.

Signed-off-by: Matheus Tavares Bernardino <[email protected]>
Signed-off-by: Matheus Tavares Bernardino <[email protected]>
Signed-off-by: Matheus Tavares Bernardino <[email protected]>
Signed-off-by: Matheus Tavares Bernardino <[email protected]>
Signed-off-by: Matheus Tavares Bernardino <[email protected]>
Signed-off-by: Matheus Tavares Bernardino <[email protected]>
Add the #if defined (TARGET_HEXAGON) to hmp-commands-info.hx
Prefix each TLB entry with the index

Signed-off-by: Taylor Simpson <[email protected]>
The number of parameters for `DEF_MACRO` changed and needed to be
updated too.

Signed-off-by: Marco Liebel <[email protected]>
A single mapping is made by qct-qtimer.c and the extraneous
region caused confusion.

FIXME: fold this change into the previous commit(s) that introduce this
* TODO: forward the instruction tag to the unimp log?
* TODO: why do we need_env() for these?
* TODO: filter out some attributes?

These instructions are unimplemented for now, they are used by h2.
@SidManning SidManning requested a review from androm3da March 21, 2025 17:36
@androm3da androm3da force-pushed the hex-next branch 3 times, most recently from eb2058b to 8699509 Compare March 25, 2025 02:57
@androm3da
Copy link

I've cherry-picked these commits from this PR into hex-next:

  • 4a01e25 (fixup! target/hexagon: Implement modify SSR, 2025-03-21)
  • c314988 (fixup! target/hexagon: Define register fields for system regs, 2025-03-20)
  • d0afff7 (fixup! target/hexagon: Implement ciad helper, 2025-03-20)

Closing this PR.

@androm3da androm3da closed this Mar 25, 2025
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.

5 participants