public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors
@ 2019-06-13 16:18 Leif Lindholm
  2019-06-13 16:20 ` Ard Biesheuvel
  2019-06-13 16:21 ` [edk2-devel] " Philippe Mathieu-Daudé
  0 siblings, 2 replies; 4+ messages in thread
From: Leif Lindholm @ 2019-06-13 16:18 UTC (permalink / raw)
  To: devel; +Cc: ard.biesheuvel, Alexei Fedorov

TimeBaseLib EfiTimeToEpoch returns a UINTN, meaning its behaviour differs
between architectures. This upsets VS2017 when building for 32-bit ARM
(and likely would if building for IA32 too). Similarly, some internal
calculations used UINTN for operating on fixed-size fields, giving
further issues.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=997

PL031RealTimeClockLib needed an adjustment to support the resulting API
change, but frankly that change just makes the code agree with the
comments surrounding it.

This series cleans up the type handling Visual Studio complains about.
This is not a proper overhaul of the library, just a fix of encountered
build errors.

Leif Lindholm (2):
  ArmPlatformPkg: use UINT32 epoch second counter
  EmbeddedPkg: improve TimeBaseLib type safety

 ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c |  3 ++-
 EmbeddedPkg/Include/Library/TimeBaseLib.h                            |  4 ++--
 EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c                        | 18 +++++++++---------
 3 files changed, 13 insertions(+), 12 deletions(-)

Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
-- 
2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors
  2019-06-13 16:18 [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors Leif Lindholm
@ 2019-06-13 16:20 ` Ard Biesheuvel
  2019-06-13 16:21 ` [edk2-devel] " Philippe Mathieu-Daudé
  1 sibling, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2019-06-13 16:20 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: edk2-devel-groups-io, Alexei Fedorov

On Thu, 13 Jun 2019 at 18:18, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>
> TimeBaseLib EfiTimeToEpoch returns a UINTN, meaning its behaviour differs
> between architectures. This upsets VS2017 when building for 32-bit ARM
> (and likely would if building for IA32 too). Similarly, some internal
> calculations used UINTN for operating on fixed-size fields, giving
> further issues.
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=997
>
> PL031RealTimeClockLib needed an adjustment to support the resulting API
> change, but frankly that change just makes the code agree with the
> comments surrounding it.
>
> This series cleans up the type handling Visual Studio complains about.
> This is not a proper overhaul of the library, just a fix of encountered
> build errors.
>
> Leif Lindholm (2):
>   ArmPlatformPkg: use UINT32 epoch second counter
>   EmbeddedPkg: improve TimeBaseLib type safety
>

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors
  2019-06-13 16:18 [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors Leif Lindholm
  2019-06-13 16:20 ` Ard Biesheuvel
@ 2019-06-13 16:21 ` Philippe Mathieu-Daudé
  2019-06-17 11:06   ` Leif Lindholm
  1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-13 16:21 UTC (permalink / raw)
  To: devel, leif.lindholm; +Cc: ard.biesheuvel, Alexei Fedorov

On 6/13/19 6:18 PM, Leif Lindholm wrote:
> TimeBaseLib EfiTimeToEpoch returns a UINTN, meaning its behaviour differs
> between architectures. This upsets VS2017 when building for 32-bit ARM
> (and likely would if building for IA32 too). Similarly, some internal
> calculations used UINTN for operating on fixed-size fields, giving
> further issues.
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=997
> 
> PL031RealTimeClockLib needed an adjustment to support the resulting API
> change, but frankly that change just makes the code agree with the
> comments surrounding it.
> 
> This series cleans up the type handling Visual Studio complains about.
> This is not a proper overhaul of the library, just a fix of encountered
> build errors.
> 
> Leif Lindholm (2):
>   ArmPlatformPkg: use UINT32 epoch second counter
>   EmbeddedPkg: improve TimeBaseLib type safety
> 
>  ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c |  3 ++-
>  EmbeddedPkg/Include/Library/TimeBaseLib.h                            |  4 ++--
>  EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c                        | 18 +++++++++---------
>  3 files changed, 13 insertions(+), 12 deletions(-)
> 
> Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
> 

Series:
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors
  2019-06-13 16:21 ` [edk2-devel] " Philippe Mathieu-Daudé
@ 2019-06-17 11:06   ` Leif Lindholm
  0 siblings, 0 replies; 4+ messages in thread
From: Leif Lindholm @ 2019-06-17 11:06 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: devel, ard.biesheuvel, Alexei Fedorov

On Thu, Jun 13, 2019 at 06:21:31PM +0200, Philippe Mathieu-Daudé wrote:
> On 6/13/19 6:18 PM, Leif Lindholm wrote:
> > TimeBaseLib EfiTimeToEpoch returns a UINTN, meaning its behaviour differs
> > between architectures. This upsets VS2017 when building for 32-bit ARM
> > (and likely would if building for IA32 too). Similarly, some internal
> > calculations used UINTN for operating on fixed-size fields, giving
> > further issues.
> > 
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=997
> > 
> > PL031RealTimeClockLib needed an adjustment to support the resulting API
> > change, but frankly that change just makes the code agree with the
> > comments surrounding it.
> > 
> > This series cleans up the type handling Visual Studio complains about.
> > This is not a proper overhaul of the library, just a fix of encountered
> > build errors.
> > 
> > Leif Lindholm (2):
> >   ArmPlatformPkg: use UINT32 epoch second counter
> >   EmbeddedPkg: improve TimeBaseLib type safety
> > 
> >  ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c |  3 ++-
> >  EmbeddedPkg/Include/Library/TimeBaseLib.h                            |  4 ++--
> >  EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c                        | 18 +++++++++---------
> >  3 files changed, 13 insertions(+), 12 deletions(-)
> > 
> > Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
> > 
> 
> Series:
> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>

Thanks!
Series pushed as 2378ea55151e..1d7571166fa8.

/
    Leif

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-17 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-13 16:18 [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors Leif Lindholm
2019-06-13 16:20 ` Ard Biesheuvel
2019-06-13 16:21 ` [edk2-devel] " Philippe Mathieu-Daudé
2019-06-17 11:06   ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox