From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.151.62.27; helo=mail-in5.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from mail-in5.apple.com (mail-out5.apple.com [17.151.62.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6247E21E48F50 for ; Tue, 23 Jan 2018 22:50:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1516776981; x=2380690581; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=OqzHrpDF8B6uEaSKfD8+1Gxs6CL/hRBvmeVmmFPqlmQ=; b=KCy7MJOvJevFt+O/2JJ5I44cyp7ZtuMsWXJqoW09+QpiWjJbL5392AaUg64ssIr0 LEcjD4tJ0h363drNzK0gKg8WjMSvHHFTvrbnzL9PMpERMwE7TcNVI3QC26xJeH5B PZktgo5kfmYpshdFCEIyRrNN+lpZ4nNDyc0UY+bASlTC4WJnvcCZKT0zMPcf1iGG 4yLCjrOhBX0+aKk2YAnnj6ViP8zC8TPoeQq/usXwvV2iDE8uF2JFX5goD/5tv/wP 54Qr7BzmNXQby5CfHm1rCM5V+POEymGVxTrBiZV0IW/7ZRGp3UrKLyAY2cFFJcp6 IPm1ZoYekGWFZQdC6tQ32w==; Received: from relay8.apple.com (relay8.apple.com [17.128.113.102]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail-in5.apple.com (Apple Secure Mail Relay) with SMTP id 17.92.05022.51E286A5; Tue, 23 Jan 2018 22:56:21 -0800 (PST) X-AuditID: 11973e13-157ff7000000139e-81-5a682e15ee45 Received: from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com [17.128.115.80]) by relay8.apple.com (Apple SCV relay) with SMTP id 4D.BE.22651.41E286A5; Tue, 23 Jan 2018 22:56:20 -0800 (PST) MIME-version: 1.0 Received: from [17.234.105.63] by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.1.20180104 64bit (built Jan 4 2018)) with ESMTPSA id <0P31009Z9SLW4860@nwk-mmpp-sz09.apple.com>; Tue, 23 Jan 2018 22:56:20 -0800 (PST) Sender: afish@apple.com From: Andrew Fish X-Priority: 3 In-reply-to: <5a68284f.ce336b0a.101b2.a31e@mx.google.com> Date: Tue, 23 Jan 2018 22:55:30 -0800 Cc: "edk2-devel@lists.01.org" Message-id: <6A3ED54F-6755-4C6E-B6AD-53F55219DC30@apple.com> References: <5a68284f.ce336b0a.101b2.a31e@mx.google.com> To: JUNWEN JIA X-Mailer: Apple Mail (2.3445.5.20) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGLMWRmVeSWpSXmKPExsUi2FCYpiuqlxFlcOAkk8WeQ0eZLdoW5Dgw eeycdZfdo3v2P5YApigum5TUnMyy1CJ9uwSujL97LzMW3OCv+L5jO1MD4xaeLkZODgkBE4k/ 52YwdTFycQgJrGGS+HX2MitM4l/TJRaIxEFGiZNvPjGCJHgFBCV+TL4HlODgYBZQl5gyJRei 5iujRMePuewgNcIC4hLvzmxihrDVJC5tuMYCYrMJKEusmP+BHWIBr8SM9qdgcU4BS4mpyzeA zWcRUJX4eWwlWA2zgLnEjAtfmCBsbYkn7y6wQtxgI3Gh7ypYXEjAQmLDsotgvSJA9+zY9I8N Yr6SxPTvt9lAjpMQ6GCTOL1rGvMERpFZSH6YhfDDLCQrFjAyr2IUyk3MzNHNzDPVSywoyEnV S87P3cQICvjpdsI7GE+vsjrEKMDBqMTD22CWHiXEmlhWXJl7iFGag0VJnHeDfFqUkEB6Yklq dmpqQWpRfFFpTmrxIUYmDk6pBkYtx9s9C/wrY5XDD/zbnzd301fRM45ej6erRQf3TEpS8piS flb7zuHXsdfWXnVVO/Jj0vMp+SsS+CcFrEkKzvugMSt+9+0XX7yXrD71IWyChsP/e0Uzfk0t zJpgJ7xVPdFbb8lN7wRHT62eBftXfredz34kpFjwS+P6v0lNxYmfKzkm1e2qTJilxFKckWio xVxUnAgAwM9EPVkCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJLMWRmVeSWpSXmKPExsUi2FAcoCuilxFlcGGzjcWeQ0eZLdoW5Dgw eeycdZfdo3v2P5YApigum5TUnMyy1CJ9uwSujL97LzMW3OCv+L5jO1MD4xaeLkZODgkBE4l/ TZdYuhi5OIQEDjJKnHzziREkwSsgKPFj8j2gBAcHs4C6xJQpuRA1XxklOn7MZQepERYQl3h3 ZhMzhK0mcWnDNRYQm01AWWLF/A/sEAt4JWa0PwWLcwpYSkxdvgFsPouAqsTPYyvBapgFzCVm XPjCBGFrSzx5d4EV4gYbiQt9V8HiQgIWEhuWXQTrFQG6Z8emf2wQ85Ukpn+/zTaBUXAWkrNn IZw9C8nUBYzMqxgFilJzEist9BILCnJS9ZLzczcxggO0MG0HY9Nyq0OMAhyMSjy8DWbpUUKs iWXFlbmHGCU4mJVEePNYgUK8KYmVValF+fFFpTmpxYcYpTlYlMR5E26kRAkJpCeWpGanphak FsFkmTg4pRoYd6gtXxMesY9hyutHU9inBv4JOuTxtVLTvPFei8DCF4b9iS8zHjExBM5j3LLo z5l7jMUlsr3p6tVmdorbOK7trtvyxT3bJqou5NgcuVhTf/2ZspnN6i5Js38JrjwQHT3HoaEq V7rn/INfW5fOY+l50djJ+311zJ9Xcy7071/ob3tuwbxjj7rLlViKMxINtZiLihMBlW+eHEwC AAA= Subject: Re: EDK debug question X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 06:50:53 -0000 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable Yea don't do that.=20 1st off EFI does not assume the PC hardware from 1984 exists in your = system like the old PC BIOS.=20 There are EFI services that abstract these hardware features.=20 gRT->SetWakeupTime()=20 gRT->ResetSystem() You can lookup in the Services - Runtime Services chapter of the UEFI = Spec for details.=20 To use gRT you will need to #include = and list = UefiRuntimeServicesTableLib in the [LibraryClasses] section of the .INF = file to make the gRT global compile and link in your App.=20 Also even though you should NOT do this you could write your RTC code = using the IoLib via inb is IoRead8() and outb is IoWrite8() C API and = you don't have to write it in assembler.=20 Thanks, Andrew Fish > On Jan 23, 2018, at 10:31 PM, JUNWEN JIA = wrote: >=20 > Hi, Andrew: > Thanks for your reply. What I was trying is to restart my computer = after 1 minute shutdown in shell. That is why I need to get .efi file = through EDK. > The following is the assembly language I wrote in Reboot.asm, and I = put this file in BaseLib->Ia32,along with Reboot.asm, Reboot.c.=20 > .code > Reboot PROC > mov al,0bh > out 70h,al > mov al,20h > out 71h,al ;enable RTC interrupt > mov al,01h > out 70h,al > mov al,00h > out 71h,al=20 > mov al,03h > out 70h,al > mov al,01h > out 71h,al=20 > mov al,05h > out 70h,al > mov al,12h=20 > out 71h,al ;wirte cmos alarm > mov al,00h > out 70h,al > mov al,00h > out 71h,al=20 > mov al,02h > out 70h,al > mov al,00h > out 71h,al=20 > mov al,04h > out 70h,al > mov al,12h=20 > out 71h,al ;set cmos time > ret=20 > Reboot ENDP > END >=20 >=20 > Best regards! >=20 > =E5=8F=91=E9=80=81=E8=87=AA Windows 10 =E7=89=88=E9=82=AE=E4=BB=B6=E5=BA= =94=E7=94=A8 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel