1d29b2c44Sab196087#
2d29b2c44Sab196087# CDDL HEADER START
3d29b2c44Sab196087#
4d29b2c44Sab196087# The contents of this file are subject to the terms of the
5d29b2c44Sab196087# Common Development and Distribution License (the "License").
6d29b2c44Sab196087# You may not use this file except in compliance with the License.
7d29b2c44Sab196087#
8d29b2c44Sab196087# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9d29b2c44Sab196087# or http://www.opensolaris.org/os/licensing.
10d29b2c44Sab196087# See the License for the specific language governing permissions
11d29b2c44Sab196087# and limitations under the License.
12d29b2c44Sab196087#
13d29b2c44Sab196087# When distributing Covered Code, include this CDDL HEADER in each
14d29b2c44Sab196087# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15d29b2c44Sab196087# If applicable, add the following below this CDDL HEADER, with the
16d29b2c44Sab196087# fields enclosed by brackets "[]" replaced with your own identifying
17d29b2c44Sab196087# information: Portions Copyright [yyyy] [name of copyright owner]
18d29b2c44Sab196087#
19d29b2c44Sab196087# CDDL HEADER END
20d29b2c44Sab196087#
21d29b2c44Sab196087
22d29b2c44Sab196087#
2308278a5eSRod Evans# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24d29b2c44Sab196087# Use is subject to license terms.
25d29b2c44Sab196087#
26*56726c7eSRobert Mustacchi# Copyright 2022 Oxide Computer Company
27*56726c7eSRobert Mustacchi#
28d29b2c44Sab196087
29d29b2c44Sab196087@ _START_
30d29b2c44Sab196087
31d29b2c44Sab196087# Message file for elfedit 'cap' module
32d29b2c44Sab196087
33d29b2c44Sab196087@ MSG_ID_ELFEDIT_CAP
34d29b2c44Sab196087
35d29b2c44Sab196087
36d29b2c44Sab196087# Debug messages
37d29b2c44Sab196087
38d29b2c44Sab196087@ MSG_DEBUG_S_OK	"[%d: %s][%d]: value unchanged: %s\n"
39d29b2c44Sab196087@ MSG_DEBUG_S_CHG	"[%d: %s][%d]: change from %s to %s\n"
40d29b2c44Sab196087@ MSG_DEBUG_BSB_OK	"[%d: %s][%d]: value unchanged: [%s]\n"
41d29b2c44Sab196087@ MSG_DEBUG_BSB_CHG	"[%d: %s][%d]: change from [%s] to [%s]\n"
42d29b2c44Sab196087@ MSG_DEBUG_X_OK	"[%d: %s][%d]: value unchanged: %#llx\n"
43d29b2c44Sab196087@ MSG_DEBUG_X_CHG	"[%d: %s][%d]: change from %#llx to %#llx\n"
4408278a5eSRod Evans@ MSG_DEBUG_CA2NDX	"[%d: %s][%d]: capability entry for tag: %s\n"
4508278a5eSRod Evans@ MSG_DEBUG_CAPGRP	"[%d: %s][%u-%u: %s]: capability group\n"
4608278a5eSRod Evans@ MSG_DEBUG_CONVNULL	"[%d: %s][%d]: no existing %s to modify, converting \
4708278a5eSRod Evans			 extra CA_SUNW_NULL\n"
48d29b2c44Sab196087
49d29b2c44Sab196087# Errors
50d29b2c44Sab196087
5108278a5eSRod Evans@ MSG_ERR_NOCAELT	"[%d: %s][%u-%u: %s]: capabilities group does not \
5208278a5eSRod Evans			 contain tag: %s\n"
5308278a5eSRod Evans@ MSG_ERR_NOSTRTAB	"[%d: %s]: capabilities section does not have an \
5408278a5eSRod Evans			 associated string table\n"
5508278a5eSRod Evans@ MSG_ERR_BADCAPID	"[%d: %s]: capabilities section does not contain \
5608278a5eSRod Evans			 specified id: %s\n"
5708278a5eSRod Evans@ MSG_ERR_GRPARRBNDS	"%s[%u-%u: %s]: attempt to access elements outside \
5808278a5eSRod Evans			 of capabilities group\n"
59d29b2c44Sab196087
60d29b2c44Sab196087# Module description
61d29b2c44Sab196087
62d29b2c44Sab196087@ MSG_MOD_DESC		"Capabilities Section"
63d29b2c44Sab196087
6408278a5eSRod Evans# Strings
6508278a5eSRod Evans@ MSG_STR_OBJECT	"<object>"
6608278a5eSRod Evans@ MSG_STR_NONAME	"<noname>"
67d29b2c44Sab196087
6808278a5eSRod Evans# Format strings
6908278a5eSRod Evans@ MSG_FMT_CAPGRP	"   Group[%u-%u]: %s\n"
70d29b2c44Sab196087
71d29b2c44Sab196087# 1-line description strings
72d29b2c44Sab196087
73d29b2c44Sab196087@ MSG_DESC_DUMP		"Dump Capabilities Section"
74d29b2c44Sab196087@ MSG_DESC_TAG		"Change element tag"
75d29b2c44Sab196087@ MSG_DESC_VALUE	"Change element value"
76d29b2c44Sab196087@ MSG_DESC_DELETE	"Delete elements"
77d29b2c44Sab196087@ MSG_DESC_MOVE		"Move elements"
7808278a5eSRod Evans@ MSG_DESC_HW1		"Hardware capabilities (CA_SUNW_HW_1) bit values"
7908278a5eSRod Evans@ MSG_DESC_SF1		"Software capabilities (CA_SUNW_SF_1) bit values"
8008278a5eSRod Evans@ MSG_DESC_HW2		"Hardware capabilities (CA_SUNW_HW_2) bit values"
81*56726c7eSRobert Mustacchi@ MSG_DESC_HW3		"Hardware capabilities (CA_SUNW_HW_3) bit values"
82d29b2c44Sab196087
83d29b2c44Sab196087
8408278a5eSRod Evans# Command option description strings
85d29b2c44Sab196087
86d29b2c44Sab196087@ MSG_OPTDESC_CAPNDX		"\
87d29b2c44Sab196087   Interpret the elt argument as a direct index into the\n\
88d29b2c44Sab196087   capabilities section, rather than as a CA_ tag value.\n"
89d29b2c44Sab196087
9008278a5eSRod Evans@ MSG_OPTDESC_CAPID		"\
9108278a5eSRod Evans   Restrict the elt argument to the capability elements belonging\n\
9208278a5eSRod Evans   to the capabilities group with a CA_SUNW_ID entry matching the\n\
9308278a5eSRod Evans   specified id name.\n"
9408278a5eSRod Evans
9508278a5eSRod Evans@ MSG_OPTDESC_S		"\
9608278a5eSRod Evans   Interpret the value argument as a string rather than an\n\
9708278a5eSRod Evans   integer. If the specified string already exists in the\n\
9808278a5eSRod Evans   string table, the offset of that string is stored in the\n\
9908278a5eSRod Evans   capability entry. If the string does not exist in the string\n\
10008278a5eSRod Evans   table, but there is room to add it, the new string is added\n\
10108278a5eSRod Evans   and then the offset is placed in the capability entry.\n"
10208278a5eSRod Evans
103d29b2c44Sab196087
104d29b2c44Sab196087# Command argument description strings
105d29b2c44Sab196087
106d29b2c44Sab196087@ MSG_A1_TAG_ELT	"\
107d29b2c44Sab196087   Capabilities element to be examined or changed. By default,\n\
108d29b2c44Sab196087   this is a CA_ tag value. The index of the first element\n\
109d29b2c44Sab196087   in the capabilities section that has the specified tag value\n\
110d29b2c44Sab196087   will be used. The value specified can be one of the well known\n\
111d29b2c44Sab196087   CA_ constants, or any integer.\n\
112d29b2c44Sab196087   \n\
113d29b2c44Sab196087   If the -capndx option is specified, elt is instead interpreted\n\
114d29b2c44Sab196087   as a simple integer index into the capabilities section.\n"
115d29b2c44Sab196087
116d29b2c44Sab196087@ MSG_A2_TAG_VALUE	"\
117d29b2c44Sab196087   Value to be set for c_tag field of specified capabilities\n\
118d29b2c44Sab196087   element. Tag values can be specified using the well known\n\
119d29b2c44Sab196087   CA_ symbolic constants from /usr/include/sys/elf.h, or\n\
120d29b2c44Sab196087   as integers.\n"
121d29b2c44Sab196087
122d29b2c44Sab196087@ MSG_ARGDESC_ELT	"\
123d29b2c44Sab196087   Element within capabilities section. By default, this is a\n\
124d29b2c44Sab196087   tag value. In this case, the index of the first capabilities\n\
125d29b2c44Sab196087   element with the specified tag value will be used. Tag values\n\
126d29b2c44Sab196087   can be specified using the well known CA_ symbolic constants\n\
127d29b2c44Sab196087   from /usr/include/sys/elf.h, or as integers. If the -capndx\n\
128d29b2c44Sab196087   option is specified, then elt is instead interpreted as a\n\
12908278a5eSRod Evans   direct numeric index into the capabilities section. If the\n\
13008278a5eSRod Evans   -capid option is specified, the search is limited to elements\n\
13108278a5eSRod Evans   within the named capabilities group.\n"
132d29b2c44Sab196087
133d29b2c44Sab196087@ MSG_A2_VALUE_VALUE	"\
134d29b2c44Sab196087   Value to set for specified capabilities section element.\n\
135d29b2c44Sab196087   This is a numeric value which is used directly.\n"
136d29b2c44Sab196087
137d29b2c44Sab196087@ MSG_A2_DELETE_COUNT	"\
138d29b2c44Sab196087   Number of capabilities elements to delete, starting at the\n\
139d29b2c44Sab196087   specified position. This value cannot exceed the number\n\
14008278a5eSRod Evans   of slots remaining in the capabilities group below the specified\n\
14108278a5eSRod Evans   position. If count is not supplied, a single element is deleted.\n"
142d29b2c44Sab196087
143d29b2c44Sab196087@ MSG_A2_MOVE_DST_INDEX	"\
144d29b2c44Sab196087   Numeric index within capabilities section to which the element(s)\n\
14508278a5eSRod Evans   should be moved. The destination index must lie within the same\n\
14608278a5eSRod Evans   capabilities group as elt.\n"
147d29b2c44Sab196087
148d29b2c44Sab196087@ MSG_A3_MOVE_COUNT	"\
149d29b2c44Sab196087   Number of capabilities elements to move. This value cannot\n\
15008278a5eSRod Evans   exceed the number of slots remaining in the capabilities group\n\
15108278a5eSRod Evans   below the specified position. If count is not supplied, a\n\
152d29b2c44Sab196087   single element is moved.\n"
153d29b2c44Sab196087
154d29b2c44Sab196087@ MSG_A1_HW1_VALUE	"\
15508278a5eSRod Evans   Hardware capability (CA_SUNW_HW_1) values. This can be an integer\n\
15608278a5eSRod Evans   value, any of the AV_386_ symbolic constants defined in\n\
157d29b2c44Sab196087   /usr/include/sys/auxv_386.h, or the AV_SPARC symbolic\n\
15808278a5eSRod Evans   constants defined in /usr/include/sys/auxv_SPARC.h.\n"
159d29b2c44Sab196087
160d29b2c44Sab196087@ MSG_A1_SF1_VALUE	"\
16108278a5eSRod Evans   Software capability (CA_SUNW_SF_1) values. This can be an integer\n\
16208278a5eSRod Evans   value, any of the SF1_SUNW_ symbolic constants defined in\n\
16308278a5eSRod Evans   /usr/include/sys/elf.h.\n"
164d29b2c44Sab196087
16508278a5eSRod Evans@ MSG_A1_HW2_VALUE	"\
166*56726c7eSRobert Mustacchi   Hardware capability (CA_SUNW_HW_2) values. This can be an integer\n\
167*56726c7eSRobert Mustacchi   value, any of the AV_386_2_ symbolic constants defined in\n\
168*56726c7eSRobert Mustacchi   /usr/include/sys/auxv_386.h.\n"
169d29b2c44Sab196087
170*56726c7eSRobert Mustacchi@ MSG_A1_HW3_VALUE	"\
171*56726c7eSRobert Mustacchi   Hardware capability (CA_SUNW_HW_3) values. This can be an integer\n\
172*56726c7eSRobert Mustacchi   value, any of the AV_386_3_ symbolic constants defined in\n\
173*56726c7eSRobert Mustacchi   /usr/include/sys/auxv_386.h.\n"
174d29b2c44Sab196087
175d29b2c44Sab196087# Help strings
176d29b2c44Sab196087
177d29b2c44Sab196087@ MSG_HELP_DUMP	"   \
178d29b2c44Sab196087   The cap:dump command is used to display the contents of the\n\
179d29b2c44Sab196087   capabilities section using the same style used by the elfdump\n\
180d29b2c44Sab196087   program.\n"
181d29b2c44Sab196087
182d29b2c44Sab196087@ MSG_HELP_TAG	"   \
183d29b2c44Sab196087   The cap:tag command is used to display or alter the\n\
184d29b2c44Sab196087   type of an element in the capabilities section. This information\n\
185d29b2c44Sab196087   is found in the c_tag field of a capabilities element.\n\
186d29b2c44Sab196087   \n\
187d29b2c44Sab196087   If cap:tag is called without arguments, the value of c_tag\n\
188d29b2c44Sab196087   for every element in the capabilities section is shown. If called\n\
189d29b2c44Sab196087   with the elt argument, the specified elements are displayed.\n\
190d29b2c44Sab196087   If both arguments are present, the c_tag field of the specified\n\
191d29b2c44Sab196087   capabilities element is set to the given value.\n"
192d29b2c44Sab196087
193d29b2c44Sab196087@ MSG_HELP_VALUE	"   \
194d29b2c44Sab196087   The cap:value command is used to display or alter the\n\
195d29b2c44Sab196087   value of an element in the capabilities section. The value\n\
196d29b2c44Sab196087   of a capabilities element is found in the c_un union of the\n\
197d29b2c44Sab196087   element.\n\
198d29b2c44Sab196087   \n\
199d29b2c44Sab196087   If cap:value is called without arguments, the value of every\n\
200d29b2c44Sab196087   element in the capabilities section is shown. If called with the\n\
201d29b2c44Sab196087   elt argument, the value of the specified elements are displayed.\n\
202d29b2c44Sab196087   If both arguments are present, the value of the specified\n\
203d29b2c44Sab196087   capabilities element is set to the given value.\n"
204d29b2c44Sab196087
205d29b2c44Sab196087@ MSG_HELP_DELETE	"   \
206d29b2c44Sab196087   The cap:delete command is used to delete one or more elements\n\
20708278a5eSRod Evans   from a capabilities group within the capabilities section. The\n\
20808278a5eSRod Evans   elements following the deleted items move up, and new CA_NULL\n\
20908278a5eSRod Evans   elements are inserted at the end of the capabilities group to\n\
21008278a5eSRod Evans   fill the vacated space.\n"
211d29b2c44Sab196087
212d29b2c44Sab196087@ MSG_HELP_MOVE	"   \
213d29b2c44Sab196087   The cap:move command is used to move the position of one\n\
21408278a5eSRod Evans   or more elements in a capabilities group within in the\n\
21508278a5eSRod Evans   capabilities section. The specified number of elements are\n\
21608278a5eSRod Evans   moved from elt to dst_index.\n"
217d29b2c44Sab196087
218d29b2c44Sab196087@ MSG_HELP_HW1	"   \
219d29b2c44Sab196087   The cap:hw1 command is used to display or alter the\n\
220d29b2c44Sab196087   value of the hardware capabilities element (CA_SUNW_HW_1).\n\
221d29b2c44Sab196087   \n\
222d29b2c44Sab196087   If cap:hw1 is called without arguments, the current\n\
223d29b2c44Sab196087   value is shown. If one or more value arguments are present,\n\
224d29b2c44Sab196087   the following steps are taken:\n\
225d29b2c44Sab196087   \n   \
226d29b2c44Sab196087   o\tAll the value arguments are OR'd together.\n\
227d29b2c44Sab196087   \n   \
228d29b2c44Sab196087   o\tIf the -cmp option has been specified, the new value\n\
229d29b2c44Sab196087   \tis complemented.\n\
230d29b2c44Sab196087   \n   \
231d29b2c44Sab196087   o\tThe CA_SUNW_HW_1 element of the capabilities section is\n\
232d29b2c44Sab196087   \tupdated with the new value. If -and is specified, the new\n\
233d29b2c44Sab196087   \tvalue is AND'd against the existing value. If -or is\n\
234d29b2c44Sab196087   \tspecified, the new value is OR'd against the existing\n\
235d29b2c44Sab196087   \tvalue. If neither -and or -or are specified, the new value\n\
236d29b2c44Sab196087   \treplaces the existing value.\n"
237d29b2c44Sab196087
238d29b2c44Sab196087@ MSG_HELP_SF1	"   \
239d29b2c44Sab196087   The cap:sf1 command is used to display or alter the\n\
240d29b2c44Sab196087   value of the software capabilities element (CA_SUNW_SF_1).\n\
241d29b2c44Sab196087   \n\
242d29b2c44Sab196087   If cap:sf1 is called without arguments, the current\n\
243d29b2c44Sab196087   value is shown. If one or more value arguments are present,\n\
244d29b2c44Sab196087   the following steps are taken:\n\
245d29b2c44Sab196087   \n   \
246d29b2c44Sab196087   o\tAll the value arguments are OR'd together.\n\
247d29b2c44Sab196087   \n   \
248d29b2c44Sab196087   o\tIf the -cmp option has been specified, the new value\n\
249d29b2c44Sab196087   \tis complemented.\n\
250d29b2c44Sab196087   \n   \
251d29b2c44Sab196087   o\tThe CA_SUNW_SF_1 element of the capabilities section is\n\
252d29b2c44Sab196087   \tupdated with the new value. If -and is specified, the new\n\
253d29b2c44Sab196087   \tvalue is AND'd against the existing value. If -or is\n\
254d29b2c44Sab196087   \tspecified, the new value is OR'd against the existing\n\
255d29b2c44Sab196087   \tvalue. If neither -and or -or are specified, the new value\n\
256d29b2c44Sab196087   replaces the existing value.\n"
257d29b2c44Sab196087
25808278a5eSRod Evans@ MSG_HELP_HW2	"   \
25908278a5eSRod Evans   The cap:hw2 command is used to display or alter the\n\
26008278a5eSRod Evans   value of the hardware capabilities element (CA_SUNW_HW_2).\n\
26108278a5eSRod Evans   \n\
26208278a5eSRod Evans   If cap:hw2 is called without arguments, the current\n\
26308278a5eSRod Evans   value is shown. If one or more value arguments are present,\n\
26408278a5eSRod Evans   the following steps are taken:\n\
26508278a5eSRod Evans   \n   \
26608278a5eSRod Evans   o\tAll the value arguments are OR'd together.\n\
26708278a5eSRod Evans   \n   \
26808278a5eSRod Evans   o\tIf the -cmp option has been specified, the new value\n\
26908278a5eSRod Evans   \tis complemented.\n\
27008278a5eSRod Evans   \n   \
27108278a5eSRod Evans   o\tThe CA_SUNW_HW_2 element of the capabilities section is\n\
27208278a5eSRod Evans   \tupdated with the new value. If -and is specified, the new\n\
27308278a5eSRod Evans   \tvalue is AND'd against the existing value. If -or is\n\
27408278a5eSRod Evans   \tspecified, the new value is OR'd against the existing\n\
27508278a5eSRod Evans   \tvalue. If neither -and or -or are specified, the new value\n\
27608278a5eSRod Evans   \treplaces the existing value.\n"
277*56726c7eSRobert Mustacchi
278*56726c7eSRobert Mustacchi@ MSG_HELP_HW3	"   \
279*56726c7eSRobert Mustacchi   The cap:hw3 command is used to display or alter the\n\
280*56726c7eSRobert Mustacchi   value of the hardware capabilities element (CA_SUNW_HW_3).\n\
281*56726c7eSRobert Mustacchi   \n\
282*56726c7eSRobert Mustacchi   If cap:hw3 is called without arguments, the current\n\
283*56726c7eSRobert Mustacchi   value is shown. If one or more value arguments are present,\n\
284*56726c7eSRobert Mustacchi   the following steps are taken:\n\
285*56726c7eSRobert Mustacchi   \n   \
286*56726c7eSRobert Mustacchi   o\tAll the value arguments are OR'd together.\n\
287*56726c7eSRobert Mustacchi   \n   \
288*56726c7eSRobert Mustacchi   o\tIf the -cmp option has been specified, the new value\n\
289*56726c7eSRobert Mustacchi   \tis complemented.\n\
290*56726c7eSRobert Mustacchi   \n   \
291*56726c7eSRobert Mustacchi   o\tThe CA_SUNW_HW_3 element of the capabilities section is\n\
292*56726c7eSRobert Mustacchi   \tupdated with the new value. If -and is specified, the new\n\
293*56726c7eSRobert Mustacchi   \tvalue is AND'd against the existing value. If -or is\n\
294*56726c7eSRobert Mustacchi   \tspecified, the new value is OR'd against the existing\n\
295*56726c7eSRobert Mustacchi   \tvalue. If neither -and or -or are specified, the new value\n\
296*56726c7eSRobert Mustacchi   \treplaces the existing value.\n"
297d29b2c44Sab196087@ _END_
298d29b2c44Sab196087
299d29b2c44Sab196087
300d29b2c44Sab196087# The following strings represent reserved words, files, pathnames and symbols.
301d29b2c44Sab196087# Reference to this strings is via the MSG_ORIG() macro, and thus no message
302d29b2c44Sab196087# translation is required.
303d29b2c44Sab196087
304d29b2c44Sab196087
305d29b2c44Sab196087# Strings
306d29b2c44Sab196087@ MSG_STR_EMPTY		""
307d29b2c44Sab196087@ MSG_STR_COUNT		"count"
308d29b2c44Sab196087@ MSG_STR_ELT		"elt"
309d29b2c44Sab196087@ MSG_STR_DST_INDEX	"dst_index"
31008278a5eSRod Evans@ MSG_STR_MINUS_CAPID	"-capid"
311d29b2c44Sab196087@ MSG_STR_MINUS_CAPNDX	"-capndx"
31208278a5eSRod Evans@ MSG_STR_MINUS_S	"-s"
313d29b2c44Sab196087@ MSG_STR_VALUE		"value"
31408278a5eSRod Evans@ MSG_STR_IDNAME	"id_name"
315d29b2c44Sab196087
316d29b2c44Sab196087# Format strings
317d29b2c44Sab196087@ MSG_FMT_STRNL		"%s\n"
318d29b2c44Sab196087@ MSG_FMT_HEXXWORDNL	"%#llx\n"
31908278a5eSRod Evans@ MSG_FMT_WORDVALNL	"%u\n"
320d29b2c44Sab196087
321d29b2c44Sab196087
322d29b2c44Sab196087# Module name
323d29b2c44Sab196087
324d29b2c44Sab196087@ MSG_MOD_NAME		"cap"
325d29b2c44Sab196087
326d29b2c44Sab196087
327d29b2c44Sab196087# Command names
328d29b2c44Sab196087
329d29b2c44Sab196087@ MSG_CMD_DUMP		"dump"
330d29b2c44Sab196087@ MSG_CMD_TAG		"tag"
331d29b2c44Sab196087@ MSG_CMD_VALUE		"value"
332d29b2c44Sab196087@ MSG_CMD_DELETE	"delete"
333d29b2c44Sab196087@ MSG_CMD_MOVE		"move"
334d29b2c44Sab196087@ MSG_CMD_HW1		"hw1"
335d29b2c44Sab196087@ MSG_CMD_SF1		"sf1"
33608278a5eSRod Evans@ MSG_CMD_HW2		"hw2"
337*56726c7eSRobert Mustacchi@ MSG_CMD_HW3		"hw3"
338