-
Notifications
You must be signed in to change notification settings - Fork 792
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
[multitop_dev] Make uart_smoketest compile #25440
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pamaury
force-pushed
the
multitop_wip
branch
5 times, most recently
from
November 28, 2024 13:49
8c28693
to
3b67771
Compare
pamaury
force-pushed
the
multitop_wip
branch
5 times, most recently
from
December 2, 2024 09:24
58a887c
to
e7e328e
Compare
Signed-off-by: Amaury Pouly <[email protected]>
This avoid including by mistake the wrong file: because it is marked as incompatible, it will fail to compile. Signed-off-by: Amaury Pouly <[email protected]>
pamaury
force-pushed
the
multitop_wip
branch
3 times, most recently
from
December 3, 2024 13:02
957ebc7
to
c7ade26
Compare
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
In order to support multiple ROM images, scramble_image.py now only relies on the passed top hjson file and a scrambling mode to fetch all needed parameters to scramble the image. The script maps the scrambling mode (e.g. "base-rom") to its memory controller name, memory type, module name, scrambling key and nonce names in the top HJSON file, and can then retrieve the scrambling key, nonce, base address and size of the image to generate. This allows for passing different image paths (e.g. /path/to/base_rom_*.vmem and /path/to/second_rom_*.vmem) and generate the corresponding images with a single script. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Amaury Pouly <[email protected]>
Linker files are not preprocessed, which makes it hard to support several tops. In particular, including different files based on the top, or using a different region is very difficult. The `ld_library` rule is modified to take a new substitution dictionary as input which is subject to location expansion. This allows for example to do in the linker script: ``` INCLUDE @@myfile@@ ``` and then in the BUILD file: ``` ld_library( ..., substitutions = { "@@myfile@@": "$(location //path/to/my/file)", }, ) ``` Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
pamaury
force-pushed
the
multitop_wip
branch
2 times, most recently
from
December 4, 2024 22:43
000fb17
to
90af7d1
Compare
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
We cannot use DT in assembly code so we have to create macros for each top. At least this clarifies what is needed by the top and adds support for darjeeling and english breakfast. Signed-off-by: Amaury Pouly <[email protected]>
Darjeeling is quite different Earlgrey: it does not have a flash controller and does not bootstrap. At the moment, the test_rom simply expects the test code to already be in the CTN RAM. Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
The `nonce.c` file has some requirements that pull a lot of code. On the other hand, some headers only require the definition of a nonce and not the implementation that goes with it. Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
This field is only initialized when using the new `init_from_dt` function and is left NULL otherwise. Signed-off-by: Amaury Pouly <[email protected]>
Due to a limitation of the design of exec_env, it is not possible to create two `sim_dv` environments and compile binaries for both (this is because they will share the same provider). Instead, create a darjeeling exec_env for sim_dv, and a new alias in `//hw/top`. Then replace the earlgre-specific exec_env in `EARLGREY_TEST_ENVS` by this new one. This means that with this change, any previously sim_dv-enabled test can be compile on darjeeling simply by passing --//hw/top=darjeeling on the command line. Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Unfortunately, opentitantool is far from compiling with darjeeling due to many explicit dependencies on earlgrey. At the same time, opentitantool provides many operations which are not earlgrey-specific at all such as flash image generation. This commit introduces a horrible hack: in the host transition for the golden toolchain, always set the top to earlgrey. This way we can ensure that opentitantool will compile. For now this does not introduce any problem but this is not a proper fix. Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
Signed-off-by: Amaury Pouly <[email protected]>
pamaury
requested review from
msfschaffner,
cfrantz and
a team
as code owners
December 5, 2024 15:16
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Build with:
It compiles and links but I doubt it works out of the box. In order to get access to the files (test_rom, binary, etc), run:
It will print (for example):
WARNING: there is a major hack so far! The
opentitantool
built is that of earlgrey, ie the "golden toolchain" transition set//hw/top=earlgrey
. This was the only way to make it compile in a short time. It's unclear how much of it is earlgrey specific but I think it's not used so far in this flow.