[edk2-devel] [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors

Leif Lindholm posted 2 patches 4 years, 10 months ago
Only 0 patches received!
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(-)
[edk2-devel] [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors
Posted by Leif Lindholm 4 years, 10 months ago
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

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42387): https://edk2.groups.io/g/devel/message/42387
Mute This Topic: https://groups.io/mt/32054237/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors
Posted by Philippe Mathieu-Daudé 4 years, 10 months ago
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>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42391): https://edk2.groups.io/g/devel/message/42391
Mute This Topic: https://groups.io/mt/32054237/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors
Posted by Leif Lindholm 4 years, 10 months ago
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

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42507): https://edk2.groups.io/g/devel/message/42507
Mute This Topic: https://groups.io/mt/32054237/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors
Posted by Ard Biesheuvel 4 years, 10 months ago
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>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42390): https://edk2.groups.io/g/devel/message/42390
Mute This Topic: https://groups.io/mt/32054237/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-