Commit 3a3a5bf1 authored by Omer Shpigelman's avatar Omer Shpigelman Committed by Oded Gabbay
Browse files

habanalabs: add gaudi security module



Add the code to initialize the security module of GAUDI. Similar to Goya,
we have two dedicated mechanisms for security: Range Registers and
Protection bits. Those mechanisms protect sensitive memory and
configuration areas inside the device.

In addition, in Gaudi we moved to a 3-level security scheme, where the F/W
runs with the highest security level (Privileged), the driver runs with a
less secured level (Secured) and the user is neither privileged nor
secured. The security module in the driver configures the Secured parts so
the user won't be able to access them. The Privileged parts are configured
by the F/W.

Signed-off-by: default avatarOmer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
parent bcaf4152
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
subdir-ccflags-y += -I$(src)

HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o
 No newline at end of file
HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -3245,6 +3245,8 @@ static int gaudi_hw_init(struct hl_device *hdev)
	if (rc)
		return rc;

	gaudi_init_security(hdev);

	gaudi_init_mme_qmans(hdev);

	gaudi_init_tpc_qmans(hdev);
+1 −0
Original line number Diff line number Diff line
@@ -248,6 +248,7 @@ struct gaudi_device {
	u8				ext_queue_idx;
};

void gaudi_init_security(struct hl_device *hdev);
void gaudi_add_device_attr(struct hl_device *hdev,
			struct attribute_group *dev_attr_grp);
void gaudi_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq);
+9090 −0

File added.

Preview size limit exceeded, changes collapsed.