# Conflicts:
#	rust/kernel/task.rs
This commit is contained in:
Mark Brown
2026-07-31 16:03:34 +01:00
156 changed files with 6523 additions and 1031 deletions
@@ -0,0 +1,73 @@
What: /sys/class/issei/
Date: June 2026
KernelVersion: 7.2
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
Description:
The issei/ class sub-directory belongs to issei device class
What: /sys/class/issei/issei<N>/
Date: June 2026
KernelVersion: 7.2
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
Description:
The /sys/class/issei/isseiN directory is created for
each probed issei device
What: /sys/class/issei/issei<N>/fw_ver
Date: June 2026
KernelVersion: 7.2
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
Description: Display the ISSE firmware version.
The version of the ISSE firmware is in format:
<major>.<minor>.<milestone>.<build_no>.
What: /sys/class/issei/issei<N>/fw_clients
Date: June 2026
KernelVersion: 7.2
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
Description:
The fw_clients directory stores all firmware clients on the
probed issei device
What: /sys/class/issei/issei<N>/fw_clients/<M>
Date: June 2026
KernelVersion: 7.2
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
Description:
The /sys/class/issei/isseiN/fw_client/M directory is created for
each firmware client on the probed issei device where M is the
id of firmware client.
What: /sys/class/issei/issei<N>/fw_clients/<M>/id
Date: June 2026
KernelVersion: 7.2
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
Description: Displays id of the firmware client
The id of firmware client is it's number in client enumeration order,
starting from 1.
What: /sys/class/issei/issei<N>/fw_clients/<M>/uuid
Date: June 2026
KernelVersion: 7.2
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
Description: Displays uuid of the firmware client
The universally unique identifier of the firmware client
What: /sys/class/issei/issei<N>/fw_clients/<M>/mtu
Date: June 2026
KernelVersion: 7.2
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
Description: Displays maximum transmission unit of the firmware client
The maximum transmission unit (in bytes) used by the firmware client.
What: /sys/class/issei/issei<N>/fw_clients/<M>/ver
Date: June 2026
KernelVersion: 7.2
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
Description: Displays version of the firmware client
The version of the firmware client
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/nvmem/airoha,smc-efuses.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Airoha SMC eFuses
description: |
Airoha new SoC AN7581 expose banks of eFuse accessible
via specific SMC commands.
2 different bank of eFuse or 64 cells of 32 bit are exposed
read-only used to give information on HW Revision, PHY Calibration,
Device Model, Private Key...
maintainers:
- Christian Marangi <ansuelsmth@gmail.com>
properties:
compatible:
enum:
- airoha,an7581-efuses
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
'^efuse-bank@[0-1]$':
type: object
allOf:
- $ref: nvmem.yaml#
properties:
reg:
description: Identify the eFuse bank.
enum: [0, 1]
required:
- reg
unevaluatedProperties: false
required:
- compatible
- '#address-cells'
- '#size-cells'
additionalProperties: false
examples:
- |
efuse {
compatible = "airoha,an7581-efuses";
#address-cells = <1>;
#size-cells = <0>;
efuse-bank@0 {
reg = <0>;
};
};
...
@@ -25,6 +25,7 @@ properties:
- const: microchip,lan9662-otpc
- enum:
- microchip,lan9662-otpc
- microchip,lan9691-otpc
reg:
maxItems: 1
@@ -19,6 +19,8 @@ properties:
- enum:
- qcom,apq8064-qfprom
- qcom,apq8084-qfprom
- qcom,glymur-qfprom
- qcom,hawi-qfprom
- qcom,ipq5018-qfprom
- qcom,ipq5332-qfprom
- qcom,ipq5424-qfprom
@@ -27,6 +29,7 @@ properties:
- qcom,ipq8074-qfprom
- qcom,ipq9574-qfprom
- qcom,kaanapali-qfprom
- qcom,milos-qfprom
- qcom,msm8226-qfprom
- qcom,msm8916-qfprom
- qcom,msm8917-qfprom
@@ -48,6 +51,7 @@ properties:
- qcom,sdm630-qfprom
- qcom,sdm670-qfprom
- qcom,sdm845-qfprom
- qcom,shikra-qfprom
- qcom,sm6115-qfprom
- qcom,sm6350-qfprom
- qcom,sm6375-qfprom
+1
View File
@@ -105,6 +105,7 @@ Subsystem-specific APIs
interconnect
ipmb
ipmi
issei/index
libata
mailbox
md/index
+16
View File
@@ -0,0 +1,16 @@
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>
=========================================================
The Intel Silicon Security Engine Interface (Intel SSEI)
=========================================================
**Copyright** |copy| 2026 Intel Corporation
.. toctree::
:caption: Table of Contents
:maxdepth: 3
issei
+135
View File
@@ -0,0 +1,135 @@
.. SPDX-License-Identifier: GPL-2.0
Introduction
============
The Intel Silicon Security Engine (Intel SSE) is an isolated and
protected computing resource (Co-processor) residing inside
Intel client chipsets released in 2024 (Lunar Lake) or later.
The Intel SSE provide security support and platform boot orchestration.
The actual feature set depends on the Intel chipset SKU.
The Intel Silicon Security Engine Interface (Intel SSEI)
is the interface between the Host and Intel SSE.
This interface is exposed to the host as one or more PCI devices.
The Intel SSEI Driver is in charge of the communication channel between
a host application and the Intel SSE features.
Each Intel SSE feature, or Intel SSE Client is addressed by a unique UUID and
each client has its own protocol. The protocol is message-based with a
header and payload up to maximal number of bytes advertised by the client,
upon connection.
Intel SSEI Driver
=================
The driver exposes a character device with device nodes /dev/isseiX.
An application maintains communication with an Intel SSE feature while
/dev/isseiX is open. The binding to a specific feature is performed by calling
:c:macro:`IOCTL_ISSEI_CONNECT_CLIENT`, which passes the desired UUID.
The number of instances of an Intel SSE feature that can be opened
at the same time is limited to single instance.
The driver is transparent to data that are passed between firmware feature
and host application.
Because some of the Intel SSE features can change the system
configuration, the driver by default allows only a privileged
user to access it.
The connection termination is performed by calling
:c:macro:`IOCTL_ISSEI_DISCONNECT_CLIENT`.
The session is terminated calling :c:expr:`close(fd)`.
A code snippet for an application communicating with SPDM client:
.. code-block:: C
struct issei_connect_client_data data = {.in_client_uuid =
{0xe8, 0x51, 0x49, 0xdf, 0x94, 0x47, 0x4C,
0x9A, 0x83, 0x67, 0xC4, 0xE3, 0x34, 0x64, 0xF1, 0xB4}};
__u8 req_data[] = {0x10, 0x84, 0x00, 0x00}; /* SPDM Get Version */
size_t req_data_len = sizeof(req_data);
__u8 res_data[256];
size_t res_data_len = sizeof(res_data);
int fd = open("/dev/issei0", O_RDWR);
ioctl(fd, IOCTL_ISSEI_CONNECT_CLIENT, &data);
printf("Ver=%d, MaxLen=%u, Flags=0x%08X\n",
data.out_client_properties.protocol_version,
data.out_client_properties.max_msg_length,
data.out_client_properties.flags);
[...]
write(fd, req_data, req_data_len);
[...]
read(fd, res_data, res_data_len);
printf("SPDM version count %u, version[0]=%02X%02X\n",
res_data[5], res_data[6], res_data[7]);
[...]
ioctl(fd, IOCTL_ISSEI_DISCONNECT_CLIENT, &data);
[...]
close(fd);
User space API ioctl
====================
The Intel SSEI Driver supports the following ioctl commands:
IOCTL_ISSEI_CONNECT_CLIENT
--------------------------
Connect to firmware Feature/Client.
.. code-block:: none
Usage:
struct issei_connect_client_data client_data;
ioctl(fd, IOCTL_ISSEI_CONNECT_CLIENT, &client_data);
struct issei_connect_client_data - contain the following
Inputs:
in_client_uuid - UUID of the FW Feature that needs to connect to.
Outputs:
out_client_properties - Client Properties: MTU, Protocol Version and Flags.
Error returns:
ENOTTY No such client (i.e. wrong UUID) or connection is not allowed.
EINVAL Wrong IOCTL Number
ENODEV Device or Connection is not initialized or ready.
ENOMEM Unable to allocate memory to client internal data.
EFAULT Fatal Error (e.g. Unable to access user input data)
EBUSY Connection Already Open
:Note:
max_msg_length (MTU) in client properties describes the maximum
data that can be sent or received. (e.g. with MTU=2K, can send
requests up to bytes 2k and received responses up to 2k bytes).
IOCTL_ISSEI_DISCONNECT_CLIENT
-----------------------------
Disconnect from firmware Feature/Client.
.. code-block:: none
Usage:
ioctl(fd, IOCTL_ISSEI_DISCONNECT_CLIENT, NULL);
Error returns:
EINVAL Wrong IOCTL Number
ENODEV Device or Connection is not initialized or ready.
ENOTCONN Feature/Client is not connected.
+74
View File
@@ -48,6 +48,66 @@ Access restrictions:
* APML Mailbox messages and Register xfer access are read-write,
* CPUID and MCA_MSR access is read-only.
SBTSI device
============
sbtsi driver under the drivers/misc/amd-sbi creates miscdevice
/dev/sbtsi-* to let user space programs run APML TSI register transfer
commands.
The driver supports both I2C and I3C transports for SB-TSI targets.
The transport is selected by the bus where the device is enumerated.
Misc device:
* In 1P socket 0: /dev/sbtsi-4c
* In 2P socket 0: /dev/sbtsi-4c, socket 1: /dev/sbtsi-48
.. code-block:: bash
$ ls -al /dev/sbtsi-4c
crw------- 1 root root 10, 116 Apr 2 05:22 /dev/sbtsi-4c
Access restrictions:
* Only root user is allowed to open the file.
* APML TSI Register transfer access is read-write.
SBTSI hwmon interface
=====================
The sbtsi_temp auxiliary driver binds to the auxiliary device published
by the core sbtsi driver on the auxiliary bus. The auxiliary device is
named amd-sbtsi.temp-sensor.<id>, where <id> is the device's transfer
address: the client address for I2C, or the assigned-address for I3C.
Note that the auxiliary bus formats <id> in decimal, whereas the
/dev/sbtsi-* misc node formats its address in hex. The two therefore
differ for the same device: an I2C/I3C sensor at address 0x4c appears as the
misc node /dev/sbtsi-4c and the auxiliary device
amd-sbtsi.temp-sensor.76.
It registers a hwmon device, providing a standard Linux hwmon interface
for reading CPU temperature and managing temperature limits.
The hwmon device appears under ``/sys/class/hwmon/`` when both ``sbtsi.ko``
and ``sbtsi_temp.ko`` are loaded.
Verify auxiliary bus device::
ls /sys/bus/auxiliary/devices/
# e.g. amd-sbtsi.temp-sensor.76 for an I2C/I3C sensor at address 0x4c
Example usage::
# Read current temperature
cat /sys/class/hwmon/hwmon<N>/temp1_input
# Set high temperature limit to 70 °C
echo 70000 > /sys/class/hwmon/hwmon<N>/temp1_max
# Verify
cat /sys/class/hwmon/hwmon<N>/temp1_max
Driver IOCTLs
=============
@@ -63,6 +123,9 @@ Driver IOCTLs
.. c:macro:: SBRMI_IOCTL_REG_XFER_CMD
.. kernel-doc:: include/uapi/misc/amd-apml.h
:doc: SBRMI_IOCTL_REG_XFER_CMD
.. c:macro:: SBTSI_IOCTL_REG_XFER_CMD
.. kernel-doc:: include/uapi/misc/amd-apml.h
:doc: SBTSI_IOCTL_REG_XFER_CMD
User-space usage
================
@@ -85,6 +148,16 @@ Next thing, open the device file, as follows::
exit(1);
}
To open SB-TSI device::
int file;
file = open("/dev/sbtsi-4c", O_RDWR);
if (file < 0) {
/* ERROR HANDLING */
exit(1);
}
The following IOCTLs are defined:
``#define SB_BASE_IOCTL_NR 0xF9``
@@ -92,6 +165,7 @@ The following IOCTLs are defined:
``#define SBRMI_IOCTL_CPUID_CMD _IOWR(SB_BASE_IOCTL_NR, 1, struct apml_cpuid_msg)``
``#define SBRMI_IOCTL_MCAMSR_CMD _IOWR(SB_BASE_IOCTL_NR, 2, struct apml_mcamsr_msg)``
``#define SBRMI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg)``
``#define SBTSI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 4, struct apml_tsi_xfer_msg)``
User space C-APIs are made available by esmi_oob_library, hosted at
+10
View File
@@ -13419,6 +13419,14 @@ F: drivers/platform/x86/intel/sdsi.c
F: tools/arch/x86/intel_sdsi/
F: tools/testing/selftests/drivers/sdsi/
INTEL SILICON SECURITY ENGINE INTERFACE (ISSEI)
M: Alexander Usyskin <alexander.usyskin@intel.com>
S: Supported
F: Documentation/ABI/testing/sysfs-class-issei
F: Documentation/driver-api/issei/issei.rst
F: drivers/misc/issei/
F: include/uapi/linux/issei.h
INTEL SGX
M: Jarkko Sakkinen <jarkko@kernel.org>
R: Dave Hansen <dave.hansen@linux.intel.com>
@@ -18947,6 +18955,8 @@ F: include/uapi/linux/sctp.h
F: lib/net_utils.c
F: lib/random32.c
F: net/
F: rust/helpers/net/
F: rust/kernel/net/
F: samples/pktgen/
F: tools/net/
F: tools/testing/selftests/net/
+2 -2
View File
@@ -71,9 +71,9 @@ void speakup_fake_down_arrow(void)
input_sync(virt_keyboard);
__this_cpu_write(reporting_keystroke, false);
/* reenable preemption */
/* re-enable preemption */
preempt_enable();
/* reenable keyboard interrupts */
/* re-enable keyboard interrupts */
local_irq_restore(flags);
}
+1 -2
View File
@@ -71,7 +71,6 @@ main(int argc, char *argv[])
open_input(NULL, argv[1]);
while (fgets(buffer, sizeof(buffer), infile)) {
lc++;
value = shift_state = 0;
cp = strtok(buffer, delims);
@@ -153,7 +152,7 @@ main(int argc, char *argv[])
continue;
printf("\n\t%d,", lc);
for (i = 0; i < max_states; i++)
printf(" %d,", (unsigned int)kp[i]);
printf(" %u,", (unsigned int)kp[i]);
}
printf("\n\t0, %d\n", map_ver);
+1 -1
View File
@@ -31,7 +31,7 @@ static char *speakup_default_msgs[MSG_LAST_INDEX] = {
[MSG_CURSORING_OFF] = "cursoring off",
[MSG_CURSORING_ON] = "cursoring on",
[MSG_HIGHLIGHT_TRACKING] = "highlight tracking",
[MSG_READ_WINDOW] = "read windo",
[MSG_READ_WINDOW] = "read window",
[MSG_READ_ALL] = "read all",
[MSG_EDIT_DONE] = "edit done",
[MSG_WINDOW_ALREADY_SET] = "window already set, clear then reset",
+17 -10
View File
@@ -8,14 +8,15 @@
*/
#include <linux/keyboard.h>
#include <linux/ctype.h>
#include "spk_priv.h"
#include "speakup.h"
#define MAXFUNCS 130
#define MAXKEYS 256
static const int num_key_names = MSG_KEYNAMES_END - MSG_KEYNAMES_START + 1;
static u_short key_offsets[MAXFUNCS], key_data[MAXKEYS];
static u_short masks[] = { 32, 16, 8, 4, 2, 1 };
static u16 key_offsets[MAXFUNCS], key_data[MAXKEYS];
static u16 masks[] = { 32, 16, 8, 4, 2, 1 };
static short letter_offsets[26] = {
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -49,7 +50,7 @@ static int cur_item, nstates;
static void build_key_data(void)
{
u_char *kp, counters[MAXFUNCS], ch, ch1;
u_short *p_key, key;
u16 *p_key, key;
int i, offset = 1;
nstates = (int)(state_tbl[-1]);
@@ -111,7 +112,7 @@ static void say_key(int key)
spk_msg_get(MSG_KEYNAMES_START + (key - 1)));
}
static int help_init(void)
static void help_init(void)
{
char start = SPACE;
int i;
@@ -120,21 +121,27 @@ static int help_init(void)
state_tbl = spk_our_keys[0] + SHIFT_TBL_SIZE + 2;
for (i = 0; i < num_funcs; i++) {
char *cur_funcname = spk_msg_get(MSG_FUNCNAMES_START + i);
char first_letter;
if (start == *cur_funcname)
first_letter = tolower(*cur_funcname);
/* Accept only 'a'..'z' to index letter_offsets[] safely */
if (first_letter < 'a' || first_letter > 'z')
continue;
start = *cur_funcname;
if (start == first_letter)
continue;
start = first_letter;
letter_offsets[(start & 31) - 1] = i;
}
return 0;
}
int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u16 key)
{
int i, n;
char *name;
u_char func, *kp;
u_short *p_keys, val;
u16 *p_keys, val;
if (letter_offsets[0] == -1)
help_init();
@@ -144,7 +151,7 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
synth_printf("%s\n", spk_msg_get(MSG_LEAVING_HELP));
return 1;
}
ch |= 32; /* lower case */
ch = tolower(ch);
if (ch < 'a' || ch > 'z')
return -1;
if (letter_offsets[ch - 'a'] == -1) {
+7 -7
View File
@@ -92,13 +92,13 @@ static void report_char_chartab_status(int reset, int received, int used,
if (reset) {
pr_info("%s reset to defaults\n", object_type[do_characters]);
} else if (received) {
len = snprintf(buf, sizeof(buf),
" updated %d of %d %s\n",
used, received, object_type[do_characters]);
len = scnprintf(buf, sizeof(buf),
" updated %d of %d %s\n",
used, received, object_type[do_characters]);
if (rejected)
snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
" with %d reject%s\n",
rejected, rejected > 1 ? "s" : "");
rejected, str_plural(rejected));
pr_info("%s", buf);
}
}
@@ -120,7 +120,7 @@ static ssize_t chars_chartab_store(struct kobject *kobj,
ssize_t retval = count;
unsigned long flags;
unsigned long index = 0;
int charclass = 0;
u16 charclass = 0;
int received = 0;
int used = 0;
int rejected = 0;
@@ -461,7 +461,7 @@ static ssize_t punc_show(struct kobject *kobj, struct kobj_attribute *attr,
struct st_var_header *p_header;
struct punc_var_t *var;
struct st_bits_data *pb;
short mask;
u16 mask;
unsigned long flags;
p_header = spk_var_header_by_name(attr->attr.name);
@@ -740,7 +740,7 @@ static void report_msg_status(int reset, int received, int used,
if (rejected)
snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
" with %d reject%s\n",
rejected, rejected > 1 ? "s" : "");
rejected, str_plural(rejected));
pr_info("%s", buf);
}
}
+38 -37
View File
@@ -63,7 +63,7 @@ int spk_attrib_bleep, spk_bleeps, spk_bleep_time = 10;
int spk_no_intr, spk_spell_delay;
int spk_key_echo, spk_say_word_ctl;
int spk_say_ctrl, spk_bell_pos;
short spk_punc_mask;
u16 spk_punc_mask;
int spk_punc_level, spk_reading_punc;
int spk_cur_phonetic;
char spk_str_caps_start[MAXVARLEN + 1] = "\0";
@@ -183,13 +183,13 @@ char *spk_default_chars[256] = {
/* 251 */ "u circumflex", "u oomlaut", "y acute", "thorn", "y oomlaut"
};
/* array of 256 u_short (one for each character)
/* array of 256 u16 (one for each character)
* initialized to default_chartab and user selectable via
* /sys/module/speakup/parameters/chartab
*/
u_short spk_chartab[256];
u16 spk_chartab[256];
static u_short default_chartab[256] = {
static u16 default_chartab[256] = {
B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, /* 0-7 */
B_CTL, B_CTL, A_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, /* 8-15 */
B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, /*16-23 */
@@ -267,10 +267,10 @@ static void speakup_date(struct vc_data *vc)
spk_y = spk_cy = vc->state.y;
spk_pos = spk_cp = vc->vc_pos;
spk_old_attr = spk_attr;
spk_attr = get_attributes(vc, (u_short *)spk_pos);
spk_attr = get_attributes(vc, (u16 *)spk_pos);
}
static void bleep(u_short val)
static void bleep(u16 val)
{
static const short vals[] = {
350, 370, 392, 414, 440, 466, 491, 523, 554, 587, 619, 659
@@ -346,14 +346,14 @@ static void speakup_cut(struct vc_data *vc)
if (!mark_cut_flag) {
mark_cut_flag = 1;
spk_xs = (u_short)spk_x;
spk_ys = (u_short)spk_y;
spk_xs = (u16)spk_x;
spk_ys = (u16)spk_y;
spk_sel_cons = vc;
synth_printf("%s\n", spk_msg_get(MSG_MARK));
return;
}
spk_xe = (u_short)spk_x;
spk_ye = (u_short)spk_y;
spk_xe = (u16)spk_x;
spk_ye = (u16)spk_y;
mark_cut_flag = 0;
synth_printf("%s\n", spk_msg_get(MSG_CUT));
@@ -482,7 +482,7 @@ static void say_char(struct vc_data *vc)
u16 ch;
spk_old_attr = spk_attr;
ch = get_char(vc, (u_short *)spk_pos, &spk_attr);
ch = get_char(vc, (u16 *)spk_pos, &spk_attr);
if (spk_attr != spk_old_attr) {
if (spk_attrib_bleep & 1)
bleep(spk_y);
@@ -497,7 +497,7 @@ static void say_phonetic_char(struct vc_data *vc)
u16 ch;
spk_old_attr = spk_attr;
ch = get_char(vc, (u_short *)spk_pos, &spk_attr);
ch = get_char(vc, (u16 *)spk_pos, &spk_attr);
if (ch <= 0x7f && isalpha(ch)) {
ch &= 0x1f;
synth_printf("%s\n", phonetic[--ch]);
@@ -549,7 +549,7 @@ static u_long get_word(struct vc_data *vc)
u_char temp;
spk_old_attr = spk_attr;
ch = get_char(vc, (u_short *)tmp_pos, &temp);
ch = get_char(vc, (u16 *)tmp_pos, &temp);
/* decided to take out the sayword if on a space (mis-information */
if (spk_say_word_ctl && ch == SPACE) {
@@ -558,26 +558,26 @@ static u_long get_word(struct vc_data *vc)
return 0;
} else if (tmpx < vc->vc_cols - 2 &&
(ch == SPACE || ch == 0 || (ch < 0x100 && IS_WDLM(ch))) &&
get_char(vc, (u_short *)tmp_pos + 1, &temp) > SPACE) {
get_char(vc, (u16 *)tmp_pos + 1, &temp) > SPACE) {
tmp_pos += 2;
tmpx++;
} else {
while (tmpx > 0) {
ch = get_char(vc, (u_short *)tmp_pos - 1, &temp);
ch = get_char(vc, (u16 *)tmp_pos - 1, &temp);
if ((ch == SPACE || ch == 0 ||
(ch < 0x100 && IS_WDLM(ch))) &&
get_char(vc, (u_short *)tmp_pos, &temp) > SPACE)
get_char(vc, (u16 *)tmp_pos, &temp) > SPACE)
break;
tmp_pos -= 2;
tmpx--;
}
}
attr_ch = get_char(vc, (u_short *)tmp_pos, &spk_attr);
attr_ch = get_char(vc, (u16 *)tmp_pos, &spk_attr);
buf[cnt++] = attr_ch;
while (tmpx < vc->vc_cols - 1 && cnt < ARRAY_SIZE(buf) - 1) {
tmp_pos += 2;
tmpx++;
ch = get_char(vc, (u_short *)tmp_pos, &temp);
ch = get_char(vc, (u16 *)tmp_pos, &temp);
if (ch == SPACE || ch == 0 ||
(buf[cnt - 1] < 0x100 && IS_WDLM(buf[cnt - 1]) &&
ch > SPACE))
@@ -591,7 +591,7 @@ static u_long get_word(struct vc_data *vc)
static void say_word(struct vc_data *vc)
{
u_long cnt = get_word(vc);
u_short saved_punc_mask = spk_punc_mask;
u16 saved_punc_mask = spk_punc_mask;
if (cnt == 0)
return;
@@ -606,7 +606,7 @@ static void say_prev_word(struct vc_data *vc)
u_char temp;
u16 ch;
enum edge edge_said = edge_none;
u_short last_state = 0, state = 0;
u16 last_state = 0, state = 0;
spk_parked |= 0x01;
@@ -635,7 +635,7 @@ static void say_prev_word(struct vc_data *vc)
spk_x--;
}
spk_pos -= 2;
ch = get_char(vc, (u_short *)spk_pos, &temp);
ch = get_char(vc, (u16 *)spk_pos, &temp);
if (ch == SPACE || ch == 0)
state = 0;
else if (ch < 0x100 && IS_WDLM(ch))
@@ -661,7 +661,7 @@ static void say_next_word(struct vc_data *vc)
u_char temp;
u16 ch;
enum edge edge_said = edge_none;
u_short last_state = 2, state = 0;
u16 last_state = 2, state = 0;
spk_parked |= 0x01;
if (spk_x == vc->vc_cols - 1 && spk_y == vc->vc_rows - 1) {
@@ -669,7 +669,7 @@ static void say_next_word(struct vc_data *vc)
return;
}
while (1) {
ch = get_char(vc, (u_short *)spk_pos, &temp);
ch = get_char(vc, (u16 *)spk_pos, &temp);
if (ch == SPACE || ch == 0)
state = 0;
else if (ch < 0x100 && IS_WDLM(ch))
@@ -755,9 +755,9 @@ static int get_line(struct vc_data *vc)
u_char tmp2;
spk_old_attr = spk_attr;
spk_attr = get_attributes(vc, (u_short *)spk_pos);
spk_attr = get_attributes(vc, (u16 *)spk_pos);
for (i = 0; i < vc->vc_cols; i++) {
buf[i] = get_char(vc, (u_short *)tmp, &tmp2);
buf[i] = get_char(vc, (u16 *)tmp, &tmp2);
tmp += 2;
}
for (--i; i >= 0; i--)
@@ -770,7 +770,7 @@ static void say_line(struct vc_data *vc)
{
int i = get_line(vc);
u16 *cp;
u_short saved_punc_mask = spk_punc_mask;
u16 saved_punc_mask = spk_punc_mask;
if (i == 0) {
synth_printf("%s\n", spk_msg_get(MSG_BLANK));
@@ -817,12 +817,12 @@ static int say_from_to(struct vc_data *vc, u_long from, u_long to,
{
int i = 0;
u_char tmp;
u_short saved_punc_mask = spk_punc_mask;
u16 saved_punc_mask = spk_punc_mask;
spk_old_attr = spk_attr;
spk_attr = get_attributes(vc, (u_short *)from);
spk_attr = get_attributes(vc, (u16 *)from);
while (from < to) {
buf[i++] = get_char(vc, (u_short *)from, &tmp);
buf[i++] = get_char(vc, (u16 *)from, &tmp);
from += 2;
if (i >= vc->vc_size_row)
break;
@@ -895,10 +895,10 @@ static int get_sentence_buf(struct vc_data *vc, int read_punc)
sentmarks[bn][0] = &sentbuf[bn][0];
i = 0;
spk_old_attr = spk_attr;
spk_attr = get_attributes(vc, (u_short *)start);
spk_attr = get_attributes(vc, (u16 *)start);
while (start < end) {
sentbuf[bn][i] = get_char(vc, (u_short *)start, &tmp);
sentbuf[bn][i] = get_char(vc, (u16 *)start, &tmp);
if (i > 0) {
if (sentbuf[bn][i] == SPACE &&
sentbuf[bn][i - 1] == '.' &&
@@ -1047,7 +1047,7 @@ static void say_position(struct vc_data *vc)
static void say_char_num(struct vc_data *vc)
{
u_char tmp;
u16 ch = get_char(vc, (u_short *)spk_pos, &tmp);
u16 ch = get_char(vc, (u16 *)spk_pos, &tmp);
synth_printf(spk_msg_get(MSG_CHAR_INFO), ch, ch);
}
@@ -1080,7 +1080,7 @@ static void spkup_write(const u16 *in_buf, int count)
{
static int rep_count;
static u16 ch = '\0', old_ch = '\0';
static u_short char_type, last_type;
static u16 char_type, last_type;
int in_count = count;
spk_keydown = 0;
@@ -1325,9 +1325,9 @@ void spk_reset_default_chartab(void)
static const struct st_bits_data *pb_edit;
static int edit_bits(struct vc_data *vc, u_char type, u_char ch, u_short key)
static int edit_bits(struct vc_data *vc, u_char type, u_char ch, u16 key)
{
short mask = pb_edit->mask, ch_type = spk_chartab[ch];
u16 mask = pb_edit->mask, ch_type = spk_chartab[ch];
if (type != KT_LATIN || (ch_type & B_NUM) || ch < SPACE)
return -1;
@@ -1947,7 +1947,7 @@ static void speakup_bits(struct vc_data *vc)
spk_special_handler = edit_bits;
}
static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u_short key)
static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u16 key)
{
static u_char goto_buf[8];
static int num;
@@ -2105,7 +2105,7 @@ static void do_spkup(struct vc_data *vc, u_char value)
static const char *pad_chars = "0123456789+-*/\015,.?()";
static int
speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym,
speakup_key(struct vc_data *vc, int shift_state, int keycode, u16 keysym,
int up_flag)
{
unsigned long flags;
@@ -2444,6 +2444,7 @@ error_kbdnotifier:
mutex_lock(&spk_mutex);
synth_release();
mutex_unlock(&spk_mutex);
spk_ttyio_unregister_ldisc();
speakup_kobj_exit();
error_kobjects:
+1 -1
View File
@@ -13,7 +13,7 @@
#include "speakup.h"
unsigned short spk_xs, spk_ys, spk_xe, spk_ye; /* our region points */
u16 spk_xs, spk_ys, spk_xe, spk_ye; /* our region points */
struct vc_data *spk_sel_cons;
struct speakup_selection_work {
+5 -5
View File
@@ -62,7 +62,7 @@ int spk_set_num_var(int val, struct st_var_header *var, int how);
int spk_set_string_var(const char *page, struct st_var_header *var, int len);
int spk_set_mask_bits(const char *input, const int which, const int how);
extern special_func spk_special_handler;
int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key);
int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u16 key);
int synth_init(char *name);
void synth_release(void);
@@ -82,7 +82,7 @@ void synth_writeu(const char *buf, size_t count);
int synth_supports_indexing(void);
extern struct vc_data *spk_sel_cons;
extern unsigned short spk_xs, spk_ys, spk_xe, spk_ye; /* our region points */
extern u16 spk_xs, spk_ys, spk_xe, spk_ye; /* our region points */
extern wait_queue_head_t speakup_event;
extern struct kobject *speakup_kobj;
@@ -95,20 +95,20 @@ extern struct st_spk_t *speakup_console[];
extern struct spk_synth *synth;
extern char spk_pitch_buff[];
extern u_char *spk_our_keys[];
extern short spk_punc_masks[];
extern u16 spk_punc_masks[];
extern char spk_str_caps_start[], spk_str_caps_stop[], spk_str_pause[];
extern bool spk_paused;
extern const struct st_bits_data spk_punc_info[];
extern u_char spk_key_buf[600];
extern char *spk_characters[];
extern char *spk_default_chars[];
extern u_short spk_chartab[];
extern u16 spk_chartab[];
extern int spk_no_intr, spk_say_ctrl, spk_say_word_ctl, spk_punc_level;
extern int spk_reading_punc, spk_attrib_bleep, spk_bleeps;
extern int spk_bleep_time, spk_bell_pos;
extern int spk_spell_delay, spk_key_echo;
extern int spk_cur_phonetic;
extern short spk_punc_mask;
extern u16 spk_punc_mask;
extern short spk_pitch_shift, synth_flags;
extern bool spk_quiet_boot;
extern char *synth_name;
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* speakup_acntpc.h - header file for speakups Accent-PC driver. */
#ifndef _SPEAKUP_ACNT_H
#define _SPEAKUP_ACNT_H
#define SYNTH_IO_EXTENT 0x02
@@ -17,3 +19,4 @@
#define SYNTH_FULL 'F' /* synth is full. */
#define SYNTH_ALMOST_EMPTY 'M' /* synth has less than 2 seconds of text left */
#define SYNTH_SPEAKING 's' /* synth is speaking and has a fare way to go */
#endif
@@ -41,7 +41,7 @@
#define STAT_new_index 0x0040 /* new last index ready */
#define STAT_new_status 0x0080 /* new status posted */
#define STAT_dma_state 0x0100 /* dma state toggle */
#define STAT_index_valid 0x0200 /* indexs are valid */
#define STAT_index_valid 0x0200 /* indexes are valid */
#define STAT_flushing 0x0400 /* flush in progress */
#define STAT_self_test 0x0800 /* module in self test */
#define MODE_ready 0xc000 /* module ready for next phase */
+4 -1
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* speakup_dtlk.h - header file for speakups DoubleTalk driver. */
#ifndef _SPEAKUP_DTLK_H
#define _SPEAKUP_DTLK_H
#define SYNTH_IO_EXTENT 0x02
#define SYNTH_CLEAR 0x18 /* stops speech */
@@ -39,7 +41,7 @@
/* data returned by Interrogate command */
struct synth_settings {
u_short serial_number; /* 0-7Fh:0-7Fh */
u16 serial_number; /* 0-7Fh:0-7Fh */
u_char rom_version[24]; /* null terminated string */
u_char mode; /* 0=Character; 1=Phoneme; 2=Text */
u_char punc_level; /* nB; 0-7 */
@@ -61,3 +63,4 @@ struct synth_settings {
*/
u_char has_indexing; /* nonzero if indexing is implemented */
};
#endif

Some files were not shown because too many files have changed in this diff Show More