From patchwork Fri Jun 21 08:05:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Harkin X-Patchwork-Id: 18043 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3220C25A2B for ; Fri, 21 Jun 2013 08:05:50 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id f14sf937576qak.7 for ; Fri, 21 Jun 2013 01:05:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=10Q5cjEvhAKmZe1KUOuN6byc4TcL3g3CM0gGQOSRSQQ=; b=WBlxFzeHrrHNnbERcGbkwYxAJGbMqLzGM+mGZzacZF8c4nGB5Um8ZSQpKZ1DU3IGcb JgXGf9v6uJ+L1JenyI7Edx3V85o92IhL+rUyrmxBQp8UYWknvjKexChpciau+AK4PsGX yRcF5xj9Y+27MjJQ4UfzF7gXzsFw1dTrWe8QT8ynrIW4zgGokvTE7YCYfHGe23Wv/FAQ 28a8djdmBEpgsoCU2FiMkoN+b4XtXsiXIx2lB2v4nD2hBfncYK7KawUSS56JZoRMmuti cDY1nCJ9jylYoLJmNMdxfMr/JsO8EN+1zf1yqwLZIZLipcYvt1aplBtTWwVe+SZhzNT7 16Yw== X-Received: by 10.224.59.205 with SMTP id m13mr12131034qah.7.1371801949901; Fri, 21 Jun 2013 01:05:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.107.66 with SMTP id ha2ls1041432qeb.56.gmail; Fri, 21 Jun 2013 01:05:49 -0700 (PDT) X-Received: by 10.52.176.10 with SMTP id ce10mr4277347vdc.26.1371801949714; Fri, 21 Jun 2013 01:05:49 -0700 (PDT) Received: from mail-vb0-x232.google.com (mail-vb0-x232.google.com [2607:f8b0:400c:c02::232]) by mx.google.com with ESMTPS id ek9si1235319vdb.37.2013.06.21.01.05.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 01:05:49 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::232; Received: by mail-vb0-f50.google.com with SMTP id w16so5552793vbb.37 for ; Fri, 21 Jun 2013 01:05:49 -0700 (PDT) X-Received: by 10.52.77.5 with SMTP id o5mr833721vdw.46.1371801949626; Fri, 21 Jun 2013 01:05:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp51560veb; Fri, 21 Jun 2013 01:05:48 -0700 (PDT) X-Received: by 10.194.174.38 with SMTP id bp6mr8403869wjc.83.1371801947979; Fri, 21 Jun 2013 01:05:47 -0700 (PDT) Received: from mail-we0-x230.google.com (mail-we0-x230.google.com [2a00:1450:400c:c03::230]) by mx.google.com with ESMTPS id w6si736013wje.131.2013.06.21.01.05.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 01:05:47 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::230 is neither permitted nor denied by best guess record for domain of ryan.harkin@linaro.org) client-ip=2a00:1450:400c:c03::230; Received: by mail-we0-f176.google.com with SMTP id t56so6026922wes.7 for ; Fri, 21 Jun 2013 01:05:47 -0700 (PDT) X-Received: by 10.194.60.5 with SMTP id d5mr8339454wjr.26.1371801947587; Fri, 21 Jun 2013 01:05:47 -0700 (PDT) Received: from qpc.lan (82-69-54-187.dsl.in-addr.zen.co.uk. [82.69.54.187]) by mx.google.com with ESMTPSA id ay7sm21069904wib.9.2013.06.21.01.05.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 01:05:47 -0700 (PDT) From: Ryan Harkin To: ryan.harkin@linaro.org, edk2-devel@lists.sourceforge.net, patches@linaro.org, boot-architecture@lists.linaro.org, olivier.martin@arm.com Subject: [PATCH 7/9] ArmPlatformPkg/Bds: Add Reboot and Shutdown options to main menu Date: Fri, 21 Jun 2013 09:05:20 +0100 Message-Id: <1371801922-15142-8-git-send-email-ryan.harkin@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371801922-15142-1-git-send-email-ryan.harkin@linaro.org> References: <1371801922-15142-1-git-send-email-ryan.harkin@linaro.org> X-Gm-Message-State: ALoCoQk+7splR30flxmd9b4XmdJLffyyDzeBl9KM6yhTzQPg7AtXtKk+wFmIKuKKSysvcBh68BCa X-Original-Sender: ryan.harkin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add Reboot and Shutdown options to the main BDS menu so that users can control the platform remotely without having to physically reboot/shutdown the board. Signed-off-by: Ryan Harkin --- ArmPlatformPkg/Bds/BootMenu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c index 4094d41..09e1075 100644 --- a/ArmPlatformPkg/Bds/BootMenu.c +++ b/ArmPlatformPkg/Bds/BootMenu.c @@ -614,12 +614,32 @@ BootShell ( return Status; } +EFI_STATUS +Reboot ( + IN LIST_ENTRY *BootOptionsList + ) +{ + gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL); + return EFI_UNSUPPORTED; +} + +EFI_STATUS +Shutdown ( + IN LIST_ENTRY *BootOptionsList + ) +{ + gRT->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL); + return EFI_UNSUPPORTED; +} + struct BOOT_MAIN_ENTRY { CONST CHAR16* Description; EFI_STATUS (*Callback) (IN LIST_ENTRY *BootOptionsList); } BootMainEntries[] = { { L"Boot Manager", BootMenuManager }, { L"Shell", BootShell }, + { L"Reboot", Reboot }, + { L"Shutdown", Shutdown }, };