-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An AIRBIN is an ELF file that contains AIE configuration and executable code. It is loaded to the device by the runtime by copying it to device memory and then notifying the device that continues the process. Add code to read the file, place it in device memory and notify the device. This depends on libelf (from elfutils) that is built in: github-clone-build-elfutils.sh Signed-off-by: Joel Nider <[email protected]>
- Loading branch information
Showing
12 changed files
with
275 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef AIRBIN_H | ||
#define AIRBIN_H | ||
|
||
/* | ||
Each entry describes a loadable section in device memory. The device uses | ||
this information to load the data into AIE memory. This definition is shared | ||
with the device firmware. | ||
*/ | ||
struct airbin_table_entry { | ||
uint32_t offset; // offset into allocated device memory | ||
uint32_t size; // size of the loadable section | ||
uint64_t addr; // base address to load the data | ||
}; | ||
|
||
#endif |
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
##===- utils/github-clone-build-elfutils.sh ------------------*- Script -*-===## | ||
# | ||
# Copyright (C) 2022, Advanced Micro Devices, Inc. | ||
# SPDX-License-Identifier: MIT | ||
|
||
##===----------------------------------------------------------------------===## | ||
# | ||
# This script checks out and builds libelf. | ||
# It only build the necessary libraries to minimize build time. | ||
# | ||
# This script is intended to be called from the github workflows. | ||
# | ||
# Depends on: autoconf, flex, bison, gawk | ||
##===----------------------------------------------------------------------===## | ||
|
||
INSTALL_DIR=elfutils | ||
HASH="airbin" | ||
|
||
if [[ ! -d $INSTALL_DIR ]]; then | ||
git clone --branch $HASH --depth 1 https://github.com/jnider/elfutils.git $INSTALL_DIR | ||
fi | ||
|
||
cd $INSTALL_DIR | ||
autoreconf -v -f -i | ||
./configure --program-prefix="air-" --disable-debuginfod --disable-libdebuginfod --enable-maintainer-mode | ||
|
||
|
||
# build libeu.a, required for libelf.so | ||
make -C lib | ||
|
||
# build libelf.a, libelf_pic.a and libelf.so | ||
make -C libelf |