aboutsummaryrefslogtreecommitdiff
path: root/asm/rom_entry.S
diff options
context:
space:
mode:
authorClaudio Carvalho <cclaudio@linux.vnet.ibm.com>2016-09-28 05:01:03 -0300
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-05 14:42:26 +1100
commit26a1d0c487d6b61afb0a338189d98c91bb481ee9 (patch)
tree773b093c58dc954b37a728790e0507407bdd127d /asm/rom_entry.S
parent6ef40b5999aad01379daf19689d264f9e3d518d7 (diff)
downloadskiboot-26a1d0c487d6b61afb0a338189d98c91bb481ee9.zip
skiboot-26a1d0c487d6b61afb0a338189d98c91bb481ee9.tar.gz
skiboot-26a1d0c487d6b61afb0a338189d98c91bb481ee9.tar.bz2
libc/string: add memcpy_from_ci()
This adds memcpy_from_ci, a cache inhibited version of memcpy, required by secure boot. The secure boot verification code is stored in a secure ROM and 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 RAM and we use memcpy_ci for that. What makes memcpy_ci vs ordinary memcpy? memcpy copies data like in the example below and the compiler translates that to load instructions that are not cache inhibited (e.g. lbzx - load byte and zero indexed). In other words, the data is cached. a[i] = b[i] memcpy_ci copies data using the cache inhibited version of load instructions: in_8() and in_be32(), both defined in include/io.h. These functions use lbzcix and lwzcix assembly instructions, respectively. In this case, the data is not cached as required by the logic that contains the ROM. *((uint8_t*) destp) = in_8((uint8_t*)srcp); *((uint32_t*) destp) = in_be32((uint32_t*)srcp) Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'asm/rom_entry.S')
0 files changed, 0 insertions, 0 deletions