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

AVR support #2021

Open
wants to merge 27 commits into
base: dev
Choose a base branch
from
Open

Conversation

glennsec
Copy link

@glennsec glennsec commented Oct 2, 2024

Hi, this adds support for AVR (#939), while keeping XMEGA bits (with DES instruction) currently separate. This PR is rebased against the current dev branch, while original support was developed and more thoroughly tested against unicorn 2.0.x.

break;

// Initialize registers
uint8_t regs[32];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move all the variable declaration to the beginning of the function

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@aquynh
Copy link
Member

aquynh commented Oct 3, 2024

Thanks for the contribution!

  • please update README to add this new architecture.
  • please add your name to CREDITS.TXT.

@aquynh
Copy link
Member

aquynh commented Oct 3, 2024

can you look at the issues of the CI?

@bet4it
Copy link
Contributor

bet4it commented Oct 3, 2024

You need to add Rust bindings manually😅

glennsec and others added 25 commits October 8, 2024 14:59
Add AVR related definitions into QEMU, make AVR support buildable.

[AM: Remove word 'Atmel' from filenames and all elements of code]
Suggested-by: Aleksandar Markovic <[email protected]>
Signed-off-by: Michael Rolnik <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Aleksandar Markovic <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <[email protected]>
[PMD: Fixed @avr tag in qapi/machine.json]
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>

(cherry picked from commit 42f3ff001339e37df4f13b709d2db00a488ee45c)
Signed-off-by: Glenn Baker <[email protected]>
Signed-off-by: Glenn Baker <[email protected]>
This is needed because the AVR CPU has separate code and data address
spaces that both start from zero. Use 0x08000000 base for Flash memory
and 0x00000000 base for CPU registers, IO registers and SRAM as the
fast case.

Signed-off-by: Glenn Baker <[email protected]>
Separate AVR architectures ("avr5", "avr51", "avr6", etc.) from actual
MCU models. Only list the most representative MCU models.

Signed-off-by: Glenn Baker <[email protected]>
Signed-off-by: Glenn Baker <[email protected]>
Signed-off-by: Glenn Baker <[email protected]>
Signed-off-by: Glenn Baker <[email protected]>
@glennsec
Copy link
Author

glennsec commented Oct 9, 2024

Thanks for the contribution!

  • please update README to add this new architecture.
  • please add your name to CREDITS.TXT.

done

@glennsec
Copy link
Author

glennsec commented Oct 9, 2024

can you look at the issues of the CI?

Fixed all of those except arm64 & ppc64 failures. The arm64 bits may be fixed by #1935 ?

@wtdcode
Copy link
Member

wtdcode commented Oct 10, 2024

can you look at the issues of the CI?

Fixed all of those except arm64 & ppc64 failures. The arm64 bits may be fixed by #1935 ?

There are also macos failures.

@glennsec
Copy link
Author

can you look at the issues of the CI?

Fixed all of those except arm64 & ppc64 failures. The arm64 bits may be fixed by #1935 ?

There are also macos failures.

Hi, this is related to the tcg/aarch64 backend issue mentioned in #1908 with proposed fix in #1935. I have another patch suggestion that fixes the issue, as you can see in the last CI run at https:/glennsec/unicorn/actions/runs/11298077207
(still, ppc64 needs similar treatment).

@glennsec
Copy link
Author

See #2028. Feel free to integrate whichever (vs. #1935) suits you best. Thanks.

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