[Pdbg] [PATCH 1/2] libpdbg: Fix address translation for p9 chiplet

Alistair Popple alistair at popple.id.au
Tue Mar 10 16:51:15 AEDT 2020


On Friday, 6 March 2020 3:55:15 PM AEDT Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
>  libpdbg/p9chip.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
> index da7ed00..c82f00e 100644
> --- a/libpdbg/p9chip.c
> +++ b/libpdbg/p9chip.c
> @@ -599,7 +599,7 @@ static int p9_chiplet_probe(struct pdbg_target *target)
> 
>  static uint64_t p9_chiplet_translate(struct pdbg_target *target, uint64_t
> addr) {
> -	return addr + pdbg_target_address(target, NULL);
> +	return (addr & 0xc0ffffff) + pdbg_target_address(target, NULL);

Any reason you didn't use 0xffffffffc0ffffff to match what p9_scom_addr.H does? Not 
sure if any of the other bits are used in this context, but it wouldn't be the 
first time we have been burnt with mismatched address translation.

- Alistair

>  }
> 
>  static struct chiplet p9_chiplet = {






More information about the Pdbg mailing list