HomeFreeBSD

Check if the gettime runtime service is valid.

Description

Check if the gettime runtime service is valid.

The U-Boot efi runtime service expects us to set the address map before
calling any runtime services. It will then remap a few functions to their
runtime version. One of these is the gettime function. If we call into
this without having set a runtime map we get a page fault.

Add a check to see if this is valid in efi_init() so we don't try to use
the possibly invalid pointer.

Reviewed by: imp, kevans (both previous version)
X-MFC-With: r330868
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14759

Details

Provenance
andrewAuthored on
Reviewer
imp
Differential Revision
D14759: Check if the gettime runtime service is valid
Parents
rS331240: Kill assert I shouldn't have committed
Branches
Unknown
Tags
Unknown