Lines Matching full:bios

37  * BIOS.
47 /* Check if current bios is an ATOM BIOS.
48 * Return true if it is ATOM BIOS. Otherwise, return false.
53 uint8_t *bios = adev->bios; in check_atom_bios() local
55 if (!bios || size < 0x49) { in check_atom_bios()
60 if (!AMD_IS_VALID_VBIOS(bios)) { in check_atom_bios()
61 dev_dbg(adev->dev, "VBIOS signature incorrect %x %x\n", bios[0], in check_atom_bios()
62 bios[1]); in check_atom_bios()
66 bios_header_start = bios[0x48] | (bios[0x49] << 8); in check_atom_bios()
78 if (!memcmp(bios + tmp, "ATOM", 4) || in check_atom_bios()
79 !memcmp(bios + tmp, "MOTA", 4)) { in check_atom_bios()
89 * part of the system bios. On boot, the system bios puts a
96 uint8_t __iomem *bios; in amdgpu_read_bios_from_vram() local
108 adev->bios = NULL; in amdgpu_read_bios_from_vram()
110 bios = ioremap_wc(vram_base, size); in amdgpu_read_bios_from_vram()
111 if (!bios) in amdgpu_read_bios_from_vram()
114 adev->bios = kmalloc(size, GFP_KERNEL); in amdgpu_read_bios_from_vram()
115 if (!adev->bios) { in amdgpu_read_bios_from_vram()
116 iounmap(bios); in amdgpu_read_bios_from_vram()
120 memcpy_fromio(adev->bios, bios, size); in amdgpu_read_bios_from_vram()
121 iounmap(bios); in amdgpu_read_bios_from_vram()
124 kfree(adev->bios); in amdgpu_read_bios_from_vram()
133 uint8_t __iomem *bios; in amdgpu_read_bios() local
136 adev->bios = NULL; in amdgpu_read_bios()
138 bios = pci_map_rom(adev->pdev, &size); in amdgpu_read_bios()
139 if (!bios) in amdgpu_read_bios()
142 adev->bios = kzalloc(size, GFP_KERNEL); in amdgpu_read_bios()
143 if (adev->bios == NULL) { in amdgpu_read_bios()
144 pci_unmap_rom(adev->pdev, bios); in amdgpu_read_bios()
148 memcpy_fromio(adev->bios, bios, size); in amdgpu_read_bios()
149 pci_unmap_rom(adev->pdev, bios); in amdgpu_read_bios()
152 kfree(adev->bios); in amdgpu_read_bios()
181 adev->bios = kmalloc(len, GFP_KERNEL); in amdgpu_read_bios_from_rom()
182 if (!adev->bios) { in amdgpu_read_bios_from_rom()
183 DRM_ERROR("no memory to allocate for BIOS\n"); in amdgpu_read_bios_from_rom()
188 /* read complete BIOS */ in amdgpu_read_bios_from_rom()
189 amdgpu_asic_read_bios_from_rom(adev, adev->bios, len); in amdgpu_read_bios_from_rom()
192 kfree(adev->bios); in amdgpu_read_bios_from_rom()
203 void __iomem *bios; in amdgpu_read_platform_bios() local
205 adev->bios = NULL; in amdgpu_read_platform_bios()
210 adev->bios = kzalloc(romlen, GFP_KERNEL); in amdgpu_read_platform_bios()
211 if (!adev->bios) in amdgpu_read_platform_bios()
214 bios = ioremap(rom, romlen); in amdgpu_read_platform_bios()
215 if (!bios) in amdgpu_read_platform_bios()
218 memcpy_fromio(adev->bios, bios, romlen); in amdgpu_read_platform_bios()
219 iounmap(bios); in amdgpu_read_platform_bios()
228 kfree(adev->bios); in amdgpu_read_platform_bios()
233 /* ATRM is used to get the BIOS on the discrete cards in
242 * @bios: vbios image pointer
250 static int amdgpu_atrm_call(acpi_handle atrm_handle, uint8_t *bios, in amdgpu_atrm_call() argument
274 memcpy(bios+offset, obj->buffer.pointer, obj->buffer.length); in amdgpu_atrm_call()
314 adev->bios = kmalloc(size, GFP_KERNEL); in amdgpu_atrm_get_bios()
315 if (!adev->bios) { in amdgpu_atrm_get_bios()
316 dev_err(adev->dev, "Unable to allocate bios\n"); in amdgpu_atrm_get_bios()
322 adev->bios, in amdgpu_atrm_get_bios()
330 kfree(adev->bios); in amdgpu_atrm_get_bios()
390 adev->bios = kmemdup(&vbios->VbiosContent, in amdgpu_acpi_vfct_bios()
395 kfree(adev->bios); in amdgpu_acpi_vfct_bios()
435 dev_err(adev->dev, "Unable to locate a BIOS ROM\n"); in amdgpu_get_bios_apu()
500 dev_err(adev->dev, "Unable to locate a BIOS ROM\n"); in amdgpu_get_bios_dgpu()
522 /* helper function for soc15 and onwards to read bios from rom */
524 u8 *bios, u32 length_bytes) in amdgpu_soc15_read_bios_from_rom() argument
532 if (bios == NULL) in amdgpu_soc15_read_bios_from_rom()
544 dw_ptr = (u32 *)bios; in amdgpu_soc15_read_bios_from_rom()