iPXE
thunderxcfg.h
Go to the documentation of this file.
1#ifndef _THUNDERXCFG_H
2#define _THUNDERXCFG_H
3
4/** @file
5 *
6 * Cavium ThunderX Board Configuration
7 *
8 * The definitions in this section are extracted from BSD-licensed
9 * (but non-public) portions of ThunderPkg.
10 *
11 */
12
13FILE_LICENCE ( BSD2 );
14
15#include <ipxe/efi/efi.h>
16
17/******************************************************************************
18 *
19 * From ThunderxBoardConfig.h
20 *
21 ******************************************************************************
22 *
23 * Header file for Cavium ThunderX Board Configurations
24 * Copyright (c) 2015, Cavium Inc.
25 * All rights reserved.
26 *
27 * Redistribution and use in source and binary forms, with or without
28 * modification, are permitted provided that the following conditions
29 * are met:
30 *
31 * 1. Redistributions of source code must retain the above copyright
32 * notice, this list of conditions and the following disclaimer.
33 * 2. Redistributions in binary form must reproduce the above
34 * copyright notice, this list of conditions and the following
35 * disclaimer in the documentation and/or other materials provided
36 * with the distribution.
37 *
38 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
39 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
40 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
41 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
42 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
43 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
44 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
45 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
46 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
47 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
48 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
49 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50 * SUCH DAMAGE.
51 *
52 */
53
54#define MAX_NODES 2
55#define CLUSTER_COUNT 3
56#define CORE_PER_CLUSTER_COUNT 16
57#define CORE_COUNT (CLUSTER_COUNT*CORE_PER_CLUSTER_COUNT)
58#define BGX_PER_NODE_COUNT 2
59#define LMAC_PER_BGX_COUNT 4
60#define PEM_PER_NODE_COUNT 6
61#define LMC_PER_NODE_COUNT 4
62#define DIMM_PER_LMC_COUNT 2
63
64#define THUNDERX_CPU_ID(node, cluster, core) (((node) << 16) | ((cluster) << 8) | (core))
65
66/******************************************************************************
67 *
68 * From ThunderConfigProtocol.h
69 *
70 ******************************************************************************
71 *
72 * Thunder board Configuration Protocol
73 *
74 * Copyright (c) 2015, Cavium Inc. All rights reserved.<BR>
75 *
76 * This program and the accompanying materials are licensed and made
77 * available under the terms and conditions of the BSD License which
78 * accompanies this distribution. The full text of the license may
79 * be found at http://opensource.org/licenses/bsd-license.php
80 *
81 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
82 * BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
83 * EXPRESS OR IMPLIED.
84 *
85 */
86
87#define EFI_THUNDER_CONFIG_PROTOCOL_GUID \
88 {0xc12b1873, 0xac17, 0x4176, {0xac, 0x77, 0x7e, 0xcb, 0x4d, 0xef, 0xff, 0xec}}
89
90///
91/// Forward declaration
92///
94
105
111
112///
113/// Function prototypes
114///
115typedef
119 OUT VOID** cfg
120 );
121
122typedef
126 IN UINTN NodeId,
127 IN UINTN BgxId,
128 IN BGX_PROPERTY BgxProp,
129 IN UINT64 ValueSize,
130 OUT UINT64 *Value
131 );
132
133typedef
137 IN UINTN NodeId,
138 IN UINTN BgxId,
139 IN UINTN LmacId,
140 IN LMAC_PROPERTY LmacProp,
141 IN UINT64 ValueSize,
142 OUT UINT64 *Value
143 );
144
145///
146/// Protocol structure
147///
154
155#endif /* _THUNDERXCFG_H */
UINT64 UINTN
Unsigned value of native width.
unsigned long long UINT64
8-byte unsigned value.
#define EFIAPI
#define VOID
Undeclared type.
Definition Base.h:272
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
EFI API.
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
@ cfg
Definition sis900.h:23
Protocol structure.
EFI_THUNDER_CONFIG_PROTOCOL_GET_CONFIG GetConfig
EFI_THUNDER_CONFIG_PROTOCOL_GET_LMAC_PROP GetLmacProp
EFI_THUNDER_CONFIG_PROTOCOL_GET_BGX_PROP GetBgxProp
struct _EFI_THUNDER_CONFIG_PROTOCOL EFI_THUNDER_CONFIG_PROTOCOL
Forward declaration.
Definition thunderxcfg.h:93
EFI_STATUS(EFIAPI * EFI_THUNDER_CONFIG_PROTOCOL_GET_BGX_PROP)(IN EFI_THUNDER_CONFIG_PROTOCOL *This, IN UINTN NodeId, IN UINTN BgxId, IN BGX_PROPERTY BgxProp, IN UINT64 ValueSize, OUT UINT64 *Value)
EFI_STATUS(EFIAPI * EFI_THUNDER_CONFIG_PROTOCOL_GET_LMAC_PROP)(IN EFI_THUNDER_CONFIG_PROTOCOL *This, IN UINTN NodeId, IN UINTN BgxId, IN UINTN LmacId, IN LMAC_PROPERTY LmacProp, IN UINT64 ValueSize, OUT UINT64 *Value)
BGX_PROPERTY
Definition thunderxcfg.h:95
@ BGX_MODE
Definition thunderxcfg.h:97
@ BASE_ADDRESS
Definition thunderxcfg.h:99
@ LMAC_TYPE_BGX
@ BGX_ENABLED
Definition thunderxcfg.h:96
@ QLM_FREQ
@ QLM_MASK
@ USE_TRAINING
@ LMAC_COUNT
Definition thunderxcfg.h:98
LMAC_PROPERTY
@ MAC_ADDRESS
@ LANE_TO_SDS
@ ENABLED
EFI_STATUS(EFIAPI * EFI_THUNDER_CONFIG_PROTOCOL_GET_CONFIG)(IN EFI_THUNDER_CONFIG_PROTOCOL *This, OUT VOID **cfg)
Function prototypes.