https://github.com/amd/esmi_oob_library

for hosting E-SMI Out-of-band code

https://github.com/amd/esmi_oob_library

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

for hosting E-SMI Out-of-band code

Basic Info
  • Host: GitHub
  • Owner: amd
  • License: other
  • Language: C
  • Default Branch: master
  • Size: 2.56 MB
Statistics
  • Stars: 22
  • Watchers: 6
  • Forks: 8
  • Open Issues: 4
  • Releases: 0
Created about 6 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

docs/README.md

Advanced Platform Management Link (APML) Library

(formerly known as EPYC™ System Management Interface (E-SMI) Out-of-band Library)

The Advanced Platform Management Link (APML) Library library, is part of the EPYC™ System Management Out-of-band software stack. It is a C library for Linux that provides a user space interface to monitor and control the CPU's Systems Management features.

Important note about Versioning and Backward Compatibility

The APML library is currently under development, and therefore subject to change at the API level. The intention is to keep the API as stable as possible while in development, but in some cases we may need to break backwards compatibility in order to achieve future stability and usability. Following Semantic Versioning rules, while the APML library is in a high state of change, the major version will remain 0, and achieving backward compatibility may not be possible.

Once new development has leveled off, the major version will become greater than 0, and backward compatibility will be enforced between major versions.

Building APML Library

Additional Required software for building

In order to build the APML library, the following components are required. Note that the software versions listed are what is being used in development. Earlier versions are not guaranteed to work: * CMake (v3.5.0) * latex (pdfTeX 3.14159265-2.6-1.40.18) * apml modules (apmlsbrmi and apmlsbtsi) + available at https://github.com/amd/apml_modules/

Dowloading the source

The source code for APML library is available on Github.

Directory stucture of the source

Once the APML library source has been cloned to a local Linux machine, the directory structure of source is as below: * $ docs/ Contains Doxygen configuration files and Library descriptions * $ tool/ Contains apmltool based on the APML library * `$ include/esmioobContains the header files used by the APML library *$ src/esmi_oob` Contains library APML source

Building the library is achieved by following the typical CMake build sequence for native build, as follows.

$ mkdir -p build
$ mkdir -p install
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=${PWD}/install <location of root of APML library CMakeLists.txt>
$ make

The built library will appear in the build folder.

Cross compile the library for Target systems

Before installing the cross compiler verfiy the target architecture

$ uname -m

Eg: To cross compile for ARM32 processor:

$ sudo apt-get install gcc-arm-linux-gnueabihf

Eg: To cross compile for AARCH64 processor: use

$ sudo apt-get install gcc-aarch64-linux-gnu

NOTE: For cross compilation, cross-$ARCH.cmake file is provided for below Architectures: - armhf - aarch64

Compilation steps

$ mkdir -p build
$ cd build
$ cmake -DCMAKE_TOOLCHAIN_FILE=../cross-[arch..].cmake <location of root of APML library CMakeLists.txt>
$ make

The built library will appear in the build folder. Copy the required binaries and the dynamic linked library to target board(BMC).

$ scp libapml64.so.0 root@10.x.x.x:/usr/lib
$ scp apml_tool root@10.x.x.x:/usr/bin

Disclaimer

  • Input arguments passed by the user are not validated. It might result in unreliable system behavior

Building the Documentation

The documentation PDF file can be built with the following steps (continued from the steps above):

$ make doc

The reference manual (APMLLibraryManual.pdf), release notes (APMLLibraryRelease_Notes.pdf) upon a successful build.

Usage Basics

Most of the APIs need socket index as the first argument. Refer tools/apml_tool.c

Usage

Tool Usage

APML tool is a C program based on the APML Library, the executable "apml_tool" will be generated in the build/ folder. This tool provides options to monitor and control System Management functionality.

In execution platform, user can cross-verfiy "apmlsbrmi" and apmlrmi" modules are loaded. The apml modules are open-sourced at https://github.com/amd/apml_modules.git

For detailed usage information, use -h or --help flag: ```

$ ./apml_tool -h

================================= APML System Management Interface ==================================== Usage: ./apmltool [soc_num] [Option / [--help] [module-name] Where: socnum : socket number 0 or 1 Description: ./apmltool -v - Displays tool version ./apmltool [SOCNUM] --showdependency - Displays module dependency ./apmltool --help - Displays help on the options for the specified module ./apmltool tool [soc_num] [Option] params

    MODULES:
    1. mailbox
    2. sbrmi
    3. sbtsi
    4. reg-access
    5. cpuid
    6. recovery

========================================== End of APML SMI ============================================

$ ./apml_tool -v

``` ================================= APML System Management Interface ====================================

APML_tool version : X.Y.Z

========================================== End of APML SMI ============================================

```

Below is a sample usage to get the individual library functionality API's over I2C. User can pass arguments either any of the ways "./apmltool [socketnum] -p" or "./apmltool [socketnum] --showpower" ``` 1. $ ./apml_tool 0 -p

    ================================= APML System Management Interface ====================================

    ---------------------------------------------
    | Power (Watts)          | 65.029           |
    | PowerLimit (Watts)     | 210.000          |
    | PowerLimitMax (Watts)  | 400.000          |
    ---------------------------------------------

    ========================================== End of APML SMI ============================================

2. $ ./apml_tool 1 --setpowerlimit 200000

    ================================= APML System Management Interface ====================================


    Set power_limit :          200.000 Watts successfully

    ========================================== End of APML SMI ============================================

3. $ ./apml_tool 0 --showtsiregisters

    ================================= APML System Management Interface ====================================
    ----------------------------------------------------------------------------------

                     *** SB-TSI REGISTER SUMMARY ***
    -----------------------------------------------------------------------------------
     FUNCTION/Reg Name      | Reg offset    | Hexa(0x)      | Value [Units]
    -------------------------------------------------------------------------------------------
    _PROCTEMP               |               |               | 55.125 °C
            PROC_INT        | 0x1           | 0x37          | 55 °C
            PROC_DEC        | 0x10          | 0x1           | 0.125 °C
    _STATUS                 | 0x2           |               |
            PROC Temp Alert |               |               | PROC No Temp Alert
            Mem Temp Alert  |               |               | HBM High Temp Alert
    _CONFIG                 | 0x3           |               |
            ALERT_L pin     |               |               | Enabled
            Runstop         |               |               | Comparison Enabled
            Atomic Rd order |               |               | Integer latches Decimal
    _TSI_UPDATERATE         | 0x4           |               | 16.000 Hz
    _HIGH_THRESHOLD_TEMP    |               |               | 70.000 °C
            HIGH_INT        | 0x7           | 0x46          | 70 °C
            HIGH_DEC        | 0x13          | 0x0           | 0.000 °C
    _LOW_THRESHOLD_TEMP     |               |               | 0.000 °C
            LOW_INT         | 0x8           | 0x0           | 0 °C
            LOW_DEC         | 0x14          | 0x0           | 0.000 °C
    _HBM_HIGH_THRESHOLD_TEMP|               |               | 0.000 °C
            HIGH_INT        | 0x40          | 0x0           | 0 °C
            HIGH_DEC        | 0x44          | 0x0           | 0.000 °C
    _HBM_LOW_THRESHOLD_TEMP |               |               | 0.000 °C
            LOW_INT         | 0x48          | 0x0           | 0 °C
            LOW_DEC         | 0x4c          | 0x0           | 0.000 °C
    _HBM_MAX_TEMP           |               |               | 49.000 °C
            MAX_INT         | 0x50          | 0x31          | 49 °C
            MAX_DEC         | 0x54          | 0x0           | 0.000 °C
    _HBM_TEMP               |               |               | 47.000 °C
            HBM_INT         | 0x5c          | 0x2f          | 47 °C
            HBM_DEC         | 0x60          | 0x0           | 0.000 °C
    _TEMP_OFFSET            |               |               | 0.000 °C
            OFF_INT         | 0x11          | 0x0           | 0 °C
            OFF_DEC         | 0x12          | 0x0           | 0.000 °C
    _THRESHOLD_SAMPLE       | 0x32          |               |
            PROC Alert TH   |               |               | 1
            HBM Alert TH    |               |               | 1
    _TSI_ALERT_CONFIG       | 0xbf          |               |
            PROC Alert CFG  |               |               | Enabled
            HBM Alert CFG   |               |               | Disabled
    _TSI_MANUFACTURE_ID     | 0xfe          |               | 0
    _TSI_REVISION           | 0xff          |               | 0x4
    -----------------------------------------------------------------------------------

    ========================================== End of APML SMI ============================================

```

Owner

  • Name: AMD
  • Login: amd
  • Kind: organization
  • Email: dl.DevSecOps-Github-Admin@amd.com

GitHub Events

Total
  • Watch event: 3
  • Fork event: 2
Last Year
  • Watch event: 3
  • Fork event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 143
  • Total Committers: 6
  • Avg Commits per committer: 23.833
  • Development Distribution Score (DDS): 0.266
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Khader Basha Shaik K****k@a****m 105
Akshay Gupta A****a@a****m 23
Naveen Krishna Chatradhi n****i@a****m 10
Muralidhara M K m****k@a****m 2
Muralidhara M K m****k@a****m 2
Mallikarjuna-Reddy K-V M****V@a****m 1
Committer Domains (Top 20 + Academic)
amd.com: 6

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 3
  • Total pull requests: 2
  • Average time to close issues: 11 months
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 3.67
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Kostr (2)
  • thejta (1)
Pull Request Authors
  • MichaelJeiShen (1)
  • Kostr (1)
Top Labels
Issue Labels
Pull Request Labels