<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/os.h, branch v2023.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>sandbox: Add missing comments for os_alarm()</title>
<updated>2022-11-07T23:24:30+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-10-30T01:47:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6ca4d5b96b54bdd6086c084631500e918b37ceb7'/>
<id>6ca4d5b96b54bdd6086c084631500e918b37ceb7</id>
<content type='text'>
Add the documentation to avoid a warning with 'make htmldocs'.

Fixes: 10107efedd5 ("sandbox: add SIGALRM-based watchdog device")

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the documentation to avoid a warning with 'make htmldocs'.

Fixes: 10107efedd5 ("sandbox: add SIGALRM-based watchdog device")

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: add SIGALRM-based watchdog device</title>
<updated>2022-10-24T09:10:21+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2022-09-27T09:54:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=10107efedd5ffe68b36a7d79bd561ee966cbb2f8'/>
<id>10107efedd5ffe68b36a7d79bd561ee966cbb2f8</id>
<content type='text'>
In order to test that U-Boot actually maintains the watchdog device(s)
during long-running busy-loops, such as those where we wait for the
user to stop autoboot, we need a watchdog device that actually does
something during those loops; we cannot test that behaviour via the DM
test framework.

So introduce a relatively simple watchdog device which is simply based
on calling the host OS' alarm() function; that has the nice property
that a new call to alarm() simply sets a new deadline, and alarm(0)
cancels any existing alarm. These properties are precisely what we
need to implement start/reset/stop. We install our own handler so that
we get a known message printed if and when the watchdog fires, and by
just invoking that handler directly, we get expire_now for free.

The actual calls to the various OS functions (alarm, signal, raise)
need to be done in os.c, and since the driver code cannot get access
to the values of SIGALRM or SIG_DFL (that would require including a
host header, and that's only os.c which can do that), we cannot simply
do trivial wrappers for signal() and raise(), but instead create
specialized functions just for use by this driver.

Apart from enabling this driver for sandbox{,64}_defconfig, also
enable the wdt command which was useful for hand-testing this new
driver (especially with running u-boot under strace).

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to test that U-Boot actually maintains the watchdog device(s)
during long-running busy-loops, such as those where we wait for the
user to stop autoboot, we need a watchdog device that actually does
something during those loops; we cannot test that behaviour via the DM
test framework.

So introduce a relatively simple watchdog device which is simply based
on calling the host OS' alarm() function; that has the nice property
that a new call to alarm() simply sets a new deadline, and alarm(0)
cancels any existing alarm. These properties are precisely what we
need to implement start/reset/stop. We install our own handler so that
we get a known message printed if and when the watchdog fires, and by
just invoking that handler directly, we get expire_now for free.

The actual calls to the various OS functions (alarm, signal, raise)
need to be done in os.c, and since the driver code cannot get access
to the values of SIGALRM or SIG_DFL (that would require including a
host header, and that's only os.c which can do that), we cannot simply
do trivial wrappers for signal() and raise(), but instead create
specialized functions just for use by this driver.

Apart from enabling this driver for sandbox{,64}_defconfig, also
enable the wdt command which was useful for hand-testing this new
driver (especially with running u-boot under strace).

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: Add function os_flush()</title>
<updated>2022-09-24T14:47:01+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2022-09-05T09:31:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7df5b353347621cca0eef7420ba045bf852e778a'/>
<id>7df5b353347621cca0eef7420ba045bf852e778a</id>
<content type='text'>
It flushes stdout.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It flushes stdout.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: add function os_printf()</title>
<updated>2022-06-28T02:09:51+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-04-04T20:45:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7750ee45a62c7834f170f817232e432b8d2a14d3'/>
<id>7750ee45a62c7834f170f817232e432b8d2a14d3</id>
<content type='text'>
Before setting up the devices U-Boot's printf() function cannot be used
for console output. Provide function os_printf() to print to stderr.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before setting up the devices U-Boot's printf() function cannot be used
for console output. Provide function os_printf() to print to stderr.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: compatibility of os_get_filesize()</title>
<updated>2022-01-13T16:13:41+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-01-11T00:50:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=880dbc5f808b65f62b47c78939e12d32c1701ed6'/>
<id>880dbc5f808b65f62b47c78939e12d32c1701ed6</id>
<content type='text'>
U-Boot define loff_t as long long. But the header
/usr/include/linux/types.h may not define it.
This has lead to a build error on Alpine Linux.

So let's use long long instead of loff_t for
the size parameter of function os_get_filesize().

Reported-by: Milan P. Stanić &lt;mps@arvanta.net&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Tested-by: Milan P. Stanić &lt;mps@arvanta.net&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
U-Boot define loff_t as long long. But the header
/usr/include/linux/types.h may not define it.
This has lead to a build error on Alpine Linux.

So let's use long long instead of loff_t for
the size parameter of function os_get_filesize().

Reported-by: Milan P. Stanić &lt;mps@arvanta.net&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Tested-by: Milan P. Stanić &lt;mps@arvanta.net&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: Support unmapping a file</title>
<updated>2021-11-28T23:51:51+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-10-23T23:25:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a0ff280a8988dd62c8dc9a3156f6f80a346000e5'/>
<id>a0ff280a8988dd62c8dc9a3156f6f80a346000e5</id>
<content type='text'>
Add the opposite of mapping, so that we can unmap and avoid running out of
address space.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the opposite of mapping, so that we can unmap and avoid running out of
address space.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: Add a way to map a file into memory</title>
<updated>2021-09-16T17:19:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-08-19T03:40:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b9274095c2cd1ae42f232c823e9e9557696be91a'/>
<id>b9274095c2cd1ae42f232c823e9e9557696be91a</id>
<content type='text'>
It is useful to map a file into memory so that it can be accessed using
simple pointers. Add a function to support this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is useful to map a file into memory so that it can be accessed using
simple pointers. Add a function to support this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: Add a way to find the size of a file</title>
<updated>2021-09-16T17:19:25+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-08-19T03:40:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b4467fae06e7c5b48635cd28e0b168b8508ad168'/>
<id>b4467fae06e7c5b48635cd28e0b168b8508ad168</id>
<content type='text'>
Add a function to return the size of a file. This is useful in situations
where we need to allocate memory for it before reading it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function to return the size of a file. This is useful in situations
where we need to allocate memory for it before reading it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: Support executables for more phases</title>
<updated>2021-07-21T16:27:34+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-07-05T22:32:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f178bebf551a43445ba8f1e1a4c1638eff8eb612'/>
<id>f178bebf551a43445ba8f1e1a4c1638eff8eb612</id>
<content type='text'>
The SPL header has a function for obtaining the phase in capital letters,
e.g. 'SPL'. Add one for lower-case also, as used by sandbox.

Use this to generalise the sandbox logic for determining the filename of
the next sandbox executable. This can provide support for VPL.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SPL header has a function for obtaining the phase in capital letters,
e.g. 'SPL'. Add one for lower-case also, as used by sandbox.

Use this to generalise the sandbox logic for determining the filename of
the next sandbox executable. This can provide support for VPL.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sandbox: document parameters of os_realloc()</title>
<updated>2021-04-06T04:33:19+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-03-28T09:05:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4c30d18ed38c5ae84ed91da0f9d1ba4c9e83bffc'/>
<id>4c30d18ed38c5ae84ed91da0f9d1ba4c9e83bffc</id>
<content type='text'>
Avoid 'make htmldocs' build warnings:

    ./include/os.h:139: warning:
    Function parameter or member 'ptr' not described in 'os_realloc'
    ./include/os.h:139: warning:
    Function parameter or member 'length' not described in 'os_realloc'

Fixes: 14e46dfb176b ("sandbox: Add os_realloc()")
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid 'make htmldocs' build warnings:

    ./include/os.h:139: warning:
    Function parameter or member 'ptr' not described in 'os_realloc'
    ./include/os.h:139: warning:
    Function parameter or member 'length' not described in 'os_realloc'

Fixes: 14e46dfb176b ("sandbox: Add os_realloc()")
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
