Skip to content

Comments

feat(tricore): Initial tricore support#242

Open
miguelafsilva5 wants to merge 6 commits intomainfrom
feat/tricore
Open

feat(tricore): Initial tricore support#242
miguelafsilva5 wants to merge 6 commits intomainfrom
feat/tricore

Conversation

@miguelafsilva5
Copy link
Member

@miguelafsilva5 miguelafsilva5 commented Aug 29, 2025

PR Description

This PR introduces the initial support for Infineon Tricore architectures.
This PR requires #218 to support boot from flash with a non-unified memory model.
The current state of this port supports baremetal and freeRTOS guests in single or multicore setups. At the moment, each guest is given an unique ID, and each core only executes one guest.

The following list shows what is missing:

  • DMA virtualization/isolation
  • History re-write and commit clean up
  • CI integration
  • bao-demos integration

@miguelafsilva5 miguelafsilva5 force-pushed the feat/tricore branch 2 times, most recently from f92535a to 57284c8 Compare September 1, 2025 14:05
@danielRep danielRep force-pushed the feat/non-unified-mem branch from 9ad59e5 to 474545c Compare September 1, 2025 15:56
@miguelafsilva5 miguelafsilva5 force-pushed the feat/tricore branch 2 times, most recently from b9e1caf to 7da4f29 Compare September 3, 2025 12:51
@danielRep danielRep force-pushed the feat/non-unified-mem branch 2 times, most recently from 829c219 to 61b37aa Compare September 3, 2025 13:06
@miguelafsilva5 miguelafsilva5 force-pushed the feat/tricore branch 4 times, most recently from 0e5ea75 to bf61453 Compare September 8, 2025 09:37
@danielRep danielRep force-pushed the feat/non-unified-mem branch 2 times, most recently from 674ffd5 to 3d1e91a Compare September 8, 2025 11:01
@danielRep danielRep force-pushed the feat/non-unified-mem branch from 3d1e91a to 53e6ea9 Compare September 9, 2025 13:40
@miguelafsilva5 miguelafsilva5 force-pushed the feat/tricore branch 2 times, most recently from 44a2cbb to 3d6619f Compare September 10, 2025 10:18
Base automatically changed from feat/non-unified-mem to main September 10, 2025 13:32
@miguelafsilva5 miguelafsilva5 force-pushed the feat/tricore branch 6 times, most recently from bffccac to 661df87 Compare September 15, 2025 13:43
@miguelafsilva5 miguelafsilva5 force-pushed the feat/tricore branch 2 times, most recently from ba20ef7 to f2194f5 Compare September 24, 2025 10:31
@miguelafsilva5 miguelafsilva5 force-pushed the feat/tricore branch 5 times, most recently from fe4c0f2 to d72e265 Compare February 16, 2026 17:17
@miguelafsilva5
Copy link
Member Author

@DavidMCerdeira finished attending to your review. When you have the time, check the missing conversations and see if everything is OK.
Also added an additional commit to fix the fomatting.
@josecm when David green lights his review, you can start yours

@josecm
Copy link
Member

josecm commented Feb 18, 2026

@josecm when David green lights his review, you can start yours

I will provide my review no later than the beginning of next week.

@DavidMCerdeira
Copy link
Member

@miguelafsilva5 feel free to squash these commits into one to cleanup the history

@miguelafsilva5
Copy link
Member Author

@DavidMCerdeira Squashed everything. All checks are green.
@josecm should be ready for your review. Thank you

@DavidMCerdeira DavidMCerdeira self-requested a review February 18, 2026 13:21
@josecm
Copy link
Member

josecm commented Feb 18, 2026

@DavidMCerdeira Squashed everything. All checks are green.
@josecm should be ready for your review. Thank you

This is great! I will try to provide some feedback this week still!

@DavidMCerdeira DavidMCerdeira self-requested a review February 19, 2026 14:30

#include <bao.h>
#include <platform.h>
#include "prot.h"
Copy link
Member

Choose a reason for hiding this comment

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

use <>

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in f2876bf

unsigned long pcxs =
bit32_extract((uint32_t) & (vcpu->regs.upper_ctx), ADDR_PCXS_OFF, ADDR_PCXS_LEN);

vcpu->regs.lower_ctx.pcxi = (1 << 21) | (1 << PCXI_UL_OFF) | (pcxs << PCXI_PCXS_OFF) | pcxo;
Copy link
Member

Choose a reason for hiding this comment

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

magic number

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 62d938a

vcpu->regs.lower_ctx.pcxi = (1 << 21) | (1 << PCXI_UL_OFF) | (pcxs << PCXI_PCXS_OFF) | pcxo;
vcpu->regs.lower_ctx.a11 = vm->config->entry;

vcpu->regs.upper_ctx.csa_psw = 2 << 10;
Copy link
Member

Choose a reason for hiding this comment

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

magic number

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 62d938a

Makefile Outdated
-Wswitch-default -Wshadow -Wshadow=global \
-Wcast-qual -Wunused-macros \
-Wstrict-prototypes -Wunused-but-set-variable
-Wstrict-prototypes -Wunused-but-set-variable
Copy link
Member

Choose a reason for hiding this comment

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

extra ' '

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 14572b6

Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
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.

3 participants