Lines Matching defs:ucodefp

243 	ucode_file_amd_t *ucodefp = ufp->amd;
245 if (ucodefp == NULL)
248 ucode_free(id, ucodefp, sizeof (ucode_file_amd_t));
255 ucode_file_intel_t *ucodefp = &ufp->intel;
258 if (ucodefp == NULL || ucodefp->uf_header == NULL)
261 total_size = UCODE_TOTAL_SIZE_INTEL(ucodefp->uf_header->uh_total_size);
262 body_size = UCODE_BODY_SIZE_INTEL(ucodefp->uf_header->uh_body_size);
263 if (ucodefp->uf_body) {
264 ucode_free(id, ucodefp->uf_body, body_size);
265 ucodefp->uf_body = NULL;
268 if (ucodefp->uf_ext_table) {
271 ucode_free(id, ucodefp->uf_ext_table, size);
272 ucodefp->uf_ext_table = NULL;
275 ucode_free(id, ucodefp->uf_header, UCODE_HEADER_SIZE_INTEL);
276 ucodefp->uf_header = NULL;
411 ucode_file_amd_t *ucodefp = ufp->amd;
426 if (ucodefp == NULL)
427 ucodefp = ucode_zalloc(cp->cpu_id, sizeof (*ucodefp));
428 else if (ucode_match_amd(eq_sig, uinfop, ucodefp, sizeof (*ucodefp))
432 if (ucodefp == NULL)
435 ufp->amd = ucodefp;
450 count = kobj_read(fd, (char *)ucodefp, sizeof (*ucodefp), 0);
453 if (ucode_match_amd(eq_sig, uinfop, ucodefp, count) == EM_OK)
484 ucodefp = ucode_zalloc(cp->cpu_id, sizeof (*ucodefp));
485 ASSERT(ucodefp);
486 ufp->amd = ucodefp;
488 ucodefp->usize = size;
489 ucodefp->ucodep = ucode_zalloc(cp->cpu_id, size);
490 ASSERT(ucodefp->ucodep);
493 count = kobj_read(fd, (char *)ucodefp->ucodep, size, 0);
500 rc = ucode->validate(ucodefp->ucodep, ucodefp->usize);
506 ucode_chipset_amd(ucodefp->ucodep, ucodefp->usize);
521 ucode_file_intel_t *ucodefp = &ufp->intel;
528 if (ucode_match_intel(cpi_sig, uinfop, ucodefp->uf_header,
529 ucodefp->uf_ext_table) == EM_OK && ucodefp->uf_body != NULL) {
550 ucodefp->uf_header = ucode_zalloc(cp->cpu_id, header_size);
551 if (ucodefp->uf_header == NULL)
554 count = kobj_read(fd, (char *)ucodefp->uf_header, header_size, 0);
559 ucode_header_intel_t *uhp = ucodefp->uf_header;
570 ucodefp->uf_body = ucode_zalloc(cp->cpu_id, body_size);
571 if (ucodefp->uf_body == NULL) {
576 if (kobj_read(fd, (char *)ucodefp->uf_body,
585 (uint8_t *)ucodefp->uf_header);
586 if (ucode_checksum_intel(sum, body_size, ucodefp->uf_body)) {
600 ucodefp->uf_ext_table = ucode_zalloc(cp->cpu_id, ext_size);
601 if (ucodefp->uf_ext_table == NULL) {
606 if (kobj_read(fd, (char *)ucodefp->uf_ext_table,
610 (uint8_t *)(ucodefp->uf_ext_table))) {
616 for (i = 0; i < ucodefp->uf_ext_table->uet_count;
620 (uint8_t *)(&(ucodefp->uf_ext_table->
640 rc = ucode_match_intel(cpi_sig, uinfop, ucodefp->uf_header,
641 ucodefp->uf_ext_table);
649 ucode_file_amd_t *ucodefp, int size)
653 if (ucodefp == NULL || size < sizeof (ucode_header_amd_t))
656 uh = &ucodefp->uf_header;
664 ucodefp->uf_code_present)
772 ucode_file_amd_t *ucodefp = ufp->amd;
780 ASSERT(ucodefp);
789 wrmsr(ucode->write_msr, (uintptr_t)ucodefp);
794 return (ucodefp->uf_header.uh_patch_id);
796 uus.ucodep = ucodefp->ucodep;
797 uus.usize = ucodefp->usize;
810 ucode_file_intel_t *ucodefp = &ufp->intel;
829 usize = UCODE_TOTAL_SIZE_INTEL(ucodefp->uf_header->uh_total_size);
833 body_size = UCODE_BODY_SIZE_INTEL(ucodefp->uf_header->uh_body_size);
838 (void) memcpy(ustart, ucodefp->uf_header, UCODE_HEADER_SIZE_INTEL);
839 (void) memcpy(&ustart[UCODE_HEADER_SIZE_INTEL], ucodefp->uf_body,
843 ucodefp->uf_ext_table, ext_size);
852 wrmsr(ucode->write_msr, (uintptr_t)ucodefp->uf_body);
857 return (ucodefp->uf_header->uh_rev);