[SeaBIOS] [PATCH] optionrom: disallow int19 redirect for pnp roms.

Gerd Hoffmann kraxel at redhat.com
Wed Nov 28 07:25:46 CET 2018


> > @@ -136,9 +137,24 @@ init_optionrom(struct rom_header *rom, u16 bdf, int isvga)
> >  
> >      tpm_option_rom(newrom, rom->size * 512);
> >  
> > -    if (isvga || get_pnp_rom(newrom))
> > +    struct pnp_data *pnp = get_pnp_rom(newrom);
> > +    if (isvga || pnp) {

> Is it OK to call get_pnp_rom() when "isvga" is set?

Yes.  In case the rom isn't a pnp rom you just get back a NULL pointer.

cheers,
  Gerd




More information about the SeaBIOS mailing list