From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mx.groups.io with SMTP id smtpd.web09.1421.1635804738666594170 for ; Mon, 01 Nov 2021 15:12:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20210112.gappssmtp.com header.s=20210112 header.b=XQW8Bpz8; spf=pass (domain: nuviainc.com, ip: 209.85.214.172, mailfrom: rebecca@nuviainc.com) Received: by mail-pl1-f172.google.com with SMTP id f8so12861217plo.12 for ; Mon, 01 Nov 2021 15:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iSTDbF0Z8cGYWb8/jfZRBGNHQZ7csh3PFl9JiAcn4wY=; b=XQW8Bpz8uo8Tdocqs69A6lVypsYrx2JCUjKDds6Ma3P2R4oru2wKJDeQvz+KFMO55F /MBeHP8ZeCEgs3japFGY0XCXlWpKfZCWVbMIp1NEbi7gdIMPdOuw2ELTj/xP4+vc6SfD DumQrDIBLMydXBAFnjygY0u08D03TjD+yCyDpSKSQjx13rV3D9Q12YTHhddkVzqGokFL JBmDIJTUAkkRdLYIzszC58AgyrOFaVai6vYWa6dXkQRZsMNQdlY+kh/XIU35OOvAhVNc qHbhNoRkuE6qD0cFnPseHKBHWBdJ2j/YzHVhODjXXajEuFjdz4a4IfWoeCgM55g0r1/s 9Ggg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iSTDbF0Z8cGYWb8/jfZRBGNHQZ7csh3PFl9JiAcn4wY=; b=korlA4WJA/iymb8CbZi6XX8r4+x6Siu8Bnh0sT+nyqoSLg0kHLbP7j3KKIdQT251ss +r2VVs0LfsMUODGt9bXdOmUZ1pxWJPOdFkwhQJ2iuePC/aR/MMWvRCq8tDTaZCOjEV8y 7Wfw29QY8IjDjvdqn2syjcRdWvyhuzhLvnRzhQ9WVv1W4P/qwfEUyXonb4Sma0BoVthK t8OH/EuCcmZ9Mw5r+Ow3FoZt0j7n5bqTLt9gwyuP2MEf9++dI5NrFUXDcfEpw4GdX+Lx CRu/rcV9Rzv1JnPUcWPVVwnO1WqrTqjuuE2mILYZTryzG6Nq2KTUucaRN7OKBJi0us4/ /BzQ== X-Gm-Message-State: AOAM532KJxW1C71wMlPSYdryburqQz9j9l+239q+aZm0Fn/SRNdKJcQX 0xfWog6m3E5HvR9uk08MOfbX3GtMWYtz0mQaH9xHoYSRRB6+YtNHfD03qsqVX3Y0IHHbgnp/+R3 RtmmdhEe5KIaif41p70MFor7666NFP0SbsgUnEO4pygeaUwE1Wtc1uha1mEK7wyBccquPAw== X-Google-Smtp-Source: ABdhPJzy4YNVW/wUSO3CqGMtymk+tEtmpFJEQGLkzb+OhCv0k1vNkFBcwiXrmzRXI1RK9MM6nsQEfA== X-Received: by 2002:a17:90a:bd0f:: with SMTP id y15mr1917480pjr.186.1635804737617; Mon, 01 Nov 2021 15:12:17 -0700 (PDT) Return-Path: Received: from linbox.ba.nuviainc.com (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id z10sm17028455pfh.106.2021.11.01.15.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 15:12:17 -0700 (PDT) From: "Rebecca Cran" To: devel@edk2.groups.io, Sami Mujawar , Ard Biesheuvel , Gerd Hoffmann , Samer El-Haj-Mahmoud , Leif Lindholm Cc: Rebecca Cran Subject: [PATCH v2 0/2] ArmPkg: Add SMC helper functions Date: Mon, 1 Nov 2021 16:11:51 -0600 Message-Id: <20211101221153.18620-1-rebecca@nuviainc.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To reduce the amount of template code, introduce SMC helper functions. Update ArmSmcPsciResetSystemLib and Universal/Smbios to use them. Changes from v1 to v2: Added a patch to update code to use the new functions. Rebecca Cran (2): ArmPkg: Add SMC helper functions ArmPkg: Update SMC calls to use the new ArmCallSmc1/2/3/4 functions ArmPkg/Include/Library/ArmSmcLib.h | 73 ++++++++++++ ArmPkg/Library/ArmSmcLib/ArmSmc.c | 122 ++++++++++++++++++++ ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf | 3 + ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c | 85 ++++++++++++++ ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.c | 10 +- ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c | 31 ++--- 6 files changed, 297 insertions(+), 27 deletions(-) create mode 100644 ArmPkg/Library/ArmSmcLib/ArmSmc.c -- 2.31.1