[Pdbg] [PATCH 3/3] libpdbg: Wrappers for cache inhibited adu_getmem and adu_putmem

Joel Stanley joel at jms.id.au
Wed May 23 15:05:48 AEST 2018


On 23 May 2018 at 14:32, Alistair Popple <alistair at popple.id.au> wrote:
>> diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
>> index 97d2e131ce51..1aa851ab1c72 100644
>> --- a/libpdbg/libpdbg.h
>> +++ b/libpdbg/libpdbg.h
>> @@ -171,8 +171,12 @@ int htm_status(struct pdbg_target *target);
>>  int htm_reset(struct pdbg_target *target, uint64_t *base, uint64_t *size);
>>  int htm_dump(struct pdbg_target *target, uint64_t size, const char *filename);
>>
>> -int adu_getmem(struct pdbg_target *target, uint64_t addr, uint8_t *ouput, uint64_t size, bool ci);
>> -int adu_putmem(struct pdbg_target *target, uint64_t addr, uint8_t *input, uint64_t size, bool ci);
>> +int adu_getmem(struct pdbg_target *target, uint64_t addr, uint8_t *ouput, uint64_t size);
>> +int adu_putmem(struct pdbg_target *target, uint64_t addr, uint8_t *input, uint64_t size);
>> +int adu_getmem_ci(struct pdbg_target *target, uint64_t addr, uint8_t *ouput, uint64_t size);
>> +int adu_putmem_ci(struct pdbg_target *target, uint64_t addr, uint8_t *input, uint64_t size);
>> +int __adu_getmem(struct pdbg_target *target, uint64_t addr, uint8_t *ouput, uint64_t size, bool ci);
>> +int __adu_putmem(struct pdbg_target *target, uint64_t addr, uint8_t *input, uint64_t size, bool ci);
>
> Do you think we should maintain these as a user callable library API? Or should
> we just remove it and refactor the existing code to use the _ci versions
> instead?

I refactored them out, but then the getmem command has to do if (ci)
adu_getmem_ci() else adu_getmem(), so I made them public again.

I don't have any strong opinions. If you think we should hide them
then I'm happy to rework to do that.

Cheers,

Joel


More information about the Pdbg mailing list