Re: Use PCI ROMs from EFI boot services

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/06/2012 10:19 AM, Bjorn Helgaas wrote:
On Wed, Dec 5, 2012 at 5:52 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
On Wed, Dec 5, 2012 at 4:51 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
On Wed, Dec 5, 2012 at 4:36 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
On 12/05/2012 04:15 PM, Yinghai Lu wrote:


I don't see why that isn't the right fix.  We copy the data into
boot_params early in the boot; that *is* the official copy as far as the
kernel is concerned.

So this patch very much seems like The Right Thing.

it moves boot_params from __initdata  to data.

    should be from __initdata to bss

and just for using pointer to setup_data.

should add setup_data pointer instead. so will not waste (4096 - 8) bytes.

I'm not following the whole discussion here, but my impression is that
what's in my -next branch is acceptable
(http://git.kernel.org/?p=linux/kernel/git/helgaas/pci.git;a=commitdiff;h=328949ff10f2e3fcb11472571294beed39488342)

If not, please explain further and provide a patch to fix it.


NAK on this bit:

+       if (boot_params.hdr.version < 0x0209)
+               return 0;

This field is kernel->bootloader documentation. If a nonmaching value somehow leaks into the kernel, the kernel could either panic("Bootloader written by moron") or it should clear some fields, but littering the kernel with these kinds of tests is just plain braindead.

	-hpa


--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux