Lines Matching refs:th
166 struct sfi_table_header *th;
170 th = sfi_map_memory(pa, sizeof(struct sfi_table_header));
172 th = (void *)syst_va + (pa - syst_pa);
175 if (TABLE_ON_PAGE(th, th, th->len))
176 return th;
179 length = th->len;
181 sfi_unmap_memory(th, sizeof(struct sfi_table_header));
192 void sfi_unmap_table(struct sfi_table_header *th)
194 if (!TABLE_ON_PAGE(syst_va, th, th->len))
195 sfi_unmap_memory(th, TABLE_ON_PAGE(th, th, th->len) ?
196 sizeof(*th) : th->len);
199 static int sfi_table_check_key(struct sfi_table_header *th,
203 if (strncmp(th->sig, key->sig, SFI_SIGNATURE_SIZE)
204 || (key->oem_id && strncmp(th->oem_id,
206 || (key->oem_table_id && strncmp(th->oem_table_id,
233 struct sfi_table_header *th;
236 th = sfi_map_table(pa);
237 if (!th)
241 sfi_print_table_header(pa, th);
242 if (sfi_verify_table(th))
245 if (!sfi_table_check_key(th, key))
246 return th; /* Success */
249 sfi_unmap_table(th);
261 struct sfi_table_header *th;
266 th = sfi_check_table(syst_va->pentry[i], key);
267 if (!IS_ERR(th) && th)
268 return th;
274 void sfi_put_table(struct sfi_table_header *th)
276 sfi_unmap_table(th);
395 struct sfi_table_header *th = NULL;
404 th = sfi_get_table(&key);
405 if (!th)
409 th, th->len);
410 sfi_put_table(th);
421 struct sfi_table_header *th;
428 th = sfi_map_table(pa);
429 if (!th || !th->sig[0]) {
435 memcpy(tbl_attr->name, th->sig, SFI_SIGNATURE_SIZE);
449 sfi_unmap_table(th);