[haiku-commits] Re: r42566 - haiku/trunk/src/add-ons/kernel/drivers/graphics/radeon_hd

  • From: Alexander von Gluck <kallisti5@xxxxxxxxxxx>
  • To: <haiku-commits@xxxxxxxxxxxxx>
  • Date: Thu, 04 Aug 2011 09:13:03 -0500

On Thu, 4 Aug 2011 14:35:56 +0200, Philippe Houdoin wrote:
You mean just in case create_area() is severely broken? Nothing against defensive programming, but this is overkill.

More probably for the case where copying the Bios image in this area
will failed.

It was just for safety, if the AtomBIOS got a hold of an incomplete bios, i wasn't sure if it may execute unknown code as create_area doesn't guarantee
the area will be empty.

But I agree, the area creation should be done in radeon_hd_getbios()
directly, not in a preemptive way in radeon_hd_init(), using pci's
config rom_size value which could be far larger than needed... or just
set to zero by BIOS, and the actual size been extracted from the rom
header instead.

We do create_area for the exact size of the bios, either the PCI reported size or the system shadow size. I agree though it could be cleaned up a bit... i'll just have to be careful to not clone something that doesn't exist in the
accelerant.

Thanks!
 -- Alex

Other related posts: