-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
### Ticket #13944 ### Problem description Packing ELF segments together for deployment relied on HAL information. That information is present in the ELF itself and no HAL involvement is necessary. In developing this patch I discovered a bug that was mitigated by a different bug and obsolete code predating the use of ELF segments. Specifically for erisc kernel deployments packing was requested, but text memory range was incorrect. This resulted in the data segment being considered text, and the obsolete code inserted padding between the real text and the data, resulting in a deployable image, but one that was larger than necessary and would clobber any memory objects placed in that padding area. ### What's changed *) Linker scripts augmented to record the Load Memory Address(LMA) of data segments -- this is used to ensure packing is consistent *) ELF loader augmented to record the LMA. (Other cleanups also implemented) *) Replacement of the separate `PackSpans` and `Relocate` enums with a single Loading enum offering {`DISCRETE, CONTIGUOUS, CONTIGUOUS_XIP`} alternatives. (Removing an unrequired DISCRETE_XIP variant.). While the original enums are orthogonal, their use is not -- and the above mentioned bug occurred by not paying attention to how they are related. *) Removal of `core_type_idx, processor_class_idx, processor_type_idx` arguments to `get_risc_binary` *) Removal of `Memory::pack_data_into_text` and direct implementation of that functionality during the conversion from ELF. (This routine contained the obsolete workaround and was given incorrect text and data base addresses for wormhole_b0 N300) ### Checklist - [YES] Post commit CI passes - [YES] Blackhole Post commit (if applicable) - [ ] Model regression CI testing passes (if applicable) - [ ] Device performance regression CI testing passes (if applicable) - [ ] **(For models and ops writers)** Full [new models](https://github.com/tenstorrent/tt-metal/actions/workflows/full-new-models-suite.yaml) tests passes - [ ] New/Existing tests provide coverage for changes
- Loading branch information
Showing
11 changed files
with
179 additions
and
264 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.