History log of /u-boot/lib/trace.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 467382ca 14-Dec-2023 Tom Rini <trini@konsulko.com>

lib: Remove <common.h> inclusion from these files

After some header file cleanups to add missing include files, remove
common.h from all files in the lib directory. This primarily means just
dropping the line but in a few cases we need to add in other header
files now.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>

# ccea96f4 02-Aug-2023 Shiji Yang <yangshiji66@outlook.com>

treewide: unify the linker symbol reference format

Now all linker symbols are declared as type char[]. Though we can
reference the address via both the array name 'var' and its address
'&var'. It's better to unify them to avoid confusing developers.
This patch converts all '&var' linker symbol refrences to the most
commonly used format 'var'.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# 852d4dbd 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Detect an infinite loop

If something is wrong with a board's timer function such that it calls
functions not marked with notrace, U-Boot will hang.

Detect this, print a message and disable the trace.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 80f91558 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Correct the relocation handover with buffer overflow

When the early trace buffer overflows it leaves a gap in the trace buffer
between where the actual data finished and where it would have finished if
there were enough buffer space. This results in corrupted output.

Adjust the logic to resolve this and add a message when the buffer
overflows.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 9dd665ad 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Show a few more stats about tracing

Add a few more useful items into the output. Update the buffers to use hex
consistently.

Signed-off-by: Simon Glass <sjg@chromium.org>

# daca66d5 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Track the minimum stack depth

The trace does not necessarily start at the top level, so we can see it
go negative. Track this so that we can show an accurate value for the
stack depth.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c3d91812 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Reduce the number of function sites

Given that the compiler adds two function calls into each function, the
current spacing is overkill. Drop it down to 16 bytes per function, which
is still plenty. This saves some space in the trace buffer.

Also move the calculation into a function, so it is common code. Add a
check for gd->mon_len being unset, which breaks tracing.

Signed-off-by: Simon Glass <sjg@chromium.org>

# d9044e53 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Update the file header

It seems better to put the TEXT_BASE value in the file header rather than
in an entry record. While it is true that there is a separate base for
pre-relocation, this can be handled by using offsets in the file.

It is useful to have a version number in case we need to change the trace
format again.

Update the header to make these changes.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bebc1410 21-Dec-2022 Simon Glass <sjg@chromium.org>

trace: Move trace pointer to data section

This can be written before relocation. Move it to the data section, since
accessing BSS before relocation is not permitted.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 33c60a38 21-Dec-2022 Simon Glass <sjg@chromium.org>

trace: Use notrace for short

The attribute syntax is quite verbose. Use the macro provided for this
purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 98463903 20-Oct-2022 Simon Glass <sjg@chromium.org>

Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE

The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE
and this makes it imposible to use CONFIG_VAL().

Rename it to resolve this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 236f2ec4 20-May-2021 Marek Behún <kabel@kernel.org>

treewide: Convert macro and uses of __section(foo) to __section("foo")

This commit does the same thing as Linux commit 33def8498fdd.

Use a more generic form for __section that requires quotes to avoid
complications with clang and gcc differences.

Remove the quote operator # from compiler_attributes.h __section macro.

Convert all unquoted __section(foo) uses to quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>

# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>

# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 0eb25b61 22-Mar-2015 Joe Hershberger <joe.hershberger@ni.com>

common: Make sure arch-specific map_sysmem() is defined

In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.

Also split the non-arch specific functions out of common.h

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# b2e16a85 11-Jun-2013 Simon Glass <sjg@chromium.org>

Add trace library

Add a library which supports tracing of execution using built-in gcc
features and a microsecond timer. This can be used to record a list of
function which are executed, along with a timestamp for each. Later
this information can be sent to the host for processing.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ccea96f4 02-Aug-2023 Shiji Yang <yangshiji66@outlook.com>

treewide: unify the linker symbol reference format

Now all linker symbols are declared as type char[]. Though we can
reference the address via both the array name 'var' and its address
'&var'. It's better to unify them to avoid confusing developers.
This patch converts all '&var' linker symbol refrences to the most
commonly used format 'var'.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# 852d4dbd 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Detect an infinite loop

If something is wrong with a board's timer function such that it calls
functions not marked with notrace, U-Boot will hang.

Detect this, print a message and disable the trace.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 80f91558 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Correct the relocation handover with buffer overflow

When the early trace buffer overflows it leaves a gap in the trace buffer
between where the actual data finished and where it would have finished if
there were enough buffer space. This results in corrupted output.

Adjust the logic to resolve this and add a message when the buffer
overflows.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 9dd665ad 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Show a few more stats about tracing

Add a few more useful items into the output. Update the buffers to use hex
consistently.

Signed-off-by: Simon Glass <sjg@chromium.org>

# daca66d5 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Track the minimum stack depth

The trace does not necessarily start at the top level, so we can see it
go negative. Track this so that we can show an accurate value for the
stack depth.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c3d91812 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Reduce the number of function sites

Given that the compiler adds two function calls into each function, the
current spacing is overkill. Drop it down to 16 bytes per function, which
is still plenty. This saves some space in the trace buffer.

Also move the calculation into a function, so it is common code. Add a
check for gd->mon_len being unset, which breaks tracing.

Signed-off-by: Simon Glass <sjg@chromium.org>

# d9044e53 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Update the file header

It seems better to put the TEXT_BASE value in the file header rather than
in an entry record. While it is true that there is a separate base for
pre-relocation, this can be handled by using offsets in the file.

It is useful to have a version number in case we need to change the trace
format again.

Update the header to make these changes.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bebc1410 21-Dec-2022 Simon Glass <sjg@chromium.org>

trace: Move trace pointer to data section

This can be written before relocation. Move it to the data section, since
accessing BSS before relocation is not permitted.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 33c60a38 21-Dec-2022 Simon Glass <sjg@chromium.org>

trace: Use notrace for short

The attribute syntax is quite verbose. Use the macro provided for this
purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 98463903 20-Oct-2022 Simon Glass <sjg@chromium.org>

Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE

The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE
and this makes it imposible to use CONFIG_VAL().

Rename it to resolve this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 236f2ec4 20-May-2021 Marek Behún <kabel@kernel.org>

treewide: Convert macro and uses of __section(foo) to __section("foo")

This commit does the same thing as Linux commit 33def8498fdd.

Use a more generic form for __section that requires quotes to avoid
complications with clang and gcc differences.

Remove the quote operator # from compiler_attributes.h __section macro.

Convert all unquoted __section(foo) uses to quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>

# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>

# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 0eb25b61 22-Mar-2015 Joe Hershberger <joe.hershberger@ni.com>

common: Make sure arch-specific map_sysmem() is defined

In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.

Also split the non-arch specific functions out of common.h

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# b2e16a85 11-Jun-2013 Simon Glass <sjg@chromium.org>

Add trace library

Add a library which supports tracing of execution using built-in gcc
features and a microsecond timer. This can be used to record a list of
function which are executed, along with a timestamp for each. Later
this information can be sent to the host for processing.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 852d4dbd 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Detect an infinite loop

If something is wrong with a board's timer function such that it calls
functions not marked with notrace, U-Boot will hang.

Detect this, print a message and disable the trace.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 80f91558 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Correct the relocation handover with buffer overflow

When the early trace buffer overflows it leaves a gap in the trace buffer
between where the actual data finished and where it would have finished if
there were enough buffer space. This results in corrupted output.

Adjust the logic to resolve this and add a message when the buffer
overflows.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 9dd665ad 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Show a few more stats about tracing

Add a few more useful items into the output. Update the buffers to use hex
consistently.

Signed-off-by: Simon Glass <sjg@chromium.org>

# daca66d5 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Track the minimum stack depth

The trace does not necessarily start at the top level, so we can see it
go negative. Track this so that we can show an accurate value for the
stack depth.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c3d91812 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Reduce the number of function sites

Given that the compiler adds two function calls into each function, the
current spacing is overkill. Drop it down to 16 bytes per function, which
is still plenty. This saves some space in the trace buffer.

Also move the calculation into a function, so it is common code. Add a
check for gd->mon_len being unset, which breaks tracing.

Signed-off-by: Simon Glass <sjg@chromium.org>

# d9044e53 15-Jan-2023 Simon Glass <sjg@chromium.org>

trace: Update the file header

It seems better to put the TEXT_BASE value in the file header rather than
in an entry record. While it is true that there is a separate base for
pre-relocation, this can be handled by using offsets in the file.

It is useful to have a version number in case we need to change the trace
format again.

Update the header to make these changes.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bebc1410 21-Dec-2022 Simon Glass <sjg@chromium.org>

trace: Move trace pointer to data section

This can be written before relocation. Move it to the data section, since
accessing BSS before relocation is not permitted.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 33c60a38 21-Dec-2022 Simon Glass <sjg@chromium.org>

trace: Use notrace for short

The attribute syntax is quite verbose. Use the macro provided for this
purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 98463903 20-Oct-2022 Simon Glass <sjg@chromium.org>

Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE

The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE
and this makes it imposible to use CONFIG_VAL().

Rename it to resolve this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 236f2ec4 20-May-2021 Marek Behún <kabel@kernel.org>

treewide: Convert macro and uses of __section(foo) to __section("foo")

This commit does the same thing as Linux commit 33def8498fdd.

Use a more generic form for __section that requires quotes to avoid
complications with clang and gcc differences.

Remove the quote operator # from compiler_attributes.h __section macro.

Convert all unquoted __section(foo) uses to quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>

# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>

# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 0eb25b61 22-Mar-2015 Joe Hershberger <joe.hershberger@ni.com>

common: Make sure arch-specific map_sysmem() is defined

In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.

Also split the non-arch specific functions out of common.h

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# b2e16a85 11-Jun-2013 Simon Glass <sjg@chromium.org>

Add trace library

Add a library which supports tracing of execution using built-in gcc
features and a microsecond timer. This can be used to record a list of
function which are executed, along with a timestamp for each. Later
this information can be sent to the host for processing.

Signed-off-by: Simon Glass <sjg@chromium.org>

# bebc1410 21-Dec-2022 Simon Glass <sjg@chromium.org>

trace: Move trace pointer to data section

This can be written before relocation. Move it to the data section, since
accessing BSS before relocation is not permitted.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 33c60a38 21-Dec-2022 Simon Glass <sjg@chromium.org>

trace: Use notrace for short

The attribute syntax is quite verbose. Use the macro provided for this
purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 98463903 20-Oct-2022 Simon Glass <sjg@chromium.org>

Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE

The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE
and this makes it imposible to use CONFIG_VAL().

Rename it to resolve this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 236f2ec4 20-May-2021 Marek Behún <kabel@kernel.org>

treewide: Convert macro and uses of __section(foo) to __section("foo")

This commit does the same thing as Linux commit 33def8498fdd.

Use a more generic form for __section that requires quotes to avoid
complications with clang and gcc differences.

Remove the quote operator # from compiler_attributes.h __section macro.

Convert all unquoted __section(foo) uses to quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>

# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>

# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 0eb25b61 22-Mar-2015 Joe Hershberger <joe.hershberger@ni.com>

common: Make sure arch-specific map_sysmem() is defined

In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.

Also split the non-arch specific functions out of common.h

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# b2e16a85 11-Jun-2013 Simon Glass <sjg@chromium.org>

Add trace library

Add a library which supports tracing of execution using built-in gcc
features and a microsecond timer. This can be used to record a list of
function which are executed, along with a timestamp for each. Later
this information can be sent to the host for processing.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 98463903 20-Oct-2022 Simon Glass <sjg@chromium.org>

Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE

The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE
and this makes it imposible to use CONFIG_VAL().

Rename it to resolve this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 236f2ec4 20-May-2021 Marek Behún <kabel@kernel.org>

treewide: Convert macro and uses of __section(foo) to __section("foo")

This commit does the same thing as Linux commit 33def8498fdd.

Use a more generic form for __section that requires quotes to avoid
complications with clang and gcc differences.

Remove the quote operator # from compiler_attributes.h __section macro.

Convert all unquoted __section(foo) uses to quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>

# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>

# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 0eb25b61 22-Mar-2015 Joe Hershberger <joe.hershberger@ni.com>

common: Make sure arch-specific map_sysmem() is defined

In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.

Also split the non-arch specific functions out of common.h

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# b2e16a85 11-Jun-2013 Simon Glass <sjg@chromium.org>

Add trace library

Add a library which supports tracing of execution using built-in gcc
features and a microsecond timer. This can be used to record a list of
function which are executed, along with a timestamp for each. Later
this information can be sent to the host for processing.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 236f2ec4 20-May-2021 Marek Behún <marek.behun@nic.cz>

treewide: Convert macro and uses of __section(foo) to __section("foo")

This commit does the same thing as Linux commit 33def8498fdd.

Use a more generic form for __section that requires quotes to avoid
complications with clang and gcc differences.

Remove the quote operator # from compiler_attributes.h __section macro.

Convert all unquoted __section(foo) uses to quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>

# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>

# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>

# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 0eb25b61 22-Mar-2015 Joe Hershberger <joe.hershberger@ni.com>

common: Make sure arch-specific map_sysmem() is defined

In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.

Also split the non-arch specific functions out of common.h

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# b2e16a85 11-Jun-2013 Simon Glass <sjg@chromium.org>

Add trace library

Add a library which supports tracing of execution using built-in gcc
features and a microsecond timer. This can be used to record a list of
function which are executed, along with a timestamp for each. Later
this information can be sent to the host for processing.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d3d6afae 14-Oct-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register on RISC-V

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f642cb2 27-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: clang compatible handling of gd register

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

Use function set_gd() for setting the register on ARM.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# e605ab84 01-Jan-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: provide Sphinx style comments

Correct some function comments. Convert to Sphinx style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1045315d 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 2b7a3882 14-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: do not limit trace buffer to 2GiB

There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# da0fb5fd 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: make call depth limit customizable

Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.

Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# a2fa38da 02-Jun-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

trace: conserve gd register

An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c6eb075 08-Apr-2019 Simon Glass <sjg@chromium.org>

Convert CONFIG_TRACE_BUFFER_SIZE et al to Kconfig

This converts the following to Kconfig:
CONFIG_TRACE_BUFFER_SIZE
CONFIG_TRACE_EARLY_SIZE
CONFIG_TRACE_EARLY
CONFIG_TRACE_EARLY_ADDR

Signed-off-by: Simon Glass <sjg@chromium.org>


# f564d096 08-Apr-2019 Simon Glass <sjg@chromium.org>

trace: Tidy up error returns

At present many functions in this file return -1. Update them to return a
valid error code. Also tidy up the 'return' statements at the same time,
since these should have a blank line before them.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 0eb25b61 22-Mar-2015 Joe Hershberger <joe.hershberger@ni.com>

common: Make sure arch-specific map_sysmem() is defined

In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.

Also split the non-arch specific functions out of common.h

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>


# b2e16a85 11-Jun-2013 Simon Glass <sjg@chromium.org>

Add trace library

Add a library which supports tracing of execution using built-in gcc
features and a microsecond timer. This can be used to record a list of
function which are executed, along with a timestamp for each. Later
this information can be sent to the host for processing.

Signed-off-by: Simon Glass <sjg@chromium.org>