1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# Copyright 2022 Oxide Computer Company
27#
28
29@ _START_
30
31# Message file for elfedit 'cap' module
32
33@ MSG_ID_ELFEDIT_CAP
34
35
36# Debug messages
37
38@ MSG_DEBUG_S_OK	"[%d: %s][%d]: value unchanged: %s\n"
39@ MSG_DEBUG_S_CHG	"[%d: %s][%d]: change from %s to %s\n"
40@ MSG_DEBUG_BSB_OK	"[%d: %s][%d]: value unchanged: [%s]\n"
41@ MSG_DEBUG_BSB_CHG	"[%d: %s][%d]: change from [%s] to [%s]\n"
42@ MSG_DEBUG_X_OK	"[%d: %s][%d]: value unchanged: %#llx\n"
43@ MSG_DEBUG_X_CHG	"[%d: %s][%d]: change from %#llx to %#llx\n"
44@ MSG_DEBUG_CA2NDX	"[%d: %s][%d]: capability entry for tag: %s\n"
45@ MSG_DEBUG_CAPGRP	"[%d: %s][%u-%u: %s]: capability group\n"
46@ MSG_DEBUG_CONVNULL	"[%d: %s][%d]: no existing %s to modify, converting \
47			 extra CA_SUNW_NULL\n"
48
49# Errors
50
51@ MSG_ERR_NOCAELT	"[%d: %s][%u-%u: %s]: capabilities group does not \
52			 contain tag: %s\n"
53@ MSG_ERR_NOSTRTAB	"[%d: %s]: capabilities section does not have an \
54			 associated string table\n"
55@ MSG_ERR_BADCAPID	"[%d: %s]: capabilities section does not contain \
56			 specified id: %s\n"
57@ MSG_ERR_GRPARRBNDS	"%s[%u-%u: %s]: attempt to access elements outside \
58			 of capabilities group\n"
59
60# Module description
61
62@ MSG_MOD_DESC		"Capabilities Section"
63
64# Strings
65@ MSG_STR_OBJECT	"<object>"
66@ MSG_STR_NONAME	"<noname>"
67
68# Format strings
69@ MSG_FMT_CAPGRP	"   Group[%u-%u]: %s\n"
70
71# 1-line description strings
72
73@ MSG_DESC_DUMP		"Dump Capabilities Section"
74@ MSG_DESC_TAG		"Change element tag"
75@ MSG_DESC_VALUE	"Change element value"
76@ MSG_DESC_DELETE	"Delete elements"
77@ MSG_DESC_MOVE		"Move elements"
78@ MSG_DESC_HW1		"Hardware capabilities (CA_SUNW_HW_1) bit values"
79@ MSG_DESC_SF1		"Software capabilities (CA_SUNW_SF_1) bit values"
80@ MSG_DESC_HW2		"Hardware capabilities (CA_SUNW_HW_2) bit values"
81@ MSG_DESC_HW3		"Hardware capabilities (CA_SUNW_HW_3) bit values"
82
83
84# Command option description strings
85
86@ MSG_OPTDESC_CAPNDX		"\
87   Interpret the elt argument as a direct index into the\n\
88   capabilities section, rather than as a CA_ tag value.\n"
89
90@ MSG_OPTDESC_CAPID		"\
91   Restrict the elt argument to the capability elements belonging\n\
92   to the capabilities group with a CA_SUNW_ID entry matching the\n\
93   specified id name.\n"
94
95@ MSG_OPTDESC_S		"\
96   Interpret the value argument as a string rather than an\n\
97   integer. If the specified string already exists in the\n\
98   string table, the offset of that string is stored in the\n\
99   capability entry. If the string does not exist in the string\n\
100   table, but there is room to add it, the new string is added\n\
101   and then the offset is placed in the capability entry.\n"
102
103
104# Command argument description strings
105
106@ MSG_A1_TAG_ELT	"\
107   Capabilities element to be examined or changed. By default,\n\
108   this is a CA_ tag value. The index of the first element\n\
109   in the capabilities section that has the specified tag value\n\
110   will be used. The value specified can be one of the well known\n\
111   CA_ constants, or any integer.\n\
112   \n\
113   If the -capndx option is specified, elt is instead interpreted\n\
114   as a simple integer index into the capabilities section.\n"
115
116@ MSG_A2_TAG_VALUE	"\
117   Value to be set for c_tag field of specified capabilities\n\
118   element. Tag values can be specified using the well known\n\
119   CA_ symbolic constants from /usr/include/sys/elf.h, or\n\
120   as integers.\n"
121
122@ MSG_ARGDESC_ELT	"\
123   Element within capabilities section. By default, this is a\n\
124   tag value. In this case, the index of the first capabilities\n\
125   element with the specified tag value will be used. Tag values\n\
126   can be specified using the well known CA_ symbolic constants\n\
127   from /usr/include/sys/elf.h, or as integers. If the -capndx\n\
128   option is specified, then elt is instead interpreted as a\n\
129   direct numeric index into the capabilities section. If the\n\
130   -capid option is specified, the search is limited to elements\n\
131   within the named capabilities group.\n"
132
133@ MSG_A2_VALUE_VALUE	"\
134   Value to set for specified capabilities section element.\n\
135   This is a numeric value which is used directly.\n"
136
137@ MSG_A2_DELETE_COUNT	"\
138   Number of capabilities elements to delete, starting at the\n\
139   specified position. This value cannot exceed the number\n\
140   of slots remaining in the capabilities group below the specified\n\
141   position. If count is not supplied, a single element is deleted.\n"
142
143@ MSG_A2_MOVE_DST_INDEX	"\
144   Numeric index within capabilities section to which the element(s)\n\
145   should be moved. The destination index must lie within the same\n\
146   capabilities group as elt.\n"
147
148@ MSG_A3_MOVE_COUNT	"\
149   Number of capabilities elements to move. This value cannot\n\
150   exceed the number of slots remaining in the capabilities group\n\
151   below the specified position. If count is not supplied, a\n\
152   single element is moved.\n"
153
154@ MSG_A1_HW1_VALUE	"\
155   Hardware capability (CA_SUNW_HW_1) values. This can be an integer\n\
156   value, any of the AV_386_ symbolic constants defined in\n\
157   /usr/include/sys/auxv_386.h, or the AV_SPARC symbolic\n\
158   constants defined in /usr/include/sys/auxv_SPARC.h.\n"
159
160@ MSG_A1_SF1_VALUE	"\
161   Software capability (CA_SUNW_SF_1) values. This can be an integer\n\
162   value, any of the SF1_SUNW_ symbolic constants defined in\n\
163   /usr/include/sys/elf.h.\n"
164
165@ MSG_A1_HW2_VALUE	"\
166   Hardware capability (CA_SUNW_HW_2) values. This can be an integer\n\
167   value, any of the AV_386_2_ symbolic constants defined in\n\
168   /usr/include/sys/auxv_386.h.\n"
169
170@ MSG_A1_HW3_VALUE	"\
171   Hardware capability (CA_SUNW_HW_3) values. This can be an integer\n\
172   value, any of the AV_386_3_ symbolic constants defined in\n\
173   /usr/include/sys/auxv_386.h.\n"
174
175# Help strings
176
177@ MSG_HELP_DUMP	"   \
178   The cap:dump command is used to display the contents of the\n\
179   capabilities section using the same style used by the elfdump\n\
180   program.\n"
181
182@ MSG_HELP_TAG	"   \
183   The cap:tag command is used to display or alter the\n\
184   type of an element in the capabilities section. This information\n\
185   is found in the c_tag field of a capabilities element.\n\
186   \n\
187   If cap:tag is called without arguments, the value of c_tag\n\
188   for every element in the capabilities section is shown. If called\n\
189   with the elt argument, the specified elements are displayed.\n\
190   If both arguments are present, the c_tag field of the specified\n\
191   capabilities element is set to the given value.\n"
192
193@ MSG_HELP_VALUE	"   \
194   The cap:value command is used to display or alter the\n\
195   value of an element in the capabilities section. The value\n\
196   of a capabilities element is found in the c_un union of the\n\
197   element.\n\
198   \n\
199   If cap:value is called without arguments, the value of every\n\
200   element in the capabilities section is shown. If called with the\n\
201   elt argument, the value of the specified elements are displayed.\n\
202   If both arguments are present, the value of the specified\n\
203   capabilities element is set to the given value.\n"
204
205@ MSG_HELP_DELETE	"   \
206   The cap:delete command is used to delete one or more elements\n\
207   from a capabilities group within the capabilities section. The\n\
208   elements following the deleted items move up, and new CA_NULL\n\
209   elements are inserted at the end of the capabilities group to\n\
210   fill the vacated space.\n"
211
212@ MSG_HELP_MOVE	"   \
213   The cap:move command is used to move the position of one\n\
214   or more elements in a capabilities group within in the\n\
215   capabilities section. The specified number of elements are\n\
216   moved from elt to dst_index.\n"
217
218@ MSG_HELP_HW1	"   \
219   The cap:hw1 command is used to display or alter the\n\
220   value of the hardware capabilities element (CA_SUNW_HW_1).\n\
221   \n\
222   If cap:hw1 is called without arguments, the current\n\
223   value is shown. If one or more value arguments are present,\n\
224   the following steps are taken:\n\
225   \n   \
226   o\tAll the value arguments are OR'd together.\n\
227   \n   \
228   o\tIf the -cmp option has been specified, the new value\n\
229   \tis complemented.\n\
230   \n   \
231   o\tThe CA_SUNW_HW_1 element of the capabilities section is\n\
232   \tupdated with the new value. If -and is specified, the new\n\
233   \tvalue is AND'd against the existing value. If -or is\n\
234   \tspecified, the new value is OR'd against the existing\n\
235   \tvalue. If neither -and or -or are specified, the new value\n\
236   \treplaces the existing value.\n"
237
238@ MSG_HELP_SF1	"   \
239   The cap:sf1 command is used to display or alter the\n\
240   value of the software capabilities element (CA_SUNW_SF_1).\n\
241   \n\
242   If cap:sf1 is called without arguments, the current\n\
243   value is shown. If one or more value arguments are present,\n\
244   the following steps are taken:\n\
245   \n   \
246   o\tAll the value arguments are OR'd together.\n\
247   \n   \
248   o\tIf the -cmp option has been specified, the new value\n\
249   \tis complemented.\n\
250   \n   \
251   o\tThe CA_SUNW_SF_1 element of the capabilities section is\n\
252   \tupdated with the new value. If -and is specified, the new\n\
253   \tvalue is AND'd against the existing value. If -or is\n\
254   \tspecified, the new value is OR'd against the existing\n\
255   \tvalue. If neither -and or -or are specified, the new value\n\
256   replaces the existing value.\n"
257
258@ MSG_HELP_HW2	"   \
259   The cap:hw2 command is used to display or alter the\n\
260   value of the hardware capabilities element (CA_SUNW_HW_2).\n\
261   \n\
262   If cap:hw2 is called without arguments, the current\n\
263   value is shown. If one or more value arguments are present,\n\
264   the following steps are taken:\n\
265   \n   \
266   o\tAll the value arguments are OR'd together.\n\
267   \n   \
268   o\tIf the -cmp option has been specified, the new value\n\
269   \tis complemented.\n\
270   \n   \
271   o\tThe CA_SUNW_HW_2 element of the capabilities section is\n\
272   \tupdated with the new value. If -and is specified, the new\n\
273   \tvalue is AND'd against the existing value. If -or is\n\
274   \tspecified, the new value is OR'd against the existing\n\
275   \tvalue. If neither -and or -or are specified, the new value\n\
276   \treplaces the existing value.\n"
277
278@ MSG_HELP_HW3	"   \
279   The cap:hw3 command is used to display or alter the\n\
280   value of the hardware capabilities element (CA_SUNW_HW_3).\n\
281   \n\
282   If cap:hw3 is called without arguments, the current\n\
283   value is shown. If one or more value arguments are present,\n\
284   the following steps are taken:\n\
285   \n   \
286   o\tAll the value arguments are OR'd together.\n\
287   \n   \
288   o\tIf the -cmp option has been specified, the new value\n\
289   \tis complemented.\n\
290   \n   \
291   o\tThe CA_SUNW_HW_3 element of the capabilities section is\n\
292   \tupdated with the new value. If -and is specified, the new\n\
293   \tvalue is AND'd against the existing value. If -or is\n\
294   \tspecified, the new value is OR'd against the existing\n\
295   \tvalue. If neither -and or -or are specified, the new value\n\
296   \treplaces the existing value.\n"
297@ _END_
298
299
300# The following strings represent reserved words, files, pathnames and symbols.
301# Reference to this strings is via the MSG_ORIG() macro, and thus no message
302# translation is required.
303
304
305# Strings
306@ MSG_STR_EMPTY		""
307@ MSG_STR_COUNT		"count"
308@ MSG_STR_ELT		"elt"
309@ MSG_STR_DST_INDEX	"dst_index"
310@ MSG_STR_MINUS_CAPID	"-capid"
311@ MSG_STR_MINUS_CAPNDX	"-capndx"
312@ MSG_STR_MINUS_S	"-s"
313@ MSG_STR_VALUE		"value"
314@ MSG_STR_IDNAME	"id_name"
315
316# Format strings
317@ MSG_FMT_STRNL		"%s\n"
318@ MSG_FMT_HEXXWORDNL	"%#llx\n"
319@ MSG_FMT_WORDVALNL	"%u\n"
320
321
322# Module name
323
324@ MSG_MOD_NAME		"cap"
325
326
327# Command names
328
329@ MSG_CMD_DUMP		"dump"
330@ MSG_CMD_TAG		"tag"
331@ MSG_CMD_VALUE		"value"
332@ MSG_CMD_DELETE	"delete"
333@ MSG_CMD_MOVE		"move"
334@ MSG_CMD_HW1		"hw1"
335@ MSG_CMD_SF1		"sf1"
336@ MSG_CMD_HW2		"hw2"
337@ MSG_CMD_HW3		"hw3"
338