Commit Graph

2 Commits

Author SHA1 Message Date
Stephen J. Kiernan
5c6b397ff1 The getsecs() function is implemented in platform- and bootfw-specific
files and, in a number of these places, there were problems with how they
were declared.

Some used int return instead of time_t. On some architectures the bit
width of time_t did not naturally fit into an integer and could lead to
some unexpected behavior. (For example, 32-bit ARM builds uses a 64-bit
time_t.)

Make sure the function prototypes always specify void for the argument
list when they do not have any arguemnts, otherwise some compilers can
complain about the prototype.

Reported by:	Kevin Zheng
Reviewed by:	sjg
Approved by:	sjg (mentor)
Obtained from:	Juniper Networks, Inc.
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D7463
2016-09-22 06:24:40 +00:00
Andrew Turner
d15667174d Use the UEFI event timer to update the time on arm and arm64. The current
code uses the GetTime function from the Runtime Service, however this has
been shown to not return a useable time on many arm64 UEFI implementations.

Reviewed by:	jhb, smh
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D6709
2016-06-04 08:47:45 +00:00