Or perhaps we could avoid grub_dl_unload_all_modules altogether. For example,
gfxterm might think that graphical mode needs to be disabled when it's
unloaded, but the OS loader knows better. You could want to tell your OS
about the framebuffer state so it can be used by it without glitches.
The same would apply, for example, to stopping the floppy drive. Instead
of waiting for the drive to tell us it has stopped, we could tell the OS
it's still spinning if our loader knows how to do that (and the OS knows
how to receive this information).