From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UMUWt-0000SE-OE for mharc-grub-devel@gnu.org; Sun, 31 Mar 2013 22:31:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMUWn-0000QB-SD for grub-devel@gnu.org; Sun, 31 Mar 2013 22:31:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMUWi-0001Dy-Hk for grub-devel@gnu.org; Sun, 31 Mar 2013 22:31:21 -0400 Received: from mail-ea0-x231.google.com ([2a00:1450:4013:c01::231]:55839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMUWi-0001Dt-BC for grub-devel@gnu.org; Sun, 31 Mar 2013 22:31:16 -0400 Received: by mail-ea0-f177.google.com with SMTP id q14so847716eaj.36 for ; Sun, 31 Mar 2013 19:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; bh=fCj1AsKKX1Sz8XIptpgXHplAHqVT8BcR/ND+5/l+sjQ=; b=pmn1sbbnM2g5blhp1KEvKJHqztA/TjcfnodiqDvwrnfDV0YKGmaWS4YmqbYiZpS8xe cXMQ/DlhPBIRp8Tm3PZODz6TgLFm4etZ+m3+KvCMhlLK/K5VIoPwDDwd+yPN70oPtCtb G6P9OZbtNOW6varlPu1LuUZJxAFaRsDxRguCBlNXBYvmFCoSZj1PiQ+bBfZyCpJ2OBeR pruc62+36cQ5CkD63wmriWNBBq6tGdJh/M3YuuU+i0qoR4xWwV1Hijbx80DOHzts1H2f XgSpf4udfn3TNkN0gL2yxkioJe9AGE2vObv62yG4vyJzNEj2cxlIt2pku6BykYQCVEcA MG7w== X-Received: by 10.14.210.8 with SMTP id t8mr32614593eeo.35.1364783475566; Sun, 31 Mar 2013 19:31:15 -0700 (PDT) Received: from debian.x201.phnet (245-188.1-85.cust.bluewin.ch. [85.1.188.245]) by mx.google.com with ESMTPS id bc1sm18572632eeb.11.2013.03.31.19.31.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 31 Mar 2013 19:31:14 -0700 (PDT) Message-ID: <5158F171.6030702@gmail.com> Date: Mon, 01 Apr 2013 04:31:13 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH 7/7] Add support for ARM UEFI ("EFI") platforms References: In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigE04B080A73857AFC8C9E416F" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::231 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 02:31:24 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE04B080A73857AFC8C9E416F Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > +static grub_uint64_t > +grub_efi_get_time_ms(void) > +{ > + grub_efi_time_t now; > + grub_uint64_t retval; > + grub_efi_status_t status; > + > + status =3D efi_call_2 (grub_efi_system_table->runtime_services->get_= time, > + &now, NULL); > + if (status !=3D GRUB_EFI_SUCCESS) > + { > + grub_printf("No time!\n"); > + return 0; This is about the worse thing you can do. It will make any timeout go wro= ng. > + } > + retval =3D now.year * 365 * 24 * 60 * 60 * 1000; > + retval +=3D now.month * 30 * 24 * 60 * 60 * 1000; > + retval +=3D now.day * 24 * 60 * 60 * 1000; > + retval +=3D now.hour * 60 * 60 * 1000; > + retval +=3D now.minute * 60 * 1000; > + retval +=3D now.second * 1000; > + retval +=3D now.nanosecond / 1000; > +=20 > + grub_dprintf("timer", "timestamp: 0x%llx\n", retval); > + > + return retval; This is almost a verbatim copy of what we had for i386 efi before but it went haywire in many ways. Like jumps forward or backward around end of month or when one sets datetime. Or around the summer/winter timezone transition. Does ARM have anything like TSC? > +static inline grub_size_t > +page_align (grub_size_t size) > +{ > + return (size + (1 << 12) - 1) & (~((1 << 12) - 1)); > +} We already have ALIGN_UP --------------enigE04B080A73857AFC8C9E416F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlFY8XEACgkQNak7dOguQgnEfAEAkB55sHo9wGs97l3pZeLYtPyN ZBM5f7k6Fc3WUwFPEXEA/0DwYk+kGoh22g97/tv5HciV4/wS71OtjjDHdeLhbfWc =NiB8 -----END PGP SIGNATURE----- --------------enigE04B080A73857AFC8C9E416F--