[Skiboot] [PATCH 14/15] libstb/drivers: Add ROM code driver
Oliver O'Halloran
oohall at gmail.com
Thu Sep 8 11:26:31 AEST 2016
On Thu, Sep 8, 2016 at 1:53 AM, Claudio Carvalho
<cclaudio at linux.vnet.ibm.com> wrote:
>
>
> On 09/03/2016 12:38 AM, Oliver O'Halloran wrote:
>> On Thu, Aug 11, 2016 at 3:23 PM, Claudio Carvalho
>> <cclaudio at linux.vnet.ibm.com> wrote:
>>> + /**
>>> + * We use memcpy_ci to copy the verification code from the secure ROM
>>> + * to memory. Due to performance issues we opted to run it from memory.
>>> + */
>>> + chip = next_chip(NULL);
>>> + xscom_read(chip->id, reg_addr, ®_data);
>>> + memcpy_ci(romcode_base_addr, (void*) reg_data,
>>> + ROMCODE_MEMORY_SIZE);
>>
>> Could you document why accessing the ROM needs to be done with CI
>> loads? We use them when dealing with MMIO registers (like the XSCOMs)
>> to ensure loads and stores go to/from the actual register rather than
>> the cache, but I don't see why this is necessary for a ROM.
>>
>
> Sure. I can replace the comments above by something like this:
>
> /**
> * The logic that contains the ROM within the processor is implemented
> * in a way that it only responds to CI (cache inhibited) operations.
> * Due to performance issues we copy the verification code from the
> * secure ROM to memory and we use memcpy_ci to do that.
> */
>
> Is that better?
That's better.
More information about the Skiboot
mailing list