# US 2021/0232337 A1 · Memory-access control

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0232337 A1
- Document ID: US20210232337A1
- Status: Published application
- Kind: A1
- Application number: 17/048,937
- Filed: 2019-04-17
- Published: 2021-07-29
- Earliest claimed: 2018-04-20
- Assignees: Nordic Semiconductor ASA
- Applicants: Nordic Semiconductor ASA
- Inventors: Hannu TALVITIE; Marko WINBLAD
- Web page: https://patentgrep.com/patent/US20210232337A1

## CPC

- G06F 3/0655: {Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices}
- G06F 12/1441: {for a range}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 21/74: operating in dual or compartmented mode, i.e. at least one secure mode
- G06F 21/79: in semiconductor storage media, e.g. directly-addressable memories
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An electronic device comprises a processor, a memory, a memory controller for controlling access to the memory, a hardware security module, and a bus system, to which the processor, the memory controller, and the hardware security module are connected. The hardware security module uses its connection to the bus system to detect requests on the bus system that are sent by the processor. The hardware security module has a secure state and a non-secure state. When in the secure state, the hardware security module adds a secure-state signal to requests sent by the processor over the bus system. The memory controller determines whether memory-access requests include the secure-state signal, and denies access to a secure region of the memory in response to receiving memory-access requests that do not include the secure-state signal.

## Claims

### Claim 1

An electronic device comprising:
a processor;
a memory;
a memory controller for controlling access to the memory;
a hardware security module; and
a bus system, to which the processor, the memory controller, and the hardware security module are connected,
wherein:
the processor is configured to send requests over the bus system;
the hardware security module has a connection to the bus system and is configured to use this connection to detect requests on the bus system that are sent by the processor;
the hardware security module has a secure state and a non-secure state;
the hardware security module is configured, when in the secure state, to add a secure-state signal to requests sent by the processor over the bus system;
the memory controller is configured to receive memory-access requests over the bus system, and to determine whether the received memory-access requests include the secure-state signal;
the memory controller is configured to grant access to a secure region of the memory in response to receiving a memory-access request that includes the secure-state signal; and
the memory controller is configured to deny access to the secure region of the memory in response to receiving a memory-access request that does not include the secure-state signal.

### Claim 2 (depends on 1)

The electronic device of claim 1, wherein the processor does not inherently support a secure state and a non-secure state.

### Claim 3 (depends on 1)

The electronic device of claim 1, wherein the memory controller is configured to deny one or more of: write access to the secure region, data read access to the secure region, and execution access to the secure region, when receiving memory-access requests that do not include the secure-state signal.

### Claim 4 (depends on 1)

The electronic device of claim 1, wherein the hardware security module is configured to start in the secure state after the device is reset.

### Claim 5 (depends on 1)

The electronic device of claim 1, wherein the hardware security module is configured to be switched from the secure state to the non-secure state by software executed by the processor.

### Claim 6 (depends on 5)

The electronic device of claim 5, wherein the memory stores software which, when executed by the processor, causes the processor to instruct the hardware security module to switch to the non-secure state.

### Claim 7 (depends on 1)

The electronic device of claim 1, wherein the secure-state signal is sent over a secure-state signal line in the bus system.

### Claim 8

(canceled)

### Claim 9 (depends on 1)

The electronic device of claim 1, further comprising a peripheral that supports memory-mapped input access or output access, wherein the peripheral comprises access logic configured to grant access to a function of the peripheral in response to receiving a request over the bus system that includes the secure-state signal, and to deny access to the function in response to receiving a request over the bus system that does not include the secure-state signal.

### Claim 10 (depends on 1)

The electronic device of claim 1, wherein the secure region of the memory is defined or is definable by one or more configuration parameters stored in a non-volatile memory of the electronic device, and wherein the hardware security module and memory controller are configured to prevent the processor from writing to said one or more configuration parameters when the hardware security module is in the non-secure state.

### Claim 11 (depends on 1)

The electronic device of claim 1, wherein the hardware security module is configured, when in the secure state, to prevent the processor from fetching instructions stored outside the secure region.

### Claim 12 (depends on 1)

The electronic device of claim 1, wherein the hardware security module is configured to use the connection to the bus system to detect requests on the bus system that are sent by a peripheral or by a further processor of the electronic device.

### Claim 13 (depends on 1)

The electronic device of claim 1, wherein the hardware security module is configured to switch from the secure state to the non-secure state in response to a switch-to-non-secure command from the processor, or
wherein the hardware security module is configured to switch from the non-secure state to the secure state in response to a switch-to-secure command from the processor.

### Claim 14

(canceled)

### Claim 15 (depends on 13)

The electronic device of claim 13, wherein the hardware security module is configured to receive said command from the processor at least partly as one or more bus transfers initiated by the processor over the bus system.

### Claim 16 (depends on 15)

The electronic device of claim 15, wherein the hardware security module is configured to receive said command from the processor at least partly by detecting a predetermined sequence of one or more bus transfers, initiated by the processor over the bus system, having one or more predetermined address values and/or predetermined data values.

### Claim 17 (depends on 1)

The electronic device of claim 1, wherein the hardware security module is configured to switch from the non-secure state to the secure state at least partly in response to the processor initiating an instruction-fetch bus transfer for fetching an instruction from a predetermined trigger address, wherein the predetermined trigger address is determined in accordance with a value stored in a configuration register of the hardware security module.

### Claim 18 (depends on 13)

The electronic device of claim 13, wherein the hardware security module is configured to receive said command from the processor at least partly over a connection, separate from the bus system, to an internal register of the processor or to a point in the processor that allows the hardware security module to detect a logic level within the processor.

### Claim 19 (depends on 18)

The electronic device of claim 18, wherein the hardware security module comprises sensing logic for sensing the contents of said internal register or for sensing the logic level at said point in the processor, and wherein the hardware security module is configured to receive said command from the processor at least partly by sensing a predetermined sequence of one or more values of said internal register or of the logic level at said point, over time, wherein the predetermined sequence of one or more values corresponds to a predetermined sequence of one or more software instructions which, when executed by the processor, cause the contents of the internal register or the logic level at said point in the processor to have said predetermined sequence of one or more values over time.

### Claim 20 (depends on 1)

The electronic device of claim 1, wherein the hardware security module is configured to detect an error in a received command to switch to or from the secure state, and is configured to trigger a reset of the electronic device in response to such detection.

### Claim 21 (depends on 1)

The electronic device of claim 1, wherein the hardware security module comprises configuration logic for reading one or more configuration parameters from a non-volatile memory of the electronic device after a reset of the electronic device, and comprises reset logic for holding the processor in reset until after the configuration logic has read the one or more configuration parameters.

### Claim 22

A method of operating an electronic device, the electronic device comprising:
a processor;
a memory;
a memory controller for controlling access to the memory;
a hardware security module; and
a bus system, to which the processor, the memory controller, and the hardware security module are connected,
and the method comprising:
the processor sending requests over the bus system;
the hardware security module using a connection to the bus system to detect said requests;
the hardware security module being in a secure state and, when in the secure state, detecting a first memory-access request sent by the processor over the bus system and adding a secure-state signal to the first memory-access request over the bus system;
the memory controller receiving the first memory-access request over the bus system, detecting that the secure-state signal has been added to the first memory-access request, and, in response to said detecting, granting access to the secure region of the memory;
the hardware security module being in a non-secure state and, when in the non-secure state, detecting a second memory-access request sent by the processor over the bus system and not adding the secure-state signal to the second memory-access request over the bus system; and
the memory controller receiving the second memory-access request over the bus system, detecting that the secure-state signal has not been added to the second memory-access request, and, in response to said detecting, denying access to the secure region of the memory.

### Claim at position 23

23-25. (canceled)
