From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web11.8326.1605787222683511883 for ; Thu, 19 Nov 2020 04:00:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=uMmPgkoY; spf=pass (domain: nuviainc.com, ip: 209.85.128.65, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f65.google.com with SMTP id d142so6928657wmd.4 for ; Thu, 19 Nov 2020 04:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Rqskbn81zXBZEdHQCxW+xlFzLPocLp7GpXb920d+PBo=; b=uMmPgkoYOhzBoiMRN0EKqEKeZWhrPUdx9ALN4DyFoh6T+tVvO+DpMfswJwhaskddr7 8wAUrttSSbrq3rYtv7GQh3DQZ8DZTfqECLGaPZRzFBE8TiVmD/0WNCsqiqDiPj5kftJx I6oA7E4PM+jXYGELVnhgWOtKfrF+2YAHJExRm/c7tIZZOvjp8jjNvhLN3RpatqYb+V5u swycMhJShTd0y9lUUGa308stIYKvcPKE803Ivebi9R3WuGzyRoMwimmuqm/Q6OTdvWR9 EEFm8jN+A0SwbgxmI9KCpx1W4ENW3HFY4Ym+RKg90KfYtTfo3+3lXhdn5R1ckL2xB6oJ RD/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Rqskbn81zXBZEdHQCxW+xlFzLPocLp7GpXb920d+PBo=; b=TEdYe3VCY0l/icYPnHXafd4vt7vCRVZezvWCdUfSvOJ5Ixi4beqv3Zu6YfhQUexewS u4deZ1YkPIGZuE2ufvQBmHdIwFsMcN1xKbTiLECwQtPoNft3fvv42AQWMfOW1NzjiqC5 JvQOpuY9IbuKuAvsD8zMnVRguq8M33TtsYo2ZRtqjw8uArs7MJitgFQ1bQSziN4+gSEw akyY+tTpZnUMXUmKqxstpH4J6vJvtZ+bYqoeQ9YaW/VeVv7nUx1xy+a+nJGl2OWAfuDp x/ZMC2mZPcn+Kxwyhuk+b3lm6D5i7+EEOJjr3SGWZBVCETlIm6DyldaQGGSQAM/ahX3T Wosg== X-Gm-Message-State: AOAM531jzt+WNLT7AbDyNiTbVEsOg4hFVhTnvcelit2CxvwGBfi/ozRY ffoYm0+sXN+WDDE1jVsSTvn5Ng== X-Google-Smtp-Source: ABdhPJxgS/FEvgfi/Xb9Y5/iKuxya1tzJCDWsqbZTSMu/jlyv03QpDEfQmKk+UkFAoTHM1Oo5Y8UUA== X-Received: by 2002:a1c:4884:: with SMTP id v126mr4362251wma.160.1605787221156; Thu, 19 Nov 2020 04:00:21 -0800 (PST) Return-Path: Received: from vanye (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id d13sm14829899wrb.39.2020.11.19.04.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 04:00:20 -0800 (PST) Date: Thu, 19 Nov 2020 12:00:18 +0000 From: "Leif Lindholm" To: Rebecca Cran Cc: devel@edk2.groups.io, Ard Biesheuvel , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: Re: [PATCH v3 1/3] ArmPkg: Add ARM SMC Architecture functions to ArmStdSmc.h Message-ID: <20201119120018.GJ1664@vanye> References: <20201111001748.20217-1-rebecca@nuviainc.com> <20201111001748.20217-2-rebecca@nuviainc.com> MIME-Version: 1.0 In-Reply-To: <20201111001748.20217-2-rebecca@nuviainc.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 10, 2020 at 17:17:46 -0700, Rebecca Cran wrote: > The ARM SMC Architecture functions were missing from ArmStdSmc.h. > Add them, based on the SMC Calling Convention version 1.2 specification. > > Signed-off-by: Rebecca Cran > --- > ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h > index 3509eb680f18..90f32c2249cd 100644 > --- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h > +++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h > @@ -1,5 +1,6 @@ > /** @file > * > +* Copyright (c) 2020, NUVIA Inc. All rights reserved. > * Copyright (c) 2012-2017, ARM Limited. All rights reserved. > * > * SPDX-License-Identifier: BSD-2-Clause-Patent > @@ -52,6 +53,18 @@ > #define ARM_SMC_MM_RET_DENIED -3 > #define ARM_SMC_MM_RET_NO_MEMORY -4 > > +// ARM Architecture Calls > +#define ARM_SMC_ID_ARCH_VERSION 0x80000000 This one does not actually contain "ARCH" in the spec, and it references SMCCC version speficically. > +#define ARM_SMC_ID_ARCH_FEATURES 0x80000001 > +#define ARM_SMC_ID_ARCH_SOC_ID 0x80000002 > +#define ARM_SMC_ID_ARCH_WORKAROUND_1 0x80008000 > +#define ARM_SMC_ID_ARCH_WORKAROUND_2 0x80007FFF TF-A defines this whole block as: #define SMCCC_VERSION U(0x80000000) #define SMCCC_ARCH_FEATURES U(0x80000001) #define SMCCC_ARCH_SOC_ID U(0x80000002) #define SMCCC_ARCH_WORKAROUND_1 U(0x80008000) #define SMCCC_ARCH_WORKAROUND_2 U(0x80007FFF) I think I prefer these shorter versions, which also addresses the abovementioned comment. (Not the U() bit, that's TF-A idiom.) > +#define ARM_SMC_ARCH_RET_SUCCESS 0 > +#define ARM_SMC_ARCH_RET_NOT_SUPPORTED -1 > +#define ARM_SMC_ARCH_RET_NOT_REQUIRED -2 > +#define ARM_SMC_ARCH_RET_INVALID_PARAMETER -3 And these as: #define SMC_ARCH_CALL_SUCCESS 0 #define SMC_ARCH_CALL_NOT_SUPPORTED -1 #define SMC_ARCH_CALL_NOT_REQUIRED -2 #define SMC_ARCH_CALL_INVAL_PARAM -3 Not sure I prefer these, but I think we cold drop the ARM_ prefix. / Leif > + > /* > * Power State Coordination Interface (PSCI) calls cover a subset of the > * Standard Service Call range. > -- > 2.26.2 >