Add os_abi for aie4 target architecture#217
Conversation
Signed-off-by: Donwalkar <sdonwalk@amd.com>
…ie4 versions + add new aie4 based arch options in aiebu-asm Signed-off-by: Donwalkar <sdonwalk@amd.com>
|
hi @donwalkarsoham |
Signed-off-by: Donwalkar <sdonwalk@amd.com>
Signed-off-by: Donwalkar <sdonwalk@amd.com>
Signed-off-by: Soham Donwalkar <35574795+donwalkarsoham@users.noreply.github.com>
| // Legacy ELF - only aie2ps_group | ||
| if (os_abi != elf_amd_aie2ps_group) | ||
| throw error(error::error_code::invalid_input, "Only aie2ps_group elf supported for legacy ELF version\n"); | ||
| } else if (abi_version == 0x04 || abi_version == 0x05) { |
There was a problem hiding this comment.
warning: 0x05 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
} else if (abi_version == 0x04 || abi_version == 0x05) {
^| throw error(error::error_code::invalid_input, | ||
| "update_kernel_name only supports OS ABI 0x46 for legacy ELF version, got: 0x" | ||
| + ELFIO::to_hex_string(os_abi)); | ||
| } else if (abi_version == 0x04 || abi_version == 0x05) { |
There was a problem hiding this comment.
warning: 0x05 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
} else if (abi_version == 0x04 || abi_version == 0x05) {
^Signed-off-by: Donwalkar <sdonwalk@amd.com>
Signed-off-by: Donwalkar <sdonwalk@amd.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Donwalkar <sdonwalk@amd.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
Are we changing the EI_VERSION (not EI_OSABI)in ELF header? |
… set to 0x20 ELF version Signed-off-by: Donwalkar <sdonwalk@amd.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
XRT team mentioned that the corresponding XRT changes have been merged and hence this change can be merged too. |
|
@HimanshuChoudhary-Xilinx please work with @rbramand-xilinx to get this retested and publish a example xrt host code. |
Problem solved by the commit
Provide a way to detect the target architecture in the ELF.
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
N/A
How problem was solved, alternative solutions (if any) and why they were rejected
1> Update ELF spec to add new os abi versions for aie4 specific architectures like aie4, aie4a and aie4z.
2> Bump up the ELF version to maintain backward compatibility.
Below is the mapping table of target architecture to os_abi and ELF version in ELF header.
3> Added a basic aie4 test and manually updated 1col-preempt test.asm file with ".target aie4". Verified if the resultant ELF had os_abi added for aie4 and ELF version bumped up.
Target architecture to EI_VERSION and EI_OSABI mapping Table
Risks (if any) associated the changes in the commit
N/A
What has been tested and how, request additional testing if necessary
1> Ran all ctests successfully.
2> Manually updated 1col-preempt test.asm file with ".target aie4". Verified if the resultant ELF had os_abi added for aie4 and ELF version bumped up. Added test to test suite.
3> All the current tests are passing correctly showing if .target is not present then current os_abi and elf version remain the same with no changes to the ELF.
Documentation impact (if any)
Updated Readme.rst and ELF spec.