From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mx.groups.io with SMTP id smtpd.web09.136.1634921606131490314 for ; Fri, 22 Oct 2021 09:53:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20210112.gappssmtp.com header.s=20210112 header.b=33CdzEVM; spf=pass (domain: nuviainc.com, ip: 209.85.215.181, mailfrom: rebecca@nuviainc.com) Received: by mail-pg1-f181.google.com with SMTP id e65so3848566pgc.5 for ; Fri, 22 Oct 2021 09:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=aU+z4ChpJWKXhOFlvs5seVvq1ZIuwDEunpQAoa6HOiA=; b=33CdzEVMb0h80qP+eAZ8kyBq33zRZ7aVMqNCcRntpyxz5k8DsGr7q9pZEQaluKVtfM ST0vXMV2nk85ZTy8YfREiqgVyZ8BDgMiHz90dn68BhbqS/pErG63NrlvyBhJDl7Feh8a H0PQoCZ8SLtGm+Pbtd+wZu7HzN/7rRQLoGYhmzLYQnkMi3JFB0RrgGayY+eELqavbmmM tHBlIckrfcoHCdLsruXoU86SIwoZuVM8XLm/fCbrHirN/ToG7vl0nsFGDsUO/k778UuP kil+Ek4qb05GcvoqThFaleitP6Hja2KoM7R39bnAxkEqwC8MwYYDnOcarWYtPmhkxfyS 3k6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=aU+z4ChpJWKXhOFlvs5seVvq1ZIuwDEunpQAoa6HOiA=; b=NStkXJwr0A2q0da1lZQaEVDbmCMbPZOPNSY/TEaspHe65OqF5YGvUU4KR0Ei9gQH+3 SkE1jHDznb7h7TBciDGJReFl78ZSaoN0xnvFAAICJW5/bjY2dXcH05VobxF6Awl8FMuZ Y7w1cznYLnMtN+qMMEzw7oDyA2To9szNNsZoKLOemBV1fzN986LXqbLRAr92zEGYieJg bMX7QprwJ6PqdpIKqo5UWhNBhKxm8QFltHtsVYueDP1FNjH6XxhCqeBG4V41Jvn9BGBB 56J28uaSqlUiIJQhTZZLFjWA8IkUFGhoJnLn0+YkF6gInodqyHvgSkDJ3zz4G2Bqgo3I Qpwg== X-Gm-Message-State: AOAM531gzu3/pqu+6U6BEG+rOMzeuYaPSoSKxdgP5Id8R7YNHGoENXnR 3R4FyAHucti5cSi1Md9pdU9IWC8P++y/mR9oXOfnfe8pvkIOvEej6i9oGAOrZDcScFrCUM6htdq G+i4vlcJL61A7emoAmuiFvkKy72T2mUoMpiEIS/9ZATaiDsWEuo1DULL3dp5Ju3aQ8rGWRQ== X-Google-Smtp-Source: ABdhPJyYuNrzYvcSOMPfD5wngTyQjIwnCbmcruiIkQZMGj0sKAHBM8Ybxj+tEe0IZEc/aJ7R0LZIrw== X-Received: by 2002:a05:6a00:1407:b0:44c:d2cc:916e with SMTP id l7-20020a056a00140700b0044cd2cc916emr743991pfu.64.1634921605376; Fri, 22 Oct 2021 09:53:25 -0700 (PDT) Return-Path: Received: from [10.0.10.179] (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id r31sm13471638pjg.28.2021.10.22.09.53.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Oct 2021 09:53:25 -0700 (PDT) Subject: Re: [PATCH 1/1] ArmPkg: Add SMC helper functions To: Ard Biesheuvel Cc: Sami Mujawar , Ard Biesheuvel , Gerd Hoffmann , Samer El-Haj-Mahmoud , Leif Lindholm , edk2-devel-groups-io References: <20211019203543.5471-1-rebecca@nuviainc.com> From: "Rebecca Cran" Message-ID: Date: Fri, 22 Oct 2021 10:53:23 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US On 10/22/21 9:08 AM, Ard Biesheuvel wrote: > On Tue, 19 Oct 2021 at 22:35, Rebecca Cran wrote: >> Add functions ArmCallSmc0/1/2/3 to do SMC calls with 0, 1, 2 or 3 >> arguments. >> The functions return up to 3 values. >> > This is a lot of code to do something we already do in our code. > > Care to elaborate what the use case is here? In any case, we generally > try to avoid submitting helper libraries like this without the user, > to avoid merging code that is already dead. Sure! With the current interface, there's lots of template code to set up the structure and extract results from it. By passing pointers to the arguments and results into the functions, this patch removes that template code. I can send out a v2 patch set which includes changes to existing SMC calls so the new functions are used. -- Rebecca Cran