Skip to content

Commit

Permalink
lopper: assists: baremetal_xparameters_xlnx: Add support for generati…
Browse files Browse the repository at this point in the history
…ng NUMBER_OF_SLRS define

Added support for generating the NUMBER_OF_SLRS define if the slrcount
variable defined in the root node.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
  • Loading branch information
Appana Durga Kedareswara rao authored and zeddii committed Mar 28, 2023
1 parent 6831950 commit 395f00d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lopper/assists/baremetal_xparameters_xlnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,12 @@ def xlnx_generate_xparams(tgt_node, sdt, options):
plat.buf(f"\n#define STDOUT_BASEADDRESS {hex(val)}")
plat.buf(f"\n#define STDIN_BASEADDRESS {hex(val)}\n")

#Define for NUMBER_OF_SLRS
if sdt.tree[tgt_node].propval('slrcount') != ['']:
val = sdt.tree[tgt_node].propval('slrcount', list)[0]
plat.buf(f"\n/* Number of SLRs */")
plat.buf(f"\n#define NUMBER_OF_SLRS {hex(val)}\n")

plat.buf('\n#endif /* end of protection macro */')
plat.out(''.join(plat.get_buf()))

Expand Down

0 comments on commit 395f00d

Please sign in to comment.