Refresh currently displayed form


Tim Crawford
 

Hi all,

How can I refresh the currently displayed form?

The problem I'm trying to solve is that when on the BootManager page, insertion or removal of a device does not update the form, leaving the list of boot options in an invalid state.

Right now I'm trying to hack in an event to accomplish this, but someone said there may be a mechanism to do this.

Thanks,
Tim


Tomas Pilar (tpilar)
 

Hi,

You can add a 'refreshguid' property to a number of VFR objects. Then,
whenever you signal the event group with that guid, the object should be
refreshed by the HII Browser.

Cheers,
Tom

On Wed, Oct 28, 2020 at 1:04 PM Tim Crawford <crawfxrd@gmail.com> wrote:

Hi all,

How can I refresh the currently displayed form?

The problem I'm trying to solve is that when on the BootManager page,
insertion or removal of a device does not update the form, leaving the list
of boot options in an invalid state.

Right now I'm trying to hack in an event to accomplish this, but someone
said there may be a mechanism to do this.

Thanks,
Tim






Tomas Pilar (tpilar)
 

Okay, I actually read the rest of your question and your problem is deeper
than that. What you need is for the device to be connected to a driver
(driver which might need to be loaded from the device option ROM), boot
manager to re-enumerate boot options, and then the page can be reloaded.
This is more difficult than what I originally thought you were trying to do.

Cheers,
Tom

On Wed, Oct 28, 2020 at 1:58 PM Tomas Pilar <tomas@nuviainc.com> wrote:

Hi,

You can add a 'refreshguid' property to a number of VFR objects. Then,
whenever you signal the event group with that guid, the object should be
refreshed by the HII Browser.

Cheers,
Tom

On Wed, Oct 28, 2020 at 1:04 PM Tim Crawford <crawfxrd@gmail.com> wrote:

Hi all,

How can I refresh the currently displayed form?

The problem I'm trying to solve is that when on the BootManager page,
insertion or removal of a device does not update the form, leaving the list
of boot options in an invalid state.

Right now I'm trying to hack in an event to accomplish this, but someone
said there may be a mechanism to do this.

Thanks,
Tim






Tim Crawford
 

I've added a protocol notify event for gEfiBlockIoProtocolGuid and hacked it to signal the event on protocol removal as well. edk2 doesn't seem to have a mechanism to notify about a protocol being removed, only created? This works well enough to for now since I only care about USB flash drives, although I haven't dug into the boot log to see what effect calling notify events on protocol removal has in other places.

I'm now looking at methods to refresh the form in place, so I'll grep around for code using a refreshguid as an example.