search for: radeon_read_platform_bios

Displaying 13 results from an estimated 13 matches for "radeon_read_platform_bios".

2020 Mar 05
2
[PATCH v2 0/2] Fix loading of platform ROM from 32-bit EFI
This patch series fixes an oops when loading the radeon driver on old Macs with a 32-bit EFI implementation. Tested on a MacPro 1,1 with a Radeon X1900 XT card and 32-bit kernel. Mikel Rychliski (2): drm/radeon: Stop directly referencing iomem PCI: Use ioremap(), not phys_to_virt() for platform ROM drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 1 +
2020 Mar 13
0
[PATCH RESEND v2 1/2] drm/radeon: Stop directly referencing iomem
pci_platform_rom() returns an __iomem pointer which should not be accessed directly. Change radeon_read_platform_bios() to use memcpy_fromio() instead of calling kmemdup() on the __iomem pointer. Signed-off-by: Mikel Rychliski <mikel at mikelr.com> --- drivers/gpu/drm/radeon/radeon_bios.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/...
2020 Mar 13
3
[PATCH RESEND v2 0/2] Fix loading of platform ROM from 32-bit EFI
This patch series fixes an oops when loading the radeon driver on old Macs with a 32-bit EFI implementation. Tested on a MacPro 1,1 with a Radeon X1900 XT card and 32-bit kernel. Changes in v2: - Add iounmap() call in nouveau - Update function comment for pci_platform_rom() - Minor changes to commit messages Mikel Rychliski (2): drm/radeon: Stop directly referencing iomem PCI: Use
2020 Mar 19
2
[PATCH v3] PCI: Use ioremap(), not phys_to_virt() for platform ROM
..._module+0x12d/0x160 do_fast_syscall_32+0x82/0x250 entry_SYSENTER_32+0xa5/0xf8 Fix the issue by updating all drivers which can access a platform provided ROM. Instead of calling the helper function pci_platform_rom() which uses phys_to_virt(), call ioremap() directly on the pdev->rom. radeon_read_platform_bios() previously directly accessed an __iomem pointer. Avoid this by calling memcpy_fromio() instead of kmemdup(). pci_platform_rom() now has no remaining callers, so remove it. Signed-off-by: Mikel Rychliski <mikel at mikelr.com> --- Tested on a MacPro 1,1 with a Radeon X1900 XT card and 32-b...
2020 Mar 30
1
[PATCH v3] PCI: Use ioremap(), not phys_to_virt() for platform ROM
...ry_SYSENTER_32+0xa5/0xf8 > > > > Fix the issue by updating all drivers which can access a platform > > provided ROM. Instead of calling the helper function > > pci_platform_rom() which uses phys_to_virt(), call ioremap() directly on > the pdev->rom. > > > > radeon_read_platform_bios() previously directly accessed an __iomem > > pointer. Avoid this by calling memcpy_fromio() instead of kmemdup(). > > > > pci_platform_rom() now has no remaining callers, so remove it. > > > > Signed-off-by: Mikel Rychliski <mikel at mikelr.com> > > I app...
2020 Apr 11
0
[PATCH AUTOSEL 5.5 121/121] PCI: Use ioremap(), not phys_to_virt() for platform ROM
...xa7/0x180 [drm] radeon_pci_probe+0x10f/0x1a0 [radeon] pci_device_probe+0xd4/0x140 Fix the issue by updating all drivers which can access a platform provided ROM. Instead of calling the helper function pci_platform_rom() which uses phys_to_virt(), call ioremap() directly on the pdev->rom. radeon_read_platform_bios() previously directly accessed an __iomem pointer. Avoid this by calling memcpy_fromio() instead of kmemdup(). pci_platform_rom() now has no remaining callers, so remove it. Link: https://lore.kernel.org/r/20200319021623.5426-1-mikel at mikelr.com Signed-off-by: Mikel Rychliski <mikel at mikel...
2020 Apr 11
0
[PATCH AUTOSEL 5.6 149/149] PCI: Use ioremap(), not phys_to_virt() for platform ROM
...xa7/0x180 [drm] radeon_pci_probe+0x10f/0x1a0 [radeon] pci_device_probe+0xd4/0x140 Fix the issue by updating all drivers which can access a platform provided ROM. Instead of calling the helper function pci_platform_rom() which uses phys_to_virt(), call ioremap() directly on the pdev->rom. radeon_read_platform_bios() previously directly accessed an __iomem pointer. Avoid this by calling memcpy_fromio() instead of kmemdup(). pci_platform_rom() now has no remaining callers, so remove it. Link: https://lore.kernel.org/r/20200319021623.5426-1-mikel at mikelr.com Signed-off-by: Mikel Rychliski <mikel at mikel...
2020 Apr 11
0
[PATCH AUTOSEL 5.4 108/108] PCI: Use ioremap(), not phys_to_virt() for platform ROM
...xa7/0x180 [drm] radeon_pci_probe+0x10f/0x1a0 [radeon] pci_device_probe+0xd4/0x140 Fix the issue by updating all drivers which can access a platform provided ROM. Instead of calling the helper function pci_platform_rom() which uses phys_to_virt(), call ioremap() directly on the pdev->rom. radeon_read_platform_bios() previously directly accessed an __iomem pointer. Avoid this by calling memcpy_fromio() instead of kmemdup(). pci_platform_rom() now has no remaining callers, so remove it. Link: https://lore.kernel.org/r/20200319021623.5426-1-mikel at mikelr.com Signed-off-by: Mikel Rychliski <mikel at mikel...
2020 Apr 11
0
[PATCH AUTOSEL 4.19 66/66] PCI: Use ioremap(), not phys_to_virt() for platform ROM
...xa7/0x180 [drm] radeon_pci_probe+0x10f/0x1a0 [radeon] pci_device_probe+0xd4/0x140 Fix the issue by updating all drivers which can access a platform provided ROM. Instead of calling the helper function pci_platform_rom() which uses phys_to_virt(), call ioremap() directly on the pdev->rom. radeon_read_platform_bios() previously directly accessed an __iomem pointer. Avoid this by calling memcpy_fromio() instead of kmemdup(). pci_platform_rom() now has no remaining callers, so remove it. Link: https://lore.kernel.org/r/20200319021623.5426-1-mikel at mikelr.com Signed-off-by: Mikel Rychliski <mikel at mikel...
2020 Mar 28
0
[PATCH v3] PCI: Use ioremap(), not phys_to_virt() for platform ROM
...scall_32+0x82/0x250 > entry_SYSENTER_32+0xa5/0xf8 > > Fix the issue by updating all drivers which can access a platform > provided ROM. Instead of calling the helper function pci_platform_rom() > which uses phys_to_virt(), call ioremap() directly on the pdev->rom. > > radeon_read_platform_bios() previously directly accessed an __iomem > pointer. Avoid this by calling memcpy_fromio() instead of kmemdup(). > > pci_platform_rom() now has no remaining callers, so remove it. > > Signed-off-by: Mikel Rychliski <mikel at mikelr.com> I applied this to pci/resource for v5....
2020 Mar 18
0
[PATCH RESEND v2 2/2] PCI: Use ioremap(), not phys_to_virt() for platform ROM
...ci_platform_rom() are exposed to the fact that it just calls ioremap(). I decided against wrapping the iounmap() with a pci_unmap_platform_rom(), but I didn't apply the same consideration to the existing function. How about something like this (with pci_platform_rom() removed)? static bool radeon_read_platform_bios(struct radeon_device *rdev) { phys_addr_t rom = rdev->pdev->rom; size_t romlen = rdev->pdev->romlen; void __iomem *bios; rdev->bios = NULL; if (!rom || romlen == 0) return false; rdev->bios = kzalloc(romlen, GFP_KERNEL); if (!rdev->bios) return false; bios = ior...
2020 Mar 17
2
[PATCH RESEND v2 2/2] PCI: Use ioremap(), not phys_to_virt() for platform ROM
On Fri, Mar 13, 2020 at 06:22:58PM -0400, Mikel Rychliski wrote: > /** > + * pci_platform_rom - ioremap() the ROM image provided by the platform > * @pdev: pointer to pci device struct > * @size: pointer to receive size of pci window over ROM > + * > + * Return: kernel virtual pointer to image of ROM > + * > + * The caller is responsible for removing the mapping with
2020 Mar 13
0
[PATCH RESEND v2 2/2] PCI: Use ioremap(), not phys_to_virt() for platform ROM
...tform_fini, .read = pcirom_read, .rw = true, }; diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c index c3ae4c92a115..712b88d88957 100644 --- a/drivers/gpu/drm/radeon/radeon_bios.c +++ b/drivers/gpu/drm/radeon/radeon_bios.c @@ -123,6 +123,7 @@ static bool radeon_read_platform_bios(struct radeon_device *rdev) return false; memcpy_fromio(rdev->bios, bios, size); + iounmap(bios); if (size == 0 || rdev->bios[0] != 0x55 || rdev->bios[1] != 0xaa) { kfree(rdev->bios); diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index 137bf0cee897..b38257d23e6e 10064...