Software APIs
manifest_def.c
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #include "sw/device/silicon_creator/lib/manifest_def.h"
6 
7 #include <stdint.h>
8 
9 /**
10  * Declarations for the manifest fields populated by the linker script.
11  */
12 extern char _manifest_code_start[];
13 extern char _manifest_code_end[];
14 extern char _manifest_entry_point[];
15 extern char _manifest_address_translation[];
16 
17 /**
18  * Manifest definition.
19  *
20  * Definition of the manifest that resides in the `.manifest` section. The
21  * initializer should explicitly specify the initial values of the members whose
22  * values are known a compilation time, such as `version`, `code_start`,
23  * `code_end`, and `entry_point`. The remaining fields will be updated in the
24  * binary by `opentitantool` (overriding the implicitly specified initial value
25  * of zero).
26  */
27 OT_USED OT_SECTION(".manifest") static manifest_t kManifest_ = {
30  .minor = kManifestVersionMinor1,
31  .major = kManifestVersionMajor1,
32  },
33  .code_start = (uint32_t)_manifest_code_start,
34  .code_end = (uint32_t)_manifest_code_end,
35  .entry_point = (uint32_t)_manifest_entry_point,
36  .address_translation = (uint32_t)_manifest_address_translation,
37 };
38 
39 const manifest_t *manifest_def_get(void) { return &kManifest_; }