Lines Matching refs:reloc
55 struct boot_mem_reloc *reloc; member
137 boot_mem_desc->reloc = mem_alloc_tmp(boot_mem_desc, in boot_mem_init()
138 sizeof(*boot_mem_desc->reloc), in boot_mem_init()
139 alignof(*boot_mem_desc->reloc)); in boot_mem_init()
140 memset(boot_mem_desc->reloc, 0, sizeof(*boot_mem_desc->reloc)); in boot_mem_init()
167 struct boot_mem_reloc *reloc = NULL; in boot_mem_add_reloc() local
169 assert(boot_mem_desc && boot_mem_desc->reloc); in boot_mem_add_reloc()
170 reloc = boot_mem_desc->reloc; in boot_mem_add_reloc()
173 if (reloc->count == ARRAY_SIZE(reloc->ptrs)) { in boot_mem_add_reloc()
174 reloc = boot_mem_alloc_tmp(sizeof(*reloc), alignof(*reloc)); in boot_mem_add_reloc()
175 reloc->next = boot_mem_desc->reloc; in boot_mem_add_reloc()
176 boot_mem_desc->reloc = reloc; in boot_mem_add_reloc()
179 reloc->ptrs[reloc->count] = ptr; in boot_mem_add_reloc()
180 reloc->count++; in boot_mem_add_reloc()
198 struct boot_mem_reloc *reloc = NULL; in boot_mem_relocate() local
208 boot_mem_desc->reloc = add_offs(boot_mem_desc->reloc, offs); in boot_mem_relocate()
210 for (reloc = boot_mem_desc->reloc;; reloc = reloc->next) { in boot_mem_relocate()
211 for (n = 0; n < reloc->count; n++) { in boot_mem_relocate()
212 reloc->ptrs[n] = add_offs(reloc->ptrs[n], offs); in boot_mem_relocate()
213 *reloc->ptrs[n] = add_offs_or_null(*reloc->ptrs[n], in boot_mem_relocate()
216 if (!reloc->next) in boot_mem_relocate()
218 reloc->next = add_offs(reloc->next, offs); in boot_mem_relocate()