1 // Copyright 2017 The Fuchsia Authors
2 //
3 // Use of this source code is governed by a MIT-style
4 // license that can be found in the LICENSE file or at
5 // https://opensource.org/licenses/MIT
6 
7 #pragma once
8 
9 #include <vm/vm_object.h>
10 #include <fbl/ref_ptr.h>
11 
12 namespace crypto {
13 
14 namespace entropy {
15 
16 #if ENABLE_ENTROPY_COLLECTOR_TEST
17 
18 // These fields are read in kernel/lib/userboot/userboot.cpp, in order to pass
19 // the VmObject on to devmgr (where it's added to the filesystem).
20 extern fbl::RefPtr<VmObject> entropy_vmo;
21 extern bool entropy_was_lost;
22 #endif
23 
24 // This function is always defined. If ENABLE_ENTROPY_COLLECTOR_TEST is set,
25 // this function runs the early boot test. Otherwise, it does nothing.
26 void EarlyBootTest();
27 
28 } // namespace entropy
29 
30 } // namespace crypto
31