/* remote_vars points to a buffer that is cacheline aligned for BTE copies and assumed to be of size XPC_RP_VARS_SIZE.  */
static enum xp_retval xpc_get_remote_vars_sn2(unsigned long remote_vars_pa, struct xpc_vars_sn2 *remote_vars)
/* remote_vars points to a buffer that is cacheline aligned for BTE copies and assumed to be of size XPC_RP_VARS_SIZE.  */
static enum xp_retval xpc_get_remote_vars_sn2(unsigned long remote_vars_pa, struct xpc_vars_sn2 *remote_vars)
{
	enum xp_retval ret;
	if (remote_vars_pa == 0)
		return xpVarsNotSet;
	ret = xp_remote_memcpy(xp_pa(remote_vars), remote_vars_pa,
			       XPC_RP_VARS_SIZE);
	if (ret != xpSuccess)
		return ret;
	if (XPC_VERSION_MAJOR(remote_vars->version) !=
	    XPC_VERSION_MAJOR(XPC_V_VERSION)) {
		return xpBadVersion;
	}
	return xpSuccess;
}