RTEMS 6.3-rc2
Loading...
Searching...
No Matches
motload-gev-set.h
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/*
4 * Copyright (c) 2026 Chris Johns <chrisj@rtems.org>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28/*
29 * MOTLoad GEV in NVRAM.
30 */
31
32#ifndef _POWERPC_MOTLOAD_GEV_NVRAM_h
33#define _POWERPC_MOTLOAD_GEV_NVRAM_h
34
35#include <stddef.h>
36
37#ifdef __cplusplus
38extern "C" {
39#endif /* __cplusplus */
40
41/*
42 * Set the NVRAM base. Setting the base will result in the GEV
43 * variables being scanned and the environment table being set with
44 * any value settings.
45 *
46 * @param nvram_base Base address if the byte addressable NVRAM
47 */
48void motload_gev_set_nvbase(uintptr_t nvram_base);
49
50/*
51 * Set the RTEMS network unit for environment vairables. You can set
52 * up to 4 interfaces, 0 to 3. This call can be made in BSP start or
53 * BSP early start.
54 *
55 * For example if the GEV variable "mot-/dev/enet1-cipa" is set and
56 * this call is made with the unit set 1 the environment variable
57 * "RTEMS_NET_IF_1_IP_ADDR" will be set to the IP address of the GEV
58 * variable.
59 *
60 * @param unit Network interface unit number, ie `0` for `enet0`
61 */
62void motload_gev_set_net_unit(const size_t unit);
63
64/*
65 * Set the RTEMS network unit label. You can set up to 4 interfaces, 0
66 * to 3. This call can be made in BSP start or BSP early start.
67 *
68 * @param unit Network interface unit number, ie `0` for `enet0`
69 * @param label Network interface unit label, ie `0` for `em0`
70 */
71void motload_gev_set_net_label(const size_t unit, const char* label);
72
73#ifdef __cplusplus
74}
75#endif /* __cplusplus */
76
77#endif