Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7cfe09c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: scm: Restructure Milestone call"

parents 08762d6e ceaed0c8
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@
#include <asm/system_misc.h>
#include <soc/qcom/minidump.h>

#include <soc/qcom/scm.h>
#include <soc/qcom/lpm_levels.h>

#define CREATE_TRACE_POINTS
@@ -413,7 +412,6 @@ void __init smp_cpus_done(unsigned int max_cpus)
	setup_cpu_features();
	hyp_mode_check();
	apply_alternatives_all();
	scm_enable_mem_protection();
	mark_linear_text_alias_ro();
}

+8 −8
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/slab.h>
@@ -660,6 +660,8 @@ bool scm_is_secure_device(void)
}
EXPORT_SYMBOL(scm_is_secure_device);

#ifdef CONFIG_ARM64

/*
 * SCM call command ID to protect kernel memory
 * in Hyp Stage 2 page tables.
@@ -668,7 +670,7 @@ EXPORT_SYMBOL(scm_is_secure_device);
 */
#define TZ_RTIC_ENABLE_MEM_PROTECTION	0x4
#if IS_ENABLED(CONFIG_QCOM_QHEE_ENABLE_MEM_PROTECTION)
int scm_enable_mem_protection(void)
static int __init scm_mem_protection_init(void)
{
	struct scm_desc desc = {0};
	int ret = 0, resp;
@@ -693,10 +695,8 @@ int scm_enable_mem_protection(void)

	return resp;
}
#else
inline int scm_enable_mem_protection(void)
{
	return 0;
}

early_initcall(scm_mem_protection_init);
#endif

#endif
EXPORT_SYMBOL(scm_enable_mem_protection);
+1 −6
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
 */

#ifndef __MACH_SCM_H
@@ -104,7 +104,6 @@ extern int scm_restore_sec_cfg(u32 device_id, u32 spare, int *scm_ret);
extern u32 scm_io_read(phys_addr_t address);
extern int scm_io_write(phys_addr_t address, u32 val);
extern bool scm_is_secure_device(void);
extern int scm_enable_mem_protection(void);
extern int scm_get_feat_version(u32 feat);
extern bool is_scm_armv8(void);

@@ -167,9 +166,5 @@ static inline bool scm_is_secure_device(void)
	return false;
}

static inline int scm_enable_mem_protection(void)
{
	return 0;
}
#endif
#endif