├── .clang-format ├── .clang.h.in ├── .clang.lnt.in ├── .github └── FUNDING.yml ├── .gitignore ├── .gitmodules ├── .jenkins.groovy ├── CMakeLists.txt ├── LICENSE ├── README.md ├── ape ├── CMakeLists.txt ├── ape.ld ├── include │ └── ape_main.h ├── main.c ├── rmu.c ├── uswid.ini.in └── vectors.c ├── build.sh ├── cmake ├── arm.cmake ├── clang-analyzer.cmake ├── clang-format.cmake ├── compiler.cmake ├── compiler.uswid.ini.in ├── config.cmake ├── cpack.cmake ├── headers.cmake ├── lint-dummy.c ├── lint.cmake ├── mips.cmake ├── simulator.cmake ├── source_install.cmake.in ├── uswid.cmake └── version.cmake ├── fwupd ├── CMakeLists.txt ├── changelog.cmake └── metainfo.xml.in ├── include ├── APE_APE.h ├── APE_APE_PERI.h ├── APE_DEBUG.h ├── APE_DEVICE.h ├── APE_DEVICE1.h ├── APE_DEVICE2.h ├── APE_DEVICE3.h ├── APE_FILTERS0.h ├── APE_FILTERS1.h ├── APE_FILTERS2.h ├── APE_FILTERS3.h ├── APE_NVIC.h ├── APE_RX_PORT0.h ├── APE_RX_PORT1.h ├── APE_RX_PORT2.h ├── APE_RX_PORT3.h ├── APE_SHM.h ├── APE_SHM1.h ├── APE_SHM2.h ├── APE_SHM3.h ├── APE_SHM_CHANNEL0.h ├── APE_SHM_CHANNEL1.h ├── APE_SHM_CHANNEL2.h ├── APE_SHM_CHANNEL3.h ├── APE_TX_PORT0.h ├── APE_TX_PORT1.h ├── APE_TX_PORT2.h ├── APE_TX_PORT3.h ├── banned.h ├── bcm5719-endian.h ├── bcm5719_APE.h ├── bcm5719_APE_PERI.h ├── bcm5719_BOOTCODE.h ├── bcm5719_DEVICE.h ├── bcm5719_GEN.h ├── bcm5719_RXMBUF.h ├── bcm5719_SDBCACHE.h ├── bcm5719_SHM.h ├── bcm5719_SHM_CHANNEL0.h ├── bcm5719_SHM_CHANNEL1.h ├── bcm5719_SHM_CHANNEL2.h ├── bcm5719_SHM_CHANNEL3.h ├── bcm5719_TXMBUF.h ├── bcm5719_eeprom.h ├── mips │ └── stdint.h └── types.h ├── ipxact ├── .gitignore ├── APE.xml ├── APE_component.xml ├── DEVICE.xml ├── FILTERS.xml ├── NVIC.xml ├── NVM.xml ├── SHM.xml ├── bcm5719.xml └── regen.sh ├── libs ├── APE │ ├── CMakeLists.txt │ ├── ape.c │ └── include │ │ └── APE.h ├── CMakeLists.txt ├── Compress │ ├── CMakeLists.txt │ ├── compress.c │ ├── decompress.c │ └── include │ │ └── Compress.h ├── MII │ ├── CMakeLists.txt │ ├── include │ │ ├── MII.h │ │ └── bcm5719_MII.h │ └── mii.c ├── NCSI │ ├── CMakeLists.txt │ ├── include │ │ ├── Ethernet.h │ │ └── NCSI.h │ ├── ncsi.c │ └── tests │ │ ├── CMakeLists.txt │ │ ├── tests.cpp │ │ └── valid_commands.c ├── NVRam │ ├── CMakeLists.txt │ ├── EM100.c │ ├── bcm5719_NVM.h │ ├── bitbang.c │ ├── crc.c │ ├── include │ │ ├── EM100.h │ │ └── NVRam.h │ ├── nvm.c │ └── tests │ │ ├── CMakeLists.txt │ │ └── tests.cpp ├── Network │ ├── CMakeLists.txt │ ├── generic.c │ ├── include │ │ └── Network.h │ ├── ports.c │ ├── rx.c │ └── tx.c ├── OptParse │ └── CMakeLists.txt ├── Timer │ ├── CMakeLists.txt │ ├── include │ │ └── Timer.h │ └── timer.c ├── VPD │ ├── CMakeLists.txt │ ├── include │ │ └── vpd.h │ └── vpd.c ├── bcm5719 │ ├── APE_sym.s │ ├── CMakeLists.txt │ └── bcm5719_sym.s ├── elfio │ ├── .gitignore │ ├── AUTHORS │ ├── CMakeLists.txt │ ├── COPYING │ ├── ChangeLog │ ├── ELFIO.sln │ ├── ELFIOTest │ │ ├── ELFIOTest.cpp │ │ ├── ELFIOTest.vcxproj │ │ ├── ELFIOTest.vcxproj.filters │ │ ├── ELFIOTest1.cpp │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── aclocal.m4 │ │ ├── configure │ │ ├── configure.ac │ │ └── runELFtests │ ├── INSTALL │ ├── Makefile.am │ ├── Makefile.in │ ├── NEWS │ ├── README │ ├── aclocal.m4 │ ├── autogen.sh │ ├── configure │ ├── configure.ac │ ├── cygwin │ │ └── elfio.cygport │ ├── depcomp │ ├── doc │ │ ├── elfio.docx │ │ ├── images │ │ │ ├── annot-close.png │ │ │ ├── annot-open.png │ │ │ ├── blank.png │ │ │ ├── callouts │ │ │ │ ├── 1.gif │ │ │ │ ├── 1.png │ │ │ │ ├── 1.svg │ │ │ │ ├── 10.gif │ │ │ │ ├── 10.png │ │ │ │ ├── 10.svg │ │ │ │ ├── 11.gif │ │ │ │ ├── 11.png │ │ │ │ ├── 11.svg │ │ │ │ ├── 12.gif │ │ │ │ ├── 12.png │ │ │ │ ├── 12.svg │ │ │ │ ├── 13.gif │ │ │ │ ├── 13.png │ │ │ │ ├── 13.svg │ │ │ │ ├── 14.gif │ │ │ │ ├── 14.png │ │ │ │ ├── 14.svg │ │ │ │ ├── 15.gif │ │ │ │ ├── 15.png │ │ │ │ ├── 15.svg │ │ │ │ ├── 16.svg │ │ │ │ ├── 17.svg │ │ │ │ ├── 18.svg │ │ │ │ ├── 19.svg │ │ │ │ ├── 2.gif │ │ │ │ ├── 2.png │ │ │ │ ├── 2.svg │ │ │ │ ├── 20.svg │ │ │ │ ├── 21.svg │ │ │ │ ├── 22.svg │ │ │ │ ├── 23.svg │ │ │ │ ├── 24.svg │ │ │ │ ├── 25.svg │ │ │ │ ├── 26.svg │ │ │ │ ├── 27.svg │ │ │ │ ├── 28.svg │ │ │ │ ├── 29.svg │ │ │ │ ├── 3.gif │ │ │ │ ├── 3.png │ │ │ │ ├── 3.svg │ │ │ │ ├── 30.svg │ │ │ │ ├── 4.gif │ │ │ │ ├── 4.png │ │ │ │ ├── 4.svg │ │ │ │ ├── 5.gif │ │ │ │ ├── 5.png │ │ │ │ ├── 5.svg │ │ │ │ ├── 6.gif │ │ │ │ ├── 6.png │ │ │ │ ├── 6.svg │ │ │ │ ├── 7.gif │ │ │ │ ├── 7.png │ │ │ │ ├── 7.svg │ │ │ │ ├── 8.gif │ │ │ │ ├── 8.png │ │ │ │ ├── 8.svg │ │ │ │ ├── 9.gif │ │ │ │ ├── 9.png │ │ │ │ └── 9.svg │ │ │ ├── caution.gif │ │ │ ├── caution.png │ │ │ ├── caution.svg │ │ │ ├── caution.tif │ │ │ ├── colorsvg │ │ │ │ ├── caution.svg │ │ │ │ ├── home.svg │ │ │ │ ├── important.svg │ │ │ │ ├── next.svg │ │ │ │ ├── note.svg │ │ │ │ ├── prev.svg │ │ │ │ ├── tip.svg │ │ │ │ ├── up.svg │ │ │ │ └── warning.svg │ │ │ ├── draft.png │ │ │ ├── home.gif │ │ │ ├── home.png │ │ │ ├── home.svg │ │ │ ├── important.gif │ │ │ ├── important.png │ │ │ ├── important.svg │ │ │ ├── important.tif │ │ │ ├── next.gif │ │ │ ├── next.png │ │ │ ├── next.svg │ │ │ ├── note.gif │ │ │ ├── note.png │ │ │ ├── note.svg │ │ │ ├── note.tif │ │ │ ├── prev.gif │ │ │ ├── prev.png │ │ │ ├── prev.svg │ │ │ ├── tip.gif │ │ │ ├── tip.png │ │ │ ├── tip.svg │ │ │ ├── tip.tif │ │ │ ├── toc-blank.png │ │ │ ├── toc-minus.png │ │ │ ├── toc-plus.png │ │ │ ├── up.gif │ │ │ ├── up.png │ │ │ ├── up.svg │ │ │ ├── warning.gif │ │ │ ├── warning.png │ │ │ ├── warning.svg │ │ │ └── warning.tif │ │ └── site │ │ │ ├── index.htm │ │ │ └── style.css │ ├── elf_examples │ │ ├── 64bitLOAD.elf │ │ ├── ARMSCII-8.so │ │ ├── arm_v7m_test_debug.elf │ │ ├── arm_v7m_test_release.elf │ │ ├── asm │ │ ├── asm.lst │ │ ├── asm.readelf │ │ ├── asm.s │ │ ├── asm64 │ │ ├── asm64.lst │ │ ├── crash-060833f08dc14d1712428742b3cad7af17b36bb7 │ │ ├── crash-7d695153fd8052529d480c2352d4ada33a44bada │ │ ├── crash-b82f05b0b25c8fdc98480e6d76b6d5f9164ae2bc │ │ ├── crash-e1ce7cecf01cf800397a4302854d9d76fa19763c │ │ ├── crash-e3c41070342cf84dea077356ddbb8ebf4326a601 │ │ ├── elf_header_i386_32.elf │ │ ├── entropy.so │ │ ├── hello.c │ │ ├── hello_32 │ │ ├── hello_32.txt │ │ ├── hello_32_o.txt │ │ ├── hello_64 │ │ ├── hello_64.txt │ │ ├── hello_64_o.txt │ │ ├── hello_arm │ │ ├── hello_arm_stripped │ │ ├── libfunc.so │ │ ├── libfunc32.so │ │ ├── ls │ │ ├── ls.readelf │ │ ├── main │ │ ├── main32 │ │ ├── ppc-32bit-specimen3.elf │ │ ├── read_write_arm_elf32_input │ │ ├── startup.eln │ │ ├── startup_orig.eln │ │ ├── test_ppc │ │ ├── test_ppc.cpp │ │ ├── test_ppc.txt │ │ ├── test_ppc_o.txt │ │ ├── write_exe_i386_32_match │ │ └── write_exe_i386_32_work_dump.txt │ ├── elfio │ │ ├── elf_types.hpp │ │ ├── elfio.hpp │ │ ├── elfio_dump.hpp │ │ ├── elfio_dynamic.hpp │ │ ├── elfio_header.hpp │ │ ├── elfio_note.hpp │ │ ├── elfio_relocation.hpp │ │ ├── elfio_section.hpp │ │ ├── elfio_segment.hpp │ │ ├── elfio_strings.hpp │ │ ├── elfio_symbols.hpp │ │ └── elfio_utils.hpp │ ├── examples │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── RelocationTable │ │ │ └── RelocationTable.cpp │ │ ├── anonymizer │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── anonymizer.cpp │ │ ├── elfdump │ │ │ ├── ELFDump.vcxproj │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── elfdump.cpp │ │ ├── tutorial │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── tutorial.cpp │ │ ├── write_obj │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ └── write_obj.cpp │ │ └── writer │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── writer.cpp │ │ │ ├── writer.vcxproj │ │ │ ├── writer.vcxproj.filters │ │ │ └── writer.vcxproj.user │ ├── install-sh │ └── missing └── printf │ ├── .gitattributes │ ├── .travis.yml │ ├── CMakeLists.txt │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── ape_console.h │ ├── ape_putchar.c │ ├── codecov.yml │ ├── em100_putchar.c │ ├── em100_putchar.h │ ├── mips_putchar.c │ ├── printf.c │ ├── printf.h │ └── test │ ├── catch.hpp │ └── test_suite.cpp ├── simulator ├── APE.cpp ├── APE_DEVICE.cpp ├── APE_DEVICE0.cpp ├── APE_DEVICE1.cpp ├── APE_DEVICE1_sim.cpp ├── APE_DEVICE2.cpp ├── APE_DEVICE2_sim.cpp ├── APE_DEVICE3.cpp ├── APE_DEVICE3_sim.cpp ├── APE_DEVICE_sim.cpp ├── APE_FILTERS0.cpp ├── APE_FILTERS0_sim.cpp ├── APE_FILTERS1.cpp ├── APE_FILTERS1_sim.cpp ├── APE_FILTERS2.cpp ├── APE_FILTERS2_sim.cpp ├── APE_FILTERS3.cpp ├── APE_FILTERS3_sim.cpp ├── APE_HAL.cpp ├── APE_NVIC.cpp ├── APE_NVIC_sim.cpp ├── APE_RX_PORT0.cpp ├── APE_RX_PORT0_sim.cpp ├── APE_RX_PORT1.cpp ├── APE_RX_PORT1_sim.cpp ├── APE_RX_PORT2.cpp ├── APE_RX_PORT2_sim.cpp ├── APE_RX_PORT3.cpp ├── APE_RX_PORT3_sim.cpp ├── APE_TX_PORT0.cpp ├── APE_TX_PORT0_sim.cpp ├── APE_TX_PORT1.cpp ├── APE_TX_PORT1_sim.cpp ├── APE_TX_PORT2.cpp ├── APE_TX_PORT2_sim.cpp ├── APE_TX_PORT3.cpp ├── APE_TX_PORT3_sim.cpp ├── CMakeLists.txt ├── HAL.cpp ├── bcm5719.cpp ├── bcm5719_APE.cpp ├── bcm5719_APE_PERI.cpp ├── bcm5719_APE_PERI_sim.cpp ├── bcm5719_APE_sim.cpp ├── bcm5719_DEVICE.cpp ├── bcm5719_DEVICE_sim.cpp ├── bcm5719_GEN.cpp ├── bcm5719_GEN_sim.cpp ├── bcm5719_MII.cpp ├── bcm5719_MII_sim.cpp ├── bcm5719_NVM.cpp ├── bcm5719_NVM_sim.cpp ├── bcm5719_SHM.cpp ├── bcm5719_SHM_CHANNEL0.cpp ├── bcm5719_SHM_CHANNEL0_sim.cpp ├── bcm5719_SHM_CHANNEL1.cpp ├── bcm5719_SHM_CHANNEL1_sim.cpp ├── bcm5719_SHM_CHANNEL2.cpp ├── bcm5719_SHM_CHANNEL2_sim.cpp ├── bcm5719_SHM_CHANNEL3.cpp ├── bcm5719_SHM_CHANNEL3_sim.cpp ├── bcm5719_SHM_sim.cpp ├── include │ ├── CXXRegister.h │ └── HAL.hpp ├── pci.cpp └── pci_config.h ├── stage1 ├── CMakeLists.txt ├── crt.s ├── init_hw.c ├── main.c ├── stage1.h ├── stage1.ld └── uswid.ini.in ├── tests └── CMakeLists.txt └── utils ├── CMakeLists.txt ├── ape2elf ├── CMakeLists.txt └── main.cpp ├── apeconsole ├── CMakeLists.txt └── main.cpp ├── bcmflash ├── CMakeLists.txt ├── bcmflash.h ├── create_header.cpp ├── create_header.h ├── ethtool.c ├── ethtool.h ├── fileio.cpp ├── main.cpp ├── nvm.cpp ├── nvm_blackbird.c ├── nvm_kh08p.c └── nvm_talos2.c ├── bcmregtool ├── CMakeLists.txt ├── apeloader │ ├── CMakeLists.txt │ ├── ape.ld │ └── main.c └── main.cpp ├── bin2c ├── CMakeLists.txt └── main.cpp ├── cat ├── CMakeLists.txt └── main.cpp ├── elf2ape ├── CMakeLists.txt └── main.cpp └── uswidtool.py /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [meklort] 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "tests/googletest"] 2 | path = tests/googletest 3 | url = https://github.com/google/googletest.git 4 | branch = master 5 | [submodule "libs/OptParse/cpp-optparse"] 6 | path = libs/OptParse/cpp-optparse 7 | url = https://github.com/weisslj/cpp-optparse.git 8 | [submodule "utils/python-uswid"] 9 | path = utils/python-uswid 10 | url = https://github.com/hughsie/python-uswid.git 11 | [submodule "utils/cbor2"] 12 | path = utils/cbor2 13 | url = https://github.com/agronholm/cbor2.git 14 | [submodule "utils/pefile"] 15 | path = utils/pefile 16 | url = https://github.com/erocarrera/pefile.git 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2018, Evan Lojewski 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /ape/uswid.ini.in: -------------------------------------------------------------------------------- 1 | [uSWID] 2 | tag-id = @ape_TAG_ID@ 3 | software-name = ape 4 | software-version = @VERSION_STRING@ 5 | version-scheme = multipartnumeric 6 | product = ape 7 | summary = BCM5719 APE Firmware (NC-SI) 8 | colloquial-version = @GIT_HASH@ 9 | 10 | [uSWID-Entity:TagCreator] 11 | name = Evan Lojewski 12 | regid = meklort.com 13 | extra-roles = Licensor,Maintainer,SoftwareCreator 14 | 15 | [uSWID-Link] 16 | rel = license 17 | href = https://spdx.org/licenses/BSD-3-Clause.html 18 | 19 | [uSWID-Link:source] 20 | rel = source 21 | href = https://github.com/meklort/bcm5719-fw/tree/@GIT_HASH@ 22 | 23 | [uSWID-Link:@COMPILER_NAME@] 24 | rel = see-also 25 | href = swid:@COMPILER_TAG_ID@ 26 | -------------------------------------------------------------------------------- /cmake/clang-analyzer.cmake: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file clang-analyzer.cmake 4 | ### 5 | ### @project 6 | ### 7 | ### @brief clang-analyzer cmake support 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2020, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | IF(NOT DISABLE_CLANG_ANALYZER) 46 | SET(SCAN_BUILD ${COMPILER_BASE}/bin/scan-build) 47 | IF(SCAN_BUILD) 48 | SET(CMAKE_C_COMPILER_LAUNCHER ${SCAN_BUILD} --status-bugs) 49 | SET(CMAKE_CXX_COMPILER_LAUNCHER ${SCAN_BUILD} --status-bugs) 50 | ELSE() 51 | MESSAGE(STATUS "Unable to locate clang-analyzer (scan-build). Disabling linting.") 52 | ENDIF() 53 | ELSE() 54 | MESSAGE(STATUS "Disabling linting.") 55 | ENDIF() 56 | -------------------------------------------------------------------------------- /cmake/compiler.uswid.ini.in: -------------------------------------------------------------------------------- 1 | [uSWID] 2 | tag-id = @COMPILER_TAG_ID@ 3 | software-name = @COMPILER_NAME@ 4 | software-version = @COMPILER_VERSION@ 5 | version-scheme = multipartnumeric 6 | colloquial-version = @COMPILER_HASH@ 7 | 8 | [uSWID-Entity:TagCreator] 9 | name = Evan Lojewski 10 | regid = meklort.com 11 | 12 | [uSWID-Link] 13 | rel = source 14 | href = @COMPILER_URL@ 15 | -------------------------------------------------------------------------------- /cmake/lint-dummy.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/cmake/lint-dummy.c -------------------------------------------------------------------------------- /cmake/source_install.cmake.in: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file source_install.cmake.in 4 | ### 5 | ### @project 6 | ### 7 | ### @brief Release Pacakge configurations 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2020, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | if(CPACK_SOURCE_INSTALLED_DIRECTORIES) 46 | file(INSTALL 47 | DESTINATION 48 | "${CMAKE_INSTALL_PREFIX}/" 49 | TYPE FILE 50 | FILES 51 | "@CMAKE_BINARY_DIR@/changelog" 52 | "@CMAKE_BINARY_DIR@/version" 53 | ) 54 | endif() 55 | -------------------------------------------------------------------------------- /fwupd/metainfo.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @APP_STREAM_PREFIX@.@TARGET_ID@ 5 | @TARGET_NAME@ 6 | BCM5719 7 | Firmware for the @TARGET_NAME@ BCM5719 NIC 8 | oss-firmware 9 | 10 |

11 | This is alternate firmware built by the community using only free 12 | software tools. 13 |

14 |
15 | 16 | 17 | @FIRMWARE_ID@ 18 | 19 | 20 | https://github.com/meklort/bcm5719-fw 21 | 22 | CC0-1.0 23 | BSD-3-Clause 24 | Evan Lojewski 25 | 26 | 27 | 28 | 29 | 30 | @DESCRIPTION@ 31 | 32 | https://github.com/meklort/bcm5719-fw/commit/@GIT_HASH@ 33 | 34 | 35 | 36 | 37 | X-NetworkInterface 38 | X-Device 39 | 40 | 41 | 42 | 43 | org.freedesktop.fwupd 44 | switch-branch 45 | @HARDWARE_FILTER@ 46 | 47 | 48 | 49 | com.broadcom.bcm57xx 50 | triplet 51 | unsigned 52 | 53 | 54 | 55 | 56 | bcm5719 57 | ape 58 | @TARGET_ID@ 59 | 60 |
61 | -------------------------------------------------------------------------------- /include/mips/stdint.h: -------------------------------------------------------------------------------- 1 | #ifndef STDINT_H 2 | #define STDINT_H 3 | 4 | typedef unsigned char uint8_t; 5 | typedef unsigned short uint16_t; 6 | typedef unsigned int uint32_t; 7 | #endif -------------------------------------------------------------------------------- /ipxact/.gitignore: -------------------------------------------------------------------------------- 1 | bcm5719_full.xml 2 | APE_full.xml 3 | -------------------------------------------------------------------------------- /ipxact/regen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | IPXACT=~/git/ipxact/build/ipxact 4 | PROJECT=bcm5719 5 | 6 | echo "Regenerating Bcm5719 header" 7 | 8 | ${IPXACT} -p ${PROJECT} APE_component.xml SHM.xml DEVICE.xml NVM.xml bcm5719.xml bcm5719_full.xml 9 | 10 | ${IPXACT} -p ${PROJECT} bcm5719_full.xml bcm5719.h 11 | 12 | mv bcm5719_NVM.h ../libs/NVRam/ 13 | mv bcm5719_MII.h ../libs/MII/include/ 14 | mv bcm5719_DEVICE.h ../include/ 15 | mv bcm5719_GEN.h ../include/ 16 | mv bcm5719_APE.h ../include/ 17 | mv bcm5719_APE_PERI.h ../include/ 18 | mv bcm5719_SHM.h ../include/ 19 | mv bcm5719_SHM_CHANNEL*.h ../include/ 20 | mv bcm5719_RXMBUF.h ../include 21 | mv bcm5719_SDBCACHE.h ../include 22 | mv bcm5719_TXMBUF.h ../include 23 | mv bcm5719_BOOTCODE.h ../include 24 | 25 | 26 | ${IPXACT} -p ${PROJECT} bcm5719_full.xml bcm5719.cpp 27 | rm bcm5719_BOOTCODE*.cpp 28 | rm bcm5719_RXMBUF*.cpp 29 | rm bcm5719_TXMBUF*.cpp 30 | rm bcm5719_SDBCACHE*.cpp 31 | mv ./*.cpp ../simulator/ 32 | 33 | # ${IPXACT} -p ${PROJECT} bcm5719_full.xml bcm5719.s 34 | ${IPXACT} -p ${PROJECT} bcm5719_full.xml -t asym bcm5719_sym.s 35 | mv ./*.s ../libs/bcm5719/ 36 | 37 | 38 | PROJECT=ape 39 | 40 | echo "Regenerating APE header" 41 | 42 | 43 | ${IPXACT} -p ${PROJECT} APE_component.xml FILTERS.xml SHM.xml NVIC.xml DEVICE.xml NVM.xml APE.xml APE_full.xml 44 | 45 | ${IPXACT} -p ${PROJECT} APE_full.xml APE.h 46 | mv APE_NVIC.h ../include/ 47 | mv APE_APE.h ../include/ 48 | mv APE_APE_PERI.h ../include/ 49 | mv APE_SHM*.h ../include 50 | mv APE_FILTERS*.h ../include 51 | mv APE_DEVICE*.h ../include 52 | mv APE_TX_PORT*.h ../include 53 | mv APE_RX_PORT*.h ../include 54 | 55 | # ${IPXACT} -p ${PROJECT} NVIC.xml APE_full.xml APE.s 56 | ${IPXACT} -p ${PROJECT} APE_full.xml -t asym APE_sym.s 57 | mv ./*.s ../libs/bcm5719/ 58 | 59 | ${IPXACT} -p ${PROJECT} APE_full.xml -t ape_cpp APE.cpp 60 | rm APE_APE*.cpp 61 | rm APE_SHM*.cpp 62 | rm APE_NVM*.cpp 63 | mv ./*.cpp ../simulator/ 64 | -------------------------------------------------------------------------------- /libs/APE/include/APE.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE.h 4 | /// 5 | /// @project 6 | /// 7 | /// @brief APE Support Routines 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2018, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the copyright holder nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #ifndef LIBS_APE_H 46 | #define LIBS_APE_H 47 | 48 | void APE_aquireLock(void); 49 | 50 | void APE_releaseLock(void); 51 | 52 | void APE_aquireMemLock(void); 53 | 54 | void APE_releaseMemLock(void); 55 | 56 | void APE_releaseAllLocks(void); 57 | 58 | #endif /* LIBS_APE_H */ 59 | -------------------------------------------------------------------------------- /libs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file libs/CMakeLists.txt 4 | ### 5 | ### @project bcm5719-fw 6 | ### 7 | ### @brief Library CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2018, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | 46 | add_subdirectory(NVRam) 47 | add_subdirectory(APE) 48 | add_subdirectory(MII) 49 | add_subdirectory(VPD) 50 | 51 | add_subdirectory(Timer) 52 | 53 | add_subdirectory(NCSI) 54 | add_subdirectory(Network) 55 | 56 | add_subdirectory(OptParse) 57 | 58 | add_subdirectory(bcm5719) 59 | 60 | add_subdirectory(printf) 61 | 62 | add_subdirectory(Compress) 63 | add_subdirectory(elfio) 64 | -------------------------------------------------------------------------------- /libs/Compress/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file libs/APE/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief APE CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2018, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(Compress) 46 | 47 | 48 | # Host library 49 | simulator_add_library(${PROJECT_NAME} STATIC decompress.c compress.c) 50 | target_include_directories(${PROJECT_NAME} PUBLIC include) 51 | target_include_directories(${PROJECT_NAME} PUBLIC ../../include) 52 | 53 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 54 | -------------------------------------------------------------------------------- /libs/Compress/include/Compress.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file Compress.h 4 | /// 5 | /// @project 6 | /// 7 | /// @brief Compression Routines 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2019, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the copyright holder nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #ifndef COMPRESS_H 46 | #define COMPRESS_H 47 | 48 | #include 49 | 50 | #ifdef __cplusplus 51 | extern "C" { 52 | #endif 53 | 54 | int32_t decompress( uint8_t* outBuffer, int32_t outBytes, 55 | const uint8_t* inBuffer, int32_t inBytes); 56 | 57 | int32_t compress( uint8_t* outBuffer, int32_t outBytes, 58 | const uint8_t* inBuffer, int32_t inBytes); 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif /* COMPRESS_H */ 65 | -------------------------------------------------------------------------------- /libs/NCSI/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file libs/NCSI/tests/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief NCSI Test CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2019, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(NCSI-tests) 46 | 47 | set(SOURCES valid_commands.c tests.cpp) 48 | 49 | simulator_add_executable(${PROJECT_NAME} ${SOURCES}) 50 | target_link_libraries(${PROJECT_NAME} NCSI simulator gtest gtest_main) 51 | gtest_discover_tests(${PROJECT_NAME}) 52 | 53 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 54 | -------------------------------------------------------------------------------- /libs/NVRam/include/EM100.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file EM100.h 4 | /// 5 | /// @project 6 | /// 7 | /// @brief EM100 Debug Routines 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2019, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the copyright holder nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | #ifndef EM100_H 45 | #define EM100_H 46 | 47 | #include 48 | 49 | /** 50 | * Print a character out the SPI bus using the EM100 hyperterminal protocl 51 | * 52 | * This routine caches all characters untill a newline is found or the 53 | * buffer is full. 54 | */ 55 | void NVRam_EM100_putchar(char c); 56 | 57 | #endif /* EM100_H */ -------------------------------------------------------------------------------- /libs/NVRam/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file libs/NVRam/tests/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief NVRam Test CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2019, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(NVRam-tests) 46 | 47 | set(SOURCES tests.cpp) 48 | 49 | simulator_add_executable(${PROJECT_NAME} ${SOURCES}) 50 | target_link_libraries(${PROJECT_NAME} NVRam simulator gtest gtest_main) 51 | gtest_discover_tests(${PROJECT_NAME}) 52 | 53 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 54 | -------------------------------------------------------------------------------- /libs/OptParse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file libs/OptParse/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief Option Parsing CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2018, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(OptParse) 46 | 47 | # Host library Only 48 | add_library(${PROJECT_NAME} STATIC cpp-optparse/OptionParser.cpp cpp-optparse/OptionParser.h) 49 | target_include_directories(${PROJECT_NAME} PUBLIC cpp-optparse) 50 | -------------------------------------------------------------------------------- /libs/bcm5719/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file libs/bcm5719/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief bcm5719 hardware library (regiters) 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2018, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(bcm5719 ASM) 46 | 47 | mips_add_library(${PROJECT_NAME}-mips STATIC bcm5719_sym.s) 48 | 49 | arm_add_library(${PROJECT_NAME}-arm STATIC APE_sym.s) 50 | -------------------------------------------------------------------------------- /libs/elfio/.gitignore: -------------------------------------------------------------------------------- 1 | autom4te.cache 2 | Debug 3 | Release 4 | ELFIO.sdf 5 | ELFIO.v11.suo 6 | ELFIO.opensdf 7 | ELFIO.v12.suo 8 | .vs 9 | 10 | ELFIOTest/Debug 11 | ELFIOTest/Release 12 | ELFIOTest/ELFIOTest.vcxproj.user 13 | ELFIOTest/ELFIOTest 14 | 15 | examples/ELFDump/Debug 16 | examples/anonymizer/anonymizer 17 | examples/elfdump/elfdump 18 | examples/tutorial/tutorial 19 | examples/write_obj/write_obj 20 | examples/writer/writer 21 | 22 | 23 | # generated elf files 24 | elf_examples/*_copy 25 | elf_examples/*_copy.elf 26 | elf_examples/elf_dummy_header_i386_32.elf 27 | elf_examples/elf_dummy_header_i386_64.elf 28 | elf_examples/elf_dummy_header_ppc_32.elf 29 | elf_examples/elf_dummy_header_ppc_64.elf 30 | elf_examples/write_exe_i386_32 31 | elf_examples/write_exe_i386_32_w_addr 32 | elf_examples/write_exe_i386_32_wo_addr 33 | elf_examples/write_exe_i386_32_section_added 34 | elf_examples/ppc-32bit-testcopy*.elf 35 | 36 | # various unwanted files (backups, objects, cmake artifacts) 37 | *~ 38 | *.o 39 | *.kate-swp 40 | *.swp 41 | .#* 42 | \#*# 43 | CMakeCache.txt 44 | Makefile 45 | CMakeFiles 46 | /build*/ 47 | *.res 48 | 49 | # autotools artifacts 50 | .deps 51 | config.status 52 | ELFIOTest/runELFtests.trs 53 | 54 | # eclipse project files 55 | .settings 56 | .project 57 | .cproject 58 | .cdtproject 59 | .cdtbuild 60 | 61 | # netbeans project files 62 | /dist/ 63 | Makefile 64 | .dep.inc 65 | nbproject 66 | 67 | # QtCreator project files 68 | CMakeLists.txt.user 69 | 70 | # ignore all _ prefixed directories (usually used for generated directories) 71 | _*/ 72 | 73 | # Latex build output 74 | *.pdf 75 | *.log 76 | *.out 77 | *.aux 78 | *.bbl 79 | *.toc 80 | *.blg 81 | /examples/elfdump/ELFDump.vcxproj.user 82 | -------------------------------------------------------------------------------- /libs/elfio/AUTHORS: -------------------------------------------------------------------------------- 1 | ELFIO library implemented by 2 | Serge Lamikhov-Center 3 | -------------------------------------------------------------------------------- /libs/elfio/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file libs/MII/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief MII CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2018, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(elfio) 46 | 47 | # Header library 48 | add_library(${PROJECT_NAME} INTERFACE) 49 | target_include_directories(${PROJECT_NAME} INTERFACE .) 50 | -------------------------------------------------------------------------------- /libs/elfio/COPYING: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2001-2011 by Serge Lamikhov-Center 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/elfio/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/ChangeLog -------------------------------------------------------------------------------- /libs/elfio/ELFIO.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ELFDump", "examples\elfdump\ELFDump.vcxproj", "{CBAA735F-E237-4976-909F-2349920ED871}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ELFIOTest", "ELFIOTest\ELFIOTest.vcxproj", "{FC8A3379-B8AA-4C32-804F-F8C43AFBC2A1}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "writer", "examples\writer\writer.vcxproj", "{4E5A96DB-F6E9-4EEE-90BE-67B722DA8C84}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {CBAA735F-E237-4976-909F-2349920ED871}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {CBAA735F-E237-4976-909F-2349920ED871}.Debug|Win32.Build.0 = Debug|Win32 18 | {CBAA735F-E237-4976-909F-2349920ED871}.Release|Win32.ActiveCfg = Release|Win32 19 | {CBAA735F-E237-4976-909F-2349920ED871}.Release|Win32.Build.0 = Release|Win32 20 | {FC8A3379-B8AA-4C32-804F-F8C43AFBC2A1}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {FC8A3379-B8AA-4C32-804F-F8C43AFBC2A1}.Debug|Win32.Build.0 = Debug|Win32 22 | {FC8A3379-B8AA-4C32-804F-F8C43AFBC2A1}.Release|Win32.ActiveCfg = Release|Win32 23 | {FC8A3379-B8AA-4C32-804F-F8C43AFBC2A1}.Release|Win32.Build.0 = Release|Win32 24 | {4E5A96DB-F6E9-4EEE-90BE-67B722DA8C84}.Debug|Win32.ActiveCfg = Debug|Win32 25 | {4E5A96DB-F6E9-4EEE-90BE-67B722DA8C84}.Debug|Win32.Build.0 = Debug|Win32 26 | {4E5A96DB-F6E9-4EEE-90BE-67B722DA8C84}.Release|Win32.ActiveCfg = Release|Win32 27 | {4E5A96DB-F6E9-4EEE-90BE-67B722DA8C84}.Release|Win32.Build.0 = Release|Win32 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /libs/elfio/ELFIOTest/ELFIOTest.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | -------------------------------------------------------------------------------- /libs/elfio/ELFIOTest/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir) 2 | bin_PROGRAMS = ELFIOTest 3 | ELFIOTest_SOURCES = ELFIOTest.cpp ELFIOTest1.cpp 4 | ELFIOTest_LDADD = -lboost_unit_test_framework 5 | 6 | TESTS=runELFtests 7 | -------------------------------------------------------------------------------- /libs/elfio/ELFIOTest/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT([ELFIOTest],[3.4]) 2 | AM_INIT_AUTOMAKE([-Wall -Werror foreign]) 3 | AC_PROG_CXX 4 | AC_CONFIG_FILES([ 5 | Makefile 6 | ]) 7 | AC_OUTPUT 8 | -------------------------------------------------------------------------------- /libs/elfio/ELFIOTest/runELFtests: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ELFIOTest requires to have the current working directory here, 4 | # otherwise it would not find its test files 5 | cd `dirname $0` 6 | ./ELFIOTest 7 | -------------------------------------------------------------------------------- /libs/elfio/INSTALL: -------------------------------------------------------------------------------- 1 | ELFIO is a header-only C++ library - installation does not require any 2 | (pre)compilation step. Just copy 'elfio' folder into standard include directory. 3 | 4 | For example: 5 | cp -R elfio /usr/include 6 | 7 | Alternatively, it is possible to modify compiler's include search path - 8 | '-I' option in GCC; '/I' in MSVC. 9 | 10 | Makefile(s) that come with the distribution package are provided for 11 | example files compilation only. 12 | 13 | To compile the examples, use the commands below: 14 | ./configure 15 | make 16 | -------------------------------------------------------------------------------- /libs/elfio/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = examples 2 | nobase_include_HEADERS = elfio/elf_types.hpp elfio/elfio_dynamic.hpp \ 3 | elfio/elfio.hpp elfio/elfio_header.hpp \ 4 | elfio/elfio_note.hpp elfio/elfio_relocation.hpp \ 5 | elfio/elfio_section.hpp elfio/elfio_segment.hpp \ 6 | elfio/elfio_strings.hpp elfio/elfio_symbols.hpp \ 7 | elfio/elfio_utils.hpp elfio/elfio_dump.hpp 8 | EXTRA_DIST = doc/site/elfio.pdf 9 | dist-hook: 10 | mv $(distdir)/doc/site/elfio.pdf $(distdir)/doc 11 | rm -Rf $(distdir)/doc/site 12 | -------------------------------------------------------------------------------- /libs/elfio/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/NEWS -------------------------------------------------------------------------------- /libs/elfio/README: -------------------------------------------------------------------------------- 1 | ELFIO is a header-only C++ library intended for reading and generating 2 | files in the ELF binary format. It is used as a standalone library - it is not 3 | dependant on any other product or project. Adhering to ISO C++, it compiles on 4 | a wide variety of architectures and compilers. 5 | -------------------------------------------------------------------------------- /libs/elfio/autogen.sh: -------------------------------------------------------------------------------- 1 | autoreconf --install 2 | -------------------------------------------------------------------------------- /libs/elfio/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT([ELFIO], [3.5]) 2 | AM_INIT_AUTOMAKE([-Wall -Werror foreign]) 3 | AC_PROG_CXX 4 | AC_CONFIG_FILES([ 5 | Makefile 6 | examples/Makefile 7 | examples/elfdump/Makefile 8 | examples/tutorial/Makefile 9 | examples/writer/Makefile 10 | examples/anonymizer/Makefile 11 | examples/write_obj/Makefile 12 | ]) 13 | AC_OUTPUT 14 | -------------------------------------------------------------------------------- /libs/elfio/cygwin/elfio.cygport: -------------------------------------------------------------------------------- 1 | inherit python python3 2 | 3 | NAME="ELFIO" 4 | VERSION=3.3 5 | RELEASE=1 6 | CATEGORY="Devel System Libs" 7 | SUMMARY="ELFIO is a header-only C++ library intended for reading and generating 8 | files in the ELF binary format" 9 | DESCRIPTION="ELFIO is a small, header-only C++ library that provides a simple 10 | interface for reading and generating files in ELF binary format. It is used 11 | as a standalone library - it is not dependant on any other product or project. 12 | Adhering to ISO C++, it compiles on a wide variety of architectures 13 | and compilers." 14 | 15 | HOMEPAGE="http://elfio.sourceforge.net/" 16 | SRC_URI="https://sourceforge.net/projects/elfio/files/ELFIO-sources/${PN}-${PV}/elfio-${PV}.tar.gz" 17 | SRC_DIR="${PN}-${PV}" 18 | 19 | PKG_NAMES="ELFIO" 20 | ELFIO_REQUIRES="cygwin" 21 | ELFIO_CONTENTS="usr/include/ usr/share/${PN}" 22 | ELFIO_DOCS='AUTHORS COPYING README doc/elfio.pdf' 23 | 24 | src_compile() { 25 | cd ${B} 26 | } 27 | 28 | src_install() { 29 | cd ${B} 30 | dodir /usr/include 31 | cp -r ${S}/elfio ${D}/usr/include/ 32 | 33 | dodir /usr/share/${PN} 34 | cp -r ${S}/configure ${S}/depcomp ${S}/install-sh ${S}/missing \ 35 | ${S}/configure.ac ${S}/Makefile.am ${S}/Makefile.in ${S}/aclocal.m4 \ 36 | ${S}/examples \ 37 | ${D}/usr/share/${PN} 38 | } 39 | -------------------------------------------------------------------------------- /libs/elfio/doc/elfio.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/elfio.docx -------------------------------------------------------------------------------- /libs/elfio/doc/images/annot-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/annot-close.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/annot-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/annot-open.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/blank.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/1.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/1.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/10.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/10.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/10.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/11.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/11.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/11.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/12.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/12.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/12.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/13.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/13.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/13.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/14.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/14.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/14.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/15.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/15.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/15.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/16.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/17.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/18.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/19.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/2.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/2.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/20.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/21.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/22.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/23.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/24.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/25.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/26.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/27.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/28.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/29.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 15 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/3.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/3.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/30.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 17 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/4.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/4.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/4.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/5.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/5.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/5.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/6.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/6.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/6.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/7.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/7.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/7.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/8.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/8.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/8.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/9.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/callouts/9.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/callouts/9.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | ]> 7 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/caution.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/caution.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/caution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/caution.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/caution.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | ]> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/caution.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/caution.tif -------------------------------------------------------------------------------- /libs/elfio/doc/images/draft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/draft.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/home.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/home.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/home.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | ]> 11 | 12 | 13 | 14 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/important.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/important.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/important.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/important.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/important.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | ]> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/important.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/important.tif -------------------------------------------------------------------------------- /libs/elfio/doc/images/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/next.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/next.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/next.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/note.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/note.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/note.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/note.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | ]> 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/note.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/note.tif -------------------------------------------------------------------------------- /libs/elfio/doc/images/prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/prev.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/prev.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/prev.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/tip.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/tip.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/tip.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/tip.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | ]> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/tip.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/tip.tif -------------------------------------------------------------------------------- /libs/elfio/doc/images/toc-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/toc-blank.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/toc-minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/toc-minus.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/toc-plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/toc-plus.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/up.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/up.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/warning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/warning.gif -------------------------------------------------------------------------------- /libs/elfio/doc/images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/warning.png -------------------------------------------------------------------------------- /libs/elfio/doc/images/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | ]> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /libs/elfio/doc/images/warning.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/doc/images/warning.tif -------------------------------------------------------------------------------- /libs/elfio/doc/site/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | color:#ffffff; white 3 | color:#e0e0e0; light gray 4 | color:#f8f8f8; light gray 5 | color:#003366; dark blue 6 | color:#555555; gray 7 | color:#ff9933; light orange 8 | color:#cc3300; red/brown/orange 9 | color:#660066; purple 10 | color:#669900; green 11 | */ 12 | 13 | a { 14 | color:#003366; 15 | text-decoration:underline; 16 | } 17 | 18 | a:hover { 19 | color:#ff9933; 20 | } 21 | 22 | body { 23 | font-family: verdana, tahoma, helvetica, arial, sans-serif; 24 | font-size: 90%; 25 | background-color:#ffffff; 26 | margin: 1em; 27 | } 28 | 29 | pre { 30 | font-family: courier, serif; 31 | background-color:#f8f8f8; 32 | margin: 1.5em; 33 | font-size:90%; 34 | } 35 | 36 | ul { 37 | list-style: circle outside; 38 | font-stretch:extra-expanded; 39 | /* font-size:90%;*/ 40 | } 41 | 42 | ul.menu { /* inherits from ul */ 43 | padding-left: 1em; 44 | } 45 | 46 | 47 | em { 48 | color:#FF7700; 49 | font-size:110%; 50 | } 51 | 52 | h1,h2,h3{ 53 | color:#FF7700; 54 | } 55 | 56 | h1 { 57 | border-color:#d0d0d0; 58 | border-style:solid; 59 | border-width:1px; 60 | font-weight:bold; 61 | padding: 0.2em; 62 | background-color:#f8f8f8 63 | } 64 | 65 | h2 { 66 | font-size:120%; 67 | font-weight:bold; 68 | border-bottom-style:solid; 69 | border-bottom-width:1px; 70 | border-bottom-color:#d0d0d0; 71 | } 72 | 73 | h3 { 74 | font-size:110%; 75 | font-weight:bold; 76 | font-style:italic; 77 | } 78 | 79 | tt { 80 | font-family: courier, serif; 81 | } 82 | 83 | tt.classname { 84 | font-weight:bold; 85 | } 86 | 87 | tt.constant { 88 | font-weight:bold; 89 | } 90 | 91 | 92 | p { 93 | line-height: 1.5em; 94 | } 95 | 96 | 97 | p.author { 98 | /* line-height: 0.5em; */ 99 | font-size:70%; 100 | } 101 | 102 | 103 | div.links{ 104 | float: left; 105 | clear: left; 106 | width: 12em; 107 | background-color:#f8f8f8; 108 | border-style:solid; 109 | border-width:1px; 110 | border-color:#d0d0d0; 111 | margin-bottom: 0.5em; 112 | padding: 0.5em 0.5em 0.5em 0.5em; 113 | margin: 0.5em 0.5em 0em 0em; 114 | } 115 | 116 | div.main{ 117 | border-style:solid; 118 | border-width:1px; 119 | border-color:#d0d0d0; 120 | margin: 0.5em 0em 0.5em 14em; 121 | padding: 0.5em 0.5em 0.5em 0.5em; 122 | } 123 | 124 | div.by{ 125 | line-height: 0.5em; 126 | border-width:1px; 127 | border-color:#d0d0d0; 128 | margin: 0.5em 0em 0.5em 14em; 129 | padding: 0.5em 0.5em 0.5em 0.5em; 130 | } 131 | 132 | -------------------------------------------------------------------------------- /libs/elfio/elf_examples/64bitLOAD.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/64bitLOAD.elf -------------------------------------------------------------------------------- /libs/elfio/elf_examples/ARMSCII-8.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/ARMSCII-8.so -------------------------------------------------------------------------------- /libs/elfio/elf_examples/arm_v7m_test_debug.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/arm_v7m_test_debug.elf -------------------------------------------------------------------------------- /libs/elfio/elf_examples/arm_v7m_test_release.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/arm_v7m_test_release.elf -------------------------------------------------------------------------------- /libs/elfio/elf_examples/asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/asm -------------------------------------------------------------------------------- /libs/elfio/elf_examples/asm.lst: -------------------------------------------------------------------------------- 1 | 1 ; nasm -f elf hello.asm # this will produce hello.o ELF object file 2 | 2 ; ld -s -o hello hello.o # this will produce hello executable 3 | 3 4 | 4 section .text 5 | 5 global _start ;must be declared for linker (ld) 6 | 6 7 | 7 _start: ;tell linker entry point 8 | 8 9 | 9 00000000 BA0E000000 mov edx,len ;message length 10 | 10 00000005 B9[00000000] mov ecx,msg ;message to write 11 | 11 0000000A BB01000000 mov ebx,1 ;file descriptor (stdout) 12 | 12 0000000F B804000000 mov eax,4 ;system call number (sys_write) 13 | 13 00000014 CD80 int 0x80 ;call kernel 14 | 14 15 | 15 00000016 B801000000 mov eax,1 ;system call number (sys_exit) 16 | 16 0000001B CD80 int 0x80 ;call kernel 17 | 17 18 | 18 section .data 19 | 19 20 | 20 00000000 48656C6C6F2C20776F- msg db 'Hello, world!',0xa ;our dear string 21 | 21 00000009 726C64210A 22 | 22 len equ $ - msg ;length of our dear string 23 | 23 24 | -------------------------------------------------------------------------------- /libs/elfio/elf_examples/asm.readelf: -------------------------------------------------------------------------------- 1 | ELF Header: 2 | Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 3 | Class: ELF32 4 | Data: 2's complement, little endian 5 | Version: 1 (current) 6 | OS/ABI: UNIX - System V 7 | ABI Version: 0 8 | Type: EXEC (Executable file) 9 | Machine: Intel 80386 10 | Version: 0x1 11 | Entry point address: 0x8048080 12 | Start of program headers: 52 (bytes into file) 13 | Start of section headers: 200 (bytes into file) 14 | Flags: 0x0 15 | Size of this header: 52 (bytes) 16 | Size of program headers: 32 (bytes) 17 | Number of program headers: 2 18 | Size of section headers: 40 (bytes) 19 | Number of section headers: 4 20 | Section header string table index: 3 21 | 22 | Section Headers: 23 | [Nr] Name Type Addr Off Size ES Flg Lk Inf Al 24 | [ 0] NULL 00000000 000000 000000 00 0 0 0 25 | [ 1] .text PROGBITS 08048080 000080 00001d 00 AX 0 0 16 26 | [ 2] .data PROGBITS 080490a0 0000a0 00000e 00 WA 0 0 4 27 | [ 3] .shstrtab STRTAB 00000000 0000ae 000017 00 0 0 1 28 | Key to Flags: 29 | W (write), A (alloc), X (execute), M (merge), S (strings) 30 | I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown) 31 | O (extra OS processing required) o (OS specific), p (processor specific) 32 | 33 | There are no section groups in this file. 34 | 35 | Program Headers: 36 | Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align 37 | LOAD 0x000000 0x08048000 0x08048000 0x0009d 0x0009d R E 0x1000 38 | LOAD 0x0000a0 0x080490a0 0x080490a0 0x0000e 0x0000e RW 0x1000 39 | 40 | Section to Segment mapping: 41 | Segment Sections... 42 | 00 .text 43 | 01 .data 44 | 45 | There is no dynamic section in this file. 46 | 47 | There are no relocations in this file. 48 | 49 | The decoding of unwind sections for machine type Intel 80386 is not currently supported. 50 | 51 | No version information found in this file. 52 | -------------------------------------------------------------------------------- /libs/elfio/elf_examples/asm.s: -------------------------------------------------------------------------------- 1 | ; nasm -f elf hello.asm # this will produce hello.o ELF object file 2 | ; ld -s -o hello hello.o # this will produce hello executable 3 | 4 | section .text 5 | global _start ;must be declared for linker (ld) 6 | 7 | _start: ;tell linker entry point 8 | 9 | mov edx,len ;message length 10 | mov ecx,msg ;message to write 11 | mov ebx,1 ;file descriptor (stdout) 12 | mov eax,4 ;system call number (sys_write) 13 | int 0x80 ;call kernel 14 | 15 | mov eax,1 ;system call number (sys_exit) 16 | int 0x80 ;call kernel 17 | 18 | section .data 19 | 20 | msg db 'Hello, world!',0xa ;our dear string 21 | len equ $ - msg ;length of our dear string 22 | 23 | -------------------------------------------------------------------------------- /libs/elfio/elf_examples/asm64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/asm64 -------------------------------------------------------------------------------- /libs/elfio/elf_examples/asm64.lst: -------------------------------------------------------------------------------- 1 | 1 ; nasm -f elf hello.asm # this will produce hello.o ELF object file 2 | 2 ; ld -s -o hello hello.o # this will produce hello executable 3 | 3 4 | 4 section .text 5 | 5 global _start ;must be declared for linker (ld) 6 | 6 7 | 7 _start: ;tell linker entry point 8 | 8 9 | 9 00000000 BA0E000000 mov edx,len ;message length 10 | 10 00000005 B9[00000000] mov ecx,msg ;message to write 11 | 11 0000000A BB01000000 mov ebx,1 ;file descriptor (stdout) 12 | 12 0000000F B804000000 mov eax,4 ;system call number (sys_write) 13 | 13 00000014 CD80 int 0x80 ;call kernel 14 | 14 15 | 15 00000016 B801000000 mov eax,1 ;system call number (sys_exit) 16 | 16 0000001B CD80 int 0x80 ;call kernel 17 | 17 18 | 18 section .data 19 | 19 20 | 20 00000000 48656C6C6F2C20776F- msg db 'Hello, world!',0xa ;our dear string 21 | 21 00000009 726C64210A 22 | 22 len equ $ - msg ;length of our dear string 23 | 23 24 | -------------------------------------------------------------------------------- /libs/elfio/elf_examples/crash-060833f08dc14d1712428742b3cad7af17b36bb7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/crash-060833f08dc14d1712428742b3cad7af17b36bb7 -------------------------------------------------------------------------------- /libs/elfio/elf_examples/crash-7d695153fd8052529d480c2352d4ada33a44bada: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/crash-7d695153fd8052529d480c2352d4ada33a44bada -------------------------------------------------------------------------------- /libs/elfio/elf_examples/crash-b82f05b0b25c8fdc98480e6d76b6d5f9164ae2bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/crash-b82f05b0b25c8fdc98480e6d76b6d5f9164ae2bc -------------------------------------------------------------------------------- /libs/elfio/elf_examples/crash-e1ce7cecf01cf800397a4302854d9d76fa19763c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/crash-e1ce7cecf01cf800397a4302854d9d76fa19763c -------------------------------------------------------------------------------- /libs/elfio/elf_examples/crash-e3c41070342cf84dea077356ddbb8ebf4326a601: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/crash-e3c41070342cf84dea077356ddbb8ebf4326a601 -------------------------------------------------------------------------------- /libs/elfio/elf_examples/elf_header_i386_32.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/elf_header_i386_32.elf -------------------------------------------------------------------------------- /libs/elfio/elf_examples/entropy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/entropy.so -------------------------------------------------------------------------------- /libs/elfio/elf_examples/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | printf( "Hello\n" ); 6 | 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libs/elfio/elf_examples/hello_32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/hello_32 -------------------------------------------------------------------------------- /libs/elfio/elf_examples/hello_64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/hello_64 -------------------------------------------------------------------------------- /libs/elfio/elf_examples/hello_arm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/hello_arm -------------------------------------------------------------------------------- /libs/elfio/elf_examples/hello_arm_stripped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/hello_arm_stripped -------------------------------------------------------------------------------- /libs/elfio/elf_examples/libfunc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/libfunc.so -------------------------------------------------------------------------------- /libs/elfio/elf_examples/libfunc32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/libfunc32.so -------------------------------------------------------------------------------- /libs/elfio/elf_examples/ls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/ls -------------------------------------------------------------------------------- /libs/elfio/elf_examples/main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/main -------------------------------------------------------------------------------- /libs/elfio/elf_examples/main32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/main32 -------------------------------------------------------------------------------- /libs/elfio/elf_examples/ppc-32bit-specimen3.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/ppc-32bit-specimen3.elf -------------------------------------------------------------------------------- /libs/elfio/elf_examples/read_write_arm_elf32_input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/read_write_arm_elf32_input -------------------------------------------------------------------------------- /libs/elfio/elf_examples/startup.eln: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/startup.eln -------------------------------------------------------------------------------- /libs/elfio/elf_examples/startup_orig.eln: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/startup_orig.eln -------------------------------------------------------------------------------- /libs/elfio/elf_examples/test_ppc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/test_ppc -------------------------------------------------------------------------------- /libs/elfio/elf_examples/test_ppc.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | std::cout << "Hello" << std::endl; 6 | 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libs/elfio/elf_examples/write_exe_i386_32_match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/libs/elfio/elf_examples/write_exe_i386_32_match -------------------------------------------------------------------------------- /libs/elfio/elf_examples/write_exe_i386_32_work_dump.txt: -------------------------------------------------------------------------------- 1 | 2 | write_exe_i386_32_work: file format elf32-i386 3 | write_exe_i386_32_work 4 | architecture: i386, flags 0x00000102: 5 | EXEC_P, D_PAGED 6 | start address 0x08048080 7 | 8 | Program Header: 9 | LOAD off 0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12 10 | filesz 0x0000009d memsz 0x0000009d flags r-x 11 | LOAD off 0x000000a0 vaddr 0x080490a0 paddr 0x080490a0 align 2**12 12 | filesz 0x0000000e memsz 0x0000000e flags rw- 13 | 14 | Sections: 15 | Idx Name Size VMA LMA File off Algn 16 | 0 .text 0000001d 08048080 08048080 00000080 2**4 17 | CONTENTS, ALLOC, LOAD, READONLY, CODE 18 | 1 .data 0000000e 080490a0 080490a0 000000a0 2**2 19 | CONTENTS, ALLOC, LOAD, DATA 20 | 2 .note 00000020 00000000 00000000 000000ae 2**0 21 | CONTENTS, READONLY 22 | SYMBOL TABLE: 23 | no symbols 24 | 25 | 26 | 27 | Disassembly of section .text: 28 | 29 | 08048080 <.text>: 30 | 8048080: b8 04 00 00 00 mov $0x4,%eax 31 | 8048085: bb 01 00 00 00 mov $0x1,%ebx 32 | 804808a: b9 a0 90 04 08 mov $0x80490a0,%ecx 33 | 804808f: ba 0e 00 00 00 mov $0xe,%edx 34 | 8048094: cd 80 int $0x80 35 | 8048096: b8 01 00 00 00 mov $0x1,%eax 36 | 804809b: cd 80 int $0x80 37 | 38 | Disassembly of section .data: 39 | 40 | 080490a0 <.data>: 41 | 80490a0: 48 dec %eax 42 | 80490a1: 65 gs 43 | 80490a2: 6c insb (%dx),%es:(%edi) 44 | 80490a3: 6c insb (%dx),%es:(%edi) 45 | 80490a4: 6f outsl %ds:(%esi),(%dx) 46 | 80490a5: 2c 20 sub $0x20,%al 47 | 80490a7: 57 push %edi 48 | 80490a8: 6f outsl %ds:(%esi),(%dx) 49 | 80490a9: 72 6c jb 0x8049117 50 | 80490ab: 64 21 0a and %ecx,%fs:(%edx) 51 | 52 | Disassembly of section .note: 53 | 54 | 00000000 <.note>: 55 | 0: 11 00 adc %eax,(%eax) 56 | 2: 00 00 add %al,(%eax) 57 | 4: 00 00 add %al,(%eax) 58 | 6: 00 00 add %al,(%eax) 59 | 8: 77 00 ja 0xa 60 | a: 00 00 add %al,(%eax) 61 | c: 43 inc %ebx 62 | d: 72 65 jb 0x74 63 | f: 61 popa 64 | 10: 74 65 je 0x77 65 | 12: 64 20 62 79 and %ah,%fs:0x79(%edx) 66 | 16: 20 45 4c and %al,0x4c(%ebp) 67 | 19: 46 inc %esi 68 | 1a: 49 dec %ecx 69 | 1b: 4f dec %edi 70 | 1c: 00 00 add %al,(%eax) 71 | ... 72 | -------------------------------------------------------------------------------- /libs/elfio/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = elfdump tutorial writer write_obj anonymizer 2 | -------------------------------------------------------------------------------- /libs/elfio/examples/RelocationTable/RelocationTable.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main( int, char* argv[] ) 5 | { 6 | // Create a ELFI reader 7 | IELFI* pReader; 8 | ELFIO::GetInstance()->CreateELFI( &pReader ); 9 | 10 | // Initialize it 11 | char* filename = argv[1]; 12 | pReader->Load( filename ); 13 | 14 | // Get .text relocation entry 15 | // List all sections of the file 16 | int i; 17 | int nSecNo = pReader->GetSectionsNum(); 18 | for ( i = 0; i < nSecNo; ++i ) { // For all sections 19 | const IELFISection* pSec = pReader->GetSection( i ); 20 | if ( SHT_REL != pSec->GetType() && SHT_RELA != pSec->GetType() ) { 21 | pSec->Release(); 22 | continue; 23 | } 24 | const IELFIRelocationTable* pRel = 0; 25 | pReader->CreateSectionReader( IELFI::ELFI_RELOCATION, pSec, (void**)&pRel ); 26 | 27 | // Print all entries 28 | Elf64_Addr offset; 29 | Elf64_Addr symbolValue; 30 | std::string symbolName; 31 | unsigned char type; 32 | Elf_Sxword addend; 33 | Elf_Sxword calcValue; 34 | Elf_Xword nNum = pRel->GetEntriesNum(); 35 | if ( 0 < nNum ) { 36 | std::printf( "\nSection name: %s\n", pSec->GetName().c_str() ); 37 | std::printf( " Num Type Offset Addend Calc SymValue SymName\n" ); 38 | for ( Elf_Xword j = 0; j < nNum; ++j ) { 39 | pRel->GetEntry( j, offset, symbolValue, symbolName, 40 | type, addend, calcValue ); 41 | std::printf( "[%4llx] %02x %08llx %08llx %08llx %08llx %s\n", 42 | j, type, offset, 43 | addend, calcValue, 44 | symbolValue, symbolName.c_str() ); 45 | } 46 | } 47 | 48 | pSec->Release(); 49 | pRel->Release(); 50 | } 51 | 52 | // Free resources 53 | pReader->Release(); 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /libs/elfio/examples/anonymizer/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir) 2 | bin_PROGRAMS = anonymizer 3 | anonymizer_SOURCES = anonymizer.cpp 4 | -------------------------------------------------------------------------------- /libs/elfio/examples/elfdump/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir) 2 | bin_PROGRAMS = elfdump 3 | elfdump_SOURCES = elfdump.cpp 4 | EXTRA_DIST = ELFDump.vcxproj 5 | -------------------------------------------------------------------------------- /libs/elfio/examples/elfdump/elfdump.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | elfdump.cpp - Dump ELF file using ELFIO library. 3 | 4 | Copyright (C) 2001-2015 by Serge Lamikhov-Center 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | */ 24 | 25 | #ifdef _MSC_VER 26 | #define _SCL_SECURE_NO_WARNINGS 27 | #define ELFIO_NO_INTTYPES 28 | #endif 29 | 30 | #include 31 | #include 32 | 33 | using namespace ELFIO; 34 | 35 | int main( int argc, char** argv ) 36 | { 37 | if ( argc != 2 ) { 38 | printf( "Usage: ELFDump \n" ); 39 | return 1; 40 | } 41 | 42 | elfio reader; 43 | 44 | if ( !reader.load( argv[1] ) ) { 45 | printf( "File %s is not found or it is not an ELF file\n", argv[1] ); 46 | return 1; 47 | } 48 | 49 | dump::header ( std::cout, reader ); 50 | dump::section_headers( std::cout, reader ); 51 | dump::segment_headers( std::cout, reader ); 52 | dump::symbol_tables ( std::cout, reader ); 53 | dump::notes ( std::cout, reader ); 54 | dump::dynamic_tags ( std::cout, reader ); 55 | dump::section_datas ( std::cout, reader ); 56 | dump::segment_datas ( std::cout, reader ); 57 | 58 | return 0; 59 | } 60 | -------------------------------------------------------------------------------- /libs/elfio/examples/tutorial/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir) 2 | bin_PROGRAMS = tutorial 3 | tutorial_SOURCES = tutorial.cpp 4 | -------------------------------------------------------------------------------- /libs/elfio/examples/write_obj/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir) 2 | bin_PROGRAMS = write_obj 3 | write_obj_SOURCES = write_obj.cpp 4 | -------------------------------------------------------------------------------- /libs/elfio/examples/writer/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir) 2 | bin_PROGRAMS = writer 3 | writer_SOURCES = writer.cpp 4 | -------------------------------------------------------------------------------- /libs/elfio/examples/writer/writer.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /libs/elfio/examples/writer/writer.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(OutDir) 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /libs/printf/.gitattributes: -------------------------------------------------------------------------------- 1 | # ignore test path 2 | test/* linguist-vendored 3 | -------------------------------------------------------------------------------- /libs/printf/.travis.yml: -------------------------------------------------------------------------------- 1 | # Use a C++11 distro 2 | dist: trusty 3 | sudo: required 4 | 5 | # Enable C++ support 6 | language: cpp 7 | 8 | # Compiler selection 9 | compiler: gcc 10 | 11 | env: 12 | global: 13 | # coverity key 14 | - secure: "NKZbBnMALGIIQJy/s2kc3EST/stw+gjhtrGq0jkbsWr7Wx3FH+lmLeHNsDXRnD1VbpG02c5YsLllqz9OVu+0yxWGepvKNmCz1cNITIALEHbrax8/Af9LzPRL/QZxS/Qe11sMuySp4X16mFBUyxMd/X+I9i96Xf1vKkZABklYD1Q=" 15 | 16 | # addons 17 | addons: 18 | apt: 19 | packages: 20 | - gcc-6 21 | - g++-6 22 | sources: 23 | - ubuntu-toolchain-r-test 24 | 25 | coverity_scan: 26 | project: 27 | name: "mpaland/printf" 28 | description: "Tiny printf implementation" 29 | notification_email: marco@paland.com 30 | build_command_prepend: "make clean" 31 | build_command: "make" 32 | branch_pattern: master 33 | 34 | before_install: 35 | # connect coverity 36 | - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- 37 | 38 | # Active branches 39 | branches: 40 | only: 41 | - master 42 | 43 | script: 44 | # Link gcc-6 and g++-6 to their standard commands 45 | - sudo rm /usr/bin/gcc 46 | - sudo rm /usr/bin/g++ 47 | - sudo ln -s /usr/bin/gcc-6 /usr/bin/gcc 48 | - sudo ln -s /usr/bin/g++-6 /usr/bin/g++ 49 | # Export CC and CXX 50 | - export CC=/usr/bin/gcc-6 51 | - export CXX=/usr/bin/g++-6 52 | # Check versions of gcc, g++ 53 | - gcc -v && g++ -v 54 | # Run build commands 55 | - make 56 | # execute the text suite 57 | - bin/test_suite -d yes 58 | # coverall profiling 59 | - tmp/cov/test_suite 60 | 61 | after_success: 62 | ## Report to codecov 63 | - bash <(curl -s https://codecov.io/bash) 64 | -------------------------------------------------------------------------------- /libs/printf/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Marco Paland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /libs/printf/ape_console.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file ape_console.h 4 | /// 5 | /// @project 6 | /// 7 | /// @brief APE printf support Routines 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2020, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the copyright holder nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #ifndef APE_CONSOLE_H 46 | #define APE_CONSOLE_H 47 | 48 | #include 49 | 50 | bool reset_ape_console(void); 51 | 52 | #endif /* APE_CONSOLE_H */ 53 | -------------------------------------------------------------------------------- /libs/printf/codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "test" # ignore the test folder 3 | -------------------------------------------------------------------------------- /libs/printf/em100_putchar.c: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file ape_purchar.c 4 | /// 5 | /// @project 6 | /// 7 | /// @brief APE printf support Routines 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2019, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the copyright holder nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | #include 47 | 48 | void em100_putchar(char character) 49 | { 50 | NVRam_EM100_putchar(character); 51 | } 52 | 53 | void em100_puts(const char *string) 54 | { 55 | 56 | while (*string != 0) 57 | { 58 | NVRam_EM100_putchar(*string); 59 | string++; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /libs/printf/em100_putchar.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EM100_PUTCHAR_H 3 | #define EM100_PUTCHAR_H 4 | 5 | void em100_putchar(char character); 6 | 7 | void em100_puts(const char* string); 8 | 9 | #endif /* EM100_PUTCHAR_H */ -------------------------------------------------------------------------------- /libs/printf/mips_putchar.c: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file mips_purchar.c 4 | /// 5 | /// @project 6 | /// 7 | /// @brief RX CPU printf support Routines 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2019, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the copyright holder nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | #include 47 | 48 | void _putchar(char character) 49 | { 50 | em100_putchar(character); 51 | } 52 | -------------------------------------------------------------------------------- /simulator/APE.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/simulator/APE.cpp -------------------------------------------------------------------------------- /simulator/APE_FILTERS0.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_FILTERS0.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_FILTERS0 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | FILTERS_t FILTERS0; 48 | 49 | void init_APE_FILTERS0(void) 50 | { 51 | /** @brief Component Registers for @ref FILTERS0. */ 52 | /** @brief Bitmap for @ref FILTERS0_t.ElementConfig. */ 53 | 54 | /** @brief Bitmap for @ref FILTERS0_t.ElementPattern. */ 55 | 56 | /** @brief Bitmap for @ref FILTERS0_t.RuleConfiguration. */ 57 | 58 | /** @brief Bitmap for @ref FILTERS0_t.RuleSet. */ 59 | 60 | /** @brief Bitmap for @ref FILTERS0_t.RuleMask. */ 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /simulator/APE_FILTERS1.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_FILTERS1.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_FILTERS1 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | FILTERS_t FILTERS1; 48 | 49 | void init_APE_FILTERS1(void) 50 | { 51 | /** @brief Component Registers for @ref FILTERS1. */ 52 | /** @brief Bitmap for @ref FILTERS1_t.ElementConfig. */ 53 | 54 | /** @brief Bitmap for @ref FILTERS1_t.ElementPattern. */ 55 | 56 | /** @brief Bitmap for @ref FILTERS1_t.RuleConfiguration. */ 57 | 58 | /** @brief Bitmap for @ref FILTERS1_t.RuleSet. */ 59 | 60 | /** @brief Bitmap for @ref FILTERS1_t.RuleMask. */ 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /simulator/APE_FILTERS2.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_FILTERS2.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_FILTERS2 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | FILTERS_t FILTERS2; 48 | 49 | void init_APE_FILTERS2(void) 50 | { 51 | /** @brief Component Registers for @ref FILTERS2. */ 52 | /** @brief Bitmap for @ref FILTERS2_t.ElementConfig. */ 53 | 54 | /** @brief Bitmap for @ref FILTERS2_t.ElementPattern. */ 55 | 56 | /** @brief Bitmap for @ref FILTERS2_t.RuleConfiguration. */ 57 | 58 | /** @brief Bitmap for @ref FILTERS2_t.RuleSet. */ 59 | 60 | /** @brief Bitmap for @ref FILTERS2_t.RuleMask. */ 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /simulator/APE_FILTERS3.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_FILTERS3.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_FILTERS3 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | FILTERS_t FILTERS3; 48 | 49 | void init_APE_FILTERS3(void) 50 | { 51 | /** @brief Component Registers for @ref FILTERS3. */ 52 | /** @brief Bitmap for @ref FILTERS3_t.ElementConfig. */ 53 | 54 | /** @brief Bitmap for @ref FILTERS3_t.ElementPattern. */ 55 | 56 | /** @brief Bitmap for @ref FILTERS3_t.RuleConfiguration. */ 57 | 58 | /** @brief Bitmap for @ref FILTERS3_t.RuleSet. */ 59 | 60 | /** @brief Bitmap for @ref FILTERS3_t.RuleMask. */ 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /simulator/APE_RX_PORT0.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_RX_PORT0.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_RX_PORT0 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | RX_PORT_t RX_PORT0; 48 | 49 | void init_APE_RX_PORT0(void) 50 | { 51 | /** @brief Component Registers for @ref RX_PORT0. */ 52 | /** @brief Bitmap for @ref RX_PORT0_t.In. */ 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /simulator/APE_RX_PORT1.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_RX_PORT1.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_RX_PORT1 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | RX_PORT_t RX_PORT1; 48 | 49 | void init_APE_RX_PORT1(void) 50 | { 51 | /** @brief Component Registers for @ref RX_PORT1. */ 52 | /** @brief Bitmap for @ref RX_PORT1_t.In. */ 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /simulator/APE_RX_PORT2.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_RX_PORT2.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_RX_PORT2 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | RX_PORT_t RX_PORT2; 48 | 49 | void init_APE_RX_PORT2(void) 50 | { 51 | /** @brief Component Registers for @ref RX_PORT2. */ 52 | /** @brief Bitmap for @ref RX_PORT2_t.In. */ 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /simulator/APE_RX_PORT3.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_RX_PORT3.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_RX_PORT3 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | RX_PORT_t RX_PORT3; 48 | 49 | void init_APE_RX_PORT3(void) 50 | { 51 | /** @brief Component Registers for @ref RX_PORT3. */ 52 | /** @brief Bitmap for @ref RX_PORT3_t.In. */ 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /simulator/APE_TX_PORT0.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_TX_PORT0.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_TX_PORT0 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | TX_PORT_t TX_PORT0; 48 | 49 | void init_APE_TX_PORT0(void) 50 | { 51 | /** @brief Component Registers for @ref TX_PORT0. */ 52 | /** @brief Bitmap for @ref TX_PORT0_t.Out. */ 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /simulator/APE_TX_PORT1.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_TX_PORT1.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_TX_PORT1 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | TX_PORT_t TX_PORT1; 48 | 49 | void init_APE_TX_PORT1(void) 50 | { 51 | /** @brief Component Registers for @ref TX_PORT1. */ 52 | /** @brief Bitmap for @ref TX_PORT1_t.Out. */ 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /simulator/APE_TX_PORT2.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_TX_PORT2.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_TX_PORT2 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | TX_PORT_t TX_PORT2; 48 | 49 | void init_APE_TX_PORT2(void) 50 | { 51 | /** @brief Component Registers for @ref TX_PORT2. */ 52 | /** @brief Bitmap for @ref TX_PORT2_t.Out. */ 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /simulator/APE_TX_PORT3.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file APE_TX_PORT3.cpp 4 | /// 5 | /// @project ape 6 | /// 7 | /// @brief APE_TX_PORT3 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2022, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #include 46 | 47 | TX_PORT_t TX_PORT3; 48 | 49 | void init_APE_TX_PORT3(void) 50 | { 51 | /** @brief Component Registers for @ref TX_PORT3. */ 52 | /** @brief Bitmap for @ref TX_PORT3_t.Out. */ 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /simulator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | project(simulator) 3 | 4 | SET(SOURCES 5 | HAL.cpp include/HAL.hpp 6 | pci.cpp 7 | 8 | pci_config.h 9 | include/CXXRegister.h) 10 | 11 | simulator_add_library(${PROJECT_NAME} STATIC 12 | ${SOURCES} 13 | 14 | bcm5719_DEVICE_sim.cpp 15 | bcm5719_DEVICE.cpp 16 | bcm5719_GEN_sim.cpp 17 | bcm5719_GEN.cpp 18 | bcm5719_NVM_sim.cpp 19 | bcm5719_NVM.cpp 20 | 21 | # APE Speciifc registers 22 | bcm5719_APE.cpp 23 | bcm5719_APE_sim.cpp 24 | bcm5719_APE_PERI.cpp 25 | bcm5719_APE_PERI_sim.cpp 26 | bcm5719_SHM.cpp 27 | bcm5719_SHM_sim.cpp 28 | bcm5719_SHM_CHANNEL0.cpp 29 | bcm5719_SHM_CHANNEL0_sim.cpp 30 | bcm5719_SHM_CHANNEL1.cpp 31 | bcm5719_SHM_CHANNEL1_sim.cpp 32 | bcm5719_SHM_CHANNEL2.cpp 33 | bcm5719_SHM_CHANNEL2_sim.cpp 34 | bcm5719_SHM_CHANNEL3.cpp 35 | bcm5719_SHM_CHANNEL3_sim.cpp 36 | 37 | # APE indirect registers 38 | APE_HAL.cpp 39 | APE_FILTERS0.cpp 40 | APE_FILTERS0_sim.cpp 41 | APE_NVIC.cpp 42 | APE_NVIC_sim.cpp 43 | 44 | APE_TX_PORT0.cpp 45 | APE_TX_PORT0_sim.cpp 46 | APE_TX_PORT1.cpp 47 | APE_TX_PORT1_sim.cpp 48 | APE_TX_PORT2.cpp 49 | APE_TX_PORT2_sim.cpp 50 | APE_TX_PORT3.cpp 51 | APE_TX_PORT3_sim.cpp 52 | 53 | APE_RX_PORT0.cpp 54 | APE_RX_PORT0_sim.cpp 55 | APE_RX_PORT1.cpp 56 | APE_RX_PORT1_sim.cpp 57 | APE_RX_PORT2.cpp 58 | APE_RX_PORT2_sim.cpp 59 | APE_RX_PORT3.cpp 60 | APE_RX_PORT3_sim.cpp 61 | 62 | APE_DEVICE1.cpp 63 | APE_DEVICE1_sim.cpp 64 | APE_DEVICE2.cpp 65 | APE_DEVICE2_sim.cpp 66 | APE_DEVICE3.cpp 67 | APE_DEVICE3_sim.cpp 68 | 69 | APE_FILTERS1.cpp 70 | APE_FILTERS1_sim.cpp 71 | APE_FILTERS2.cpp 72 | APE_FILTERS2_sim.cpp 73 | APE_FILTERS3.cpp 74 | APE_FILTERS3_sim.cpp 75 | ) 76 | 77 | format_sources(${SOURCES}) 78 | 79 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 80 | 81 | include_directories(../libs/NVRam) 82 | 83 | target_include_directories(${PROJECT_NAME} PUBLIC include) 84 | target_include_directories(${PROJECT_NAME} PUBLIC ../include) 85 | -------------------------------------------------------------------------------- /simulator/bcm5719.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklort/bcm5719-fw/3bc3260edc81ea2f12864cf1abed37b0cfbe82f6/simulator/bcm5719.cpp -------------------------------------------------------------------------------- /simulator/pci_config.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// Copyright (c) 2018, Evan Lojewski 3 | /// All rights reserved. 4 | /// 5 | /// Redistribution and use in source and binary forms, with or without 6 | /// modification, are permitted provided that the following conditions are met: 7 | /// * Redistributions of source code must retain the above copyright 8 | /// notice, this list of conditions and the following disclaimer. 9 | /// * Redistributions in binary form must reproduce the above copyright 10 | /// notice, this list of conditions and the following disclaimer in the 11 | /// documentation and/or other materials provided with the distribution. 12 | /// * Neither the name of the nor the 13 | /// names of its contributors may be used to endorse or promote products 14 | /// derived from this software without specific prior written permission. 15 | /// 16 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | /// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | /// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | /// DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 20 | /// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | /// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | /// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | /// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | /// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | /// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | //////////////////////////////////////////////////////////////////////////////// 27 | #ifndef PCI_CONFIG_H 28 | #define PCI_CONFIG_H 29 | 30 | #include 31 | 32 | typedef struct 33 | { 34 | uint16_t vendor_id; 35 | uint16_t device_id; 36 | 37 | uint16_t command; 38 | uint16_t device; 39 | 40 | uint8_t revision_id; 41 | uint8_t prog_if; 42 | uint8_t subdevclass; 43 | uint8_t devclass; 44 | 45 | uint8_t cache_line_size; 46 | uint8_t latency_timer; 47 | uint8_t header_type; 48 | uint8_t BIST; 49 | 50 | uint32_t BAR[6]; 51 | 52 | uint32_t aus; 53 | 54 | uint16_t subsystem_vendor_id; 55 | uint16_t subsystem_id; 56 | 57 | uint32_t expansion_base; 58 | 59 | uint8_t capabilities; 60 | uint8_t rsvd[7]; 61 | 62 | uint8_t int_line; 63 | uint8_t int_pin; 64 | uint8_t min_grant; 65 | uint8_t max_latency; 66 | } __attribute__((packed)) pci_config_t; 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /stage1/uswid.ini.in: -------------------------------------------------------------------------------- 1 | [uSWID] 2 | tag-id = @stage1_TAG_ID@ 3 | software-name = stage1 4 | software-version = @VERSION_STRING@ 5 | version-scheme = multipartnumeric 6 | product = stage1 7 | summary = BCM5719 RX CPU Firmware (stage1) 8 | colloquial-version = @GIT_HASH@ 9 | 10 | [uSWID-Entity:TagCreator] 11 | name = Evan Lojewski 12 | regid = meklort.com 13 | extra-roles = Licensor,Maintainer,SoftwareCreator 14 | 15 | [uSWID-Link] 16 | rel = license 17 | href = https://spdx.org/licenses/BSD-3-Clause.html 18 | 19 | [uSWID-Link:source] 20 | rel = source 21 | href = https://github.com/meklort/bcm5719-fw/tree/@GIT_HASH@ 22 | 23 | [uSWID-Link:@COMPILER_NAME@] 24 | rel = see-also 25 | href = swid:@COMPILER_TAG_ID@ 26 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file tests/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief Tests CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2018, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | SET(INSTALL_GTEST OFF CACHE BOOL "") 46 | SET(INSTALL_GMOCK OFF CACHE BOOL "") 47 | add_subdirectory(googletest) 48 | -------------------------------------------------------------------------------- /utils/ape2elf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file utils/ape2elf/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief Utilities CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2018, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(ape2elf) 46 | 47 | add_definitions(-Wall -Werror) 48 | set(SOURCES 49 | main.cpp 50 | ) 51 | 52 | include_directories(elfio) 53 | 54 | simulator_add_executable(${PROJECT_NAME} ${SOURCES}) 55 | target_link_libraries(${PROJECT_NAME} PRIVATE NVRam VPD simulator OptParse Compress elfio) 56 | 57 | format_target_sources(${PROJECT_NAME}) 58 | 59 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 60 | 61 | INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) 62 | -------------------------------------------------------------------------------- /utils/apeconsole/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(apeconsole) 2 | 3 | add_definitions(-Wall -Werror) 4 | set(SOURCES 5 | main.cpp 6 | ) 7 | 8 | simulator_add_executable(${PROJECT_NAME} ${SOURCES}) 9 | target_link_libraries(${PROJECT_NAME} PRIVATE APE ) 10 | target_link_libraries(${PROJECT_NAME} PRIVATE simulator OptParse elfio) 11 | 12 | format_target_sources(${PROJECT_NAME}) 13 | 14 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 15 | 16 | INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) 17 | -------------------------------------------------------------------------------- /utils/bcmflash/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(bcmflash) 2 | 3 | add_definitions(-Wall -Werror) 4 | set(SOURCES 5 | main.cpp 6 | nvm.cpp 7 | fileio.cpp 8 | 9 | bcmflash.h 10 | 11 | # Support files for initializing the firmware header 12 | create_header.cpp create_header.h 13 | nvm_talos2.c 14 | nvm_blackbird.c 15 | nvm_kh08p.c 16 | ) 17 | 18 | IF(CONFIG_HAVE_LINUX_ETHTOOL_H) 19 | LIST(APPEND SOURCES 20 | ethtool.c ethtool.h 21 | ) 22 | ENDIF() 23 | 24 | add_executable(${PROJECT_NAME} ${SOURCES}) 25 | target_link_libraries(${PROJECT_NAME} PRIVATE NVRam VPD simulator OptParse) 26 | target_compile_options(${PROJECT_NAME} PRIVATE -DCXX_SIMULATOR) 27 | 28 | format_target_sources(${PROJECT_NAME}) 29 | 30 | INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) 31 | 32 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 33 | ADD_ETHTOOL_DEFINES(${PROJECT_NAME}) 34 | -------------------------------------------------------------------------------- /utils/bcmflash/ethtool.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// @file iface.c 4 | /// 5 | /// @project 6 | /// 7 | /// @brief Ethtool-based network interface APIs. 8 | /// 9 | //////////////////////////////////////////////////////////////////////////////// 10 | /// 11 | //////////////////////////////////////////////////////////////////////////////// 12 | /// 13 | /// @copyright Copyright (c) 2018-2020, Evan Lojewski 14 | /// @cond 15 | /// 16 | /// All rights reserved. 17 | /// 18 | /// Redistribution and use in source and binary forms, with or without 19 | /// modification, are permitted provided that the following conditions are met: 20 | /// 1. Redistributions of source code must retain the above copyright notice, 21 | /// this list of conditions and the following disclaimer. 22 | /// 2. Redistributions in binary form must reproduce the above copyright notice, 23 | /// this list of conditions and the following disclaimer in the documentation 24 | /// and/or other materials provided with the distribution. 25 | /// 3. Neither the name of the copyright holder nor the 26 | /// names of its contributors may be used to endorse or promote products 27 | /// derived from this software without specific prior written permission. 28 | /// 29 | //////////////////////////////////////////////////////////////////////////////// 30 | /// 31 | /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | /// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | /// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | /// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | /// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | /// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | /// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | /// POSSIBILITY OF SUCH DAMAGE. 42 | /// @endcond 43 | //////////////////////////////////////////////////////////////////////////////// 44 | 45 | #ifndef ETHTOOL_H 46 | #define ETHTOOL_H 47 | 48 | #include 49 | 50 | #ifdef __cplusplus 51 | extern "C" { 52 | #endif 53 | 54 | bool bcmflash_ethtool_init(const char *name); 55 | bool bcmflash_ethtool_read(const char *name, void *buffer, size_t len); 56 | bool bcmflash_ethtool_write(const char *name, void *buffer, size_t len); 57 | size_t bcmflash_ethtool_size(const char *name); 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif /* ETHTOOL_H */ 64 | -------------------------------------------------------------------------------- /utils/bcmregtool/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(bcmregtool) 2 | 3 | 4 | add_subdirectory(apeloader) 5 | 6 | add_definitions(-Wall -Werror) 7 | set(SOURCES 8 | main.cpp 9 | ) 10 | 11 | simulator_add_executable(${PROJECT_NAME} ${SOURCES}) 12 | target_link_libraries(${PROJECT_NAME} PRIVATE NVRam VPD MII APE apeloader-binary NCSI Network) 13 | target_link_libraries(${PROJECT_NAME} PRIVATE simulator OptParse elfio) 14 | 15 | format_target_sources(${PROJECT_NAME}) 16 | 17 | INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) 18 | 19 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 20 | -------------------------------------------------------------------------------- /utils/bin2c/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file utils/bin2c/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief Utilities CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2019, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(bin2c) 46 | 47 | add_definitions(-Wall -Werror) 48 | set(SOURCES 49 | main.cpp 50 | ) 51 | 52 | simulator_add_executable(${PROJECT_NAME} ${SOURCES}) 53 | target_link_libraries(${PROJECT_NAME} PRIVATE OptParse) 54 | include_directories(${CMAKE_SOURCE_DIR}/include) 55 | 56 | format_target_sources(${PROJECT_NAME}) 57 | 58 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 59 | 60 | INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) 61 | -------------------------------------------------------------------------------- /utils/cat/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file utils/cat/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief Utilities CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2022, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(cat) 46 | 47 | add_definitions(-Wall -Werror) 48 | set(SOURCES 49 | main.cpp 50 | ) 51 | 52 | add_executable(${PROJECT_NAME} ${SOURCES}) 53 | target_link_libraries(${PROJECT_NAME} PRIVATE OptParse) 54 | 55 | format_target_sources(${PROJECT_NAME}) 56 | 57 | INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) 58 | -------------------------------------------------------------------------------- /utils/elf2ape/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ### 3 | ### @file utils/elf2ape/CMakeLists.txt 4 | ### 5 | ### @project 6 | ### 7 | ### @brief Utilities CMake file 8 | ### 9 | ################################################################################ 10 | ### 11 | ################################################################################ 12 | ### 13 | ### @copyright Copyright (c) 2018, Evan Lojewski 14 | ### @cond 15 | ### 16 | ### All rights reserved. 17 | ### 18 | ### Redistribution and use in source and binary forms, with or without 19 | ### modification, are permitted provided that the following conditions are met: 20 | ### 1. Redistributions of source code must retain the above copyright notice, 21 | ### this list of conditions and the following disclaimer. 22 | ### 2. Redistributions in binary form must reproduce the above copyright notice, 23 | ### this list of conditions and the following disclaimer in the documentation 24 | ### and/or other materials provided with the distribution. 25 | ### 3. Neither the name of the copyright holder nor the 26 | ### names of its contributors may be used to endorse or promote products 27 | ### derived from this software without specific prior written permission. 28 | ### 29 | ################################################################################ 30 | ### 31 | ### THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 32 | ### AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 33 | ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34 | ### ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 35 | ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 36 | ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 39 | ### CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 40 | ### ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 | ### POSSIBILITY OF SUCH DAMAGE. 42 | ### @endcond 43 | ################################################################################ 44 | 45 | project(elf2ape) 46 | 47 | add_definitions(-Wall -Werror) 48 | set(SOURCES 49 | main.cpp 50 | ) 51 | 52 | simulator_add_executable(${PROJECT_NAME} ${SOURCES}) 53 | target_link_libraries(${PROJECT_NAME} PRIVATE NVRam VPD simulator OptParse Compress elfio) 54 | 55 | format_target_sources(${PROJECT_NAME}) 56 | 57 | ADD_ENDIANNESS_DEFINES(${PROJECT_NAME}) 58 | 59 | INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) 60 | -------------------------------------------------------------------------------- /utils/uswidtool.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Wrap the uswid cli, ensuring the local copy 4 | of cbor and pefile are used. 5 | """ 6 | 7 | import runpy 8 | import sys 9 | 10 | sys.path.append('python-uswid') 11 | sys.path.append('pefile') 12 | sys.path.append('cbor2') 13 | 14 | runpy.run_module('uswid.cli', run_name='__main__') 15 | --------------------------------------------------------------------------------