Messages in this thread | | | Subject | Re: [PATCH] PCDP: use early_ioremap/early_iounmap to access pcdp table | From | Khalid Aziz <> | Date | Thu, 19 Jul 2012 09:33:22 -0600 |
| |
On Wed, 2012-07-18 at 16:19 -0600, Greg Pearson wrote: > --- a/drivers/firmware/pcdp.c > +++ b/drivers/firmware/pcdp.c > @@ -95,7 +95,7 @@ efi_setup_pcdp_console(char *cmdline) > if (efi.hcdp == EFI_INVALID_TABLE_ADDR) > return -ENODEV; > > - pcdp = ioremap(efi.hcdp, 4096); > + pcdp = early_ioremap(efi.hcdp, 4096);
While we are fixing this code up, mapping 4K blindly just does not feel right to me. Trouble here is that the length of PCDP table is buried in the header for PCDP table and we can not read it unless we map the table in. We get the address for PCDP table from the EFI system table which was mapped in earlier and pointers to various tables were extracted at that point. So this is a chicken and egg problem. Any ideas if we can do better than blindly mapping 4K?
-- Khalid Aziz <khalid.aziz@hp.com>
| |