diff options
author | Amitay Isaacs <amitay@ozlabs.org> | 2018-09-21 17:18:43 +1000 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2018-10-15 15:42:59 +1100 |
commit | 4b61c6935375be198707c1803b5423acb83a71ba (patch) | |
tree | b632a203d44455286f3d99146af7991254eaaf2f /libpdbg | |
parent | dd9afe6cab655fc62b27efe38e4f05f7128093b2 (diff) | |
download | pdbg-4b61c6935375be198707c1803b5423acb83a71ba.tar.gz pdbg-4b61c6935375be198707c1803b5423acb83a71ba.zip |
adu: Avoid address truncation from 64-bit to 32-bit
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Diffstat (limited to 'libpdbg')
-rw-r--r-- | libpdbg/adu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpdbg/adu.c b/libpdbg/adu.c index 27049b7..e956b71 100644 --- a/libpdbg/adu.c +++ b/libpdbg/adu.c @@ -368,7 +368,7 @@ retry: CHECK_ERR(adu_reset(adu)); /* Set the address */ - ctrl_reg = SETFIELD(P9_FBC_ALTD_ADDRESS, 0, addr); + ctrl_reg = SETFIELD(P9_FBC_ALTD_ADDRESS, 0ULL, addr); CHECK_ERR(pib_write(&adu->target, P9_ALTD_CONTROL_REG, ctrl_reg)); /* Start the command */ @@ -420,7 +420,7 @@ static int p9_adu_putmem(struct adu *adu, uint64_t addr, uint64_t data, int size CHECK_ERR(adu_reset(adu)); /* Set the address */ - ctrl_reg = SETFIELD(P9_FBC_ALTD_ADDRESS, 0, addr); + ctrl_reg = SETFIELD(P9_FBC_ALTD_ADDRESS, 0ULL, addr); retry: CHECK_ERR(pib_write(&adu->target, P9_ALTD_CONTROL_REG, ctrl_reg)); |