<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/cmd_bootm.c, branch v2014.04</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>common: Remove invalid endianess conversion</title>
<updated>2014-02-21T16:06:13+00:00</updated>
<author>
<name>Christian Eggers</name>
<email>ceggers@gmx.de</email>
</author>
<published>2014-02-08T18:27:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9c89614d3f1ea510d7fcb4a2b438fb3e0d58392c'/>
<id>9c89614d3f1ea510d7fcb4a2b438fb3e0d58392c</id>
<content type='text'>
do_bootm_standanlone() calls ntohl(images-&gt;ep) which is wrong because
endianess conversion has already been done:

do_bootm()
\-do_bootm_states()
  +-bootm_find_os()
  | \-images.ep = image_get_ep();
  |   \-uimage_to_cpu(hdr-&gt;ih_ep);
  \-boot_selected_os()
    \-do_bootm_standanlone()

Without this conversion the code works correctly at least on AT91SAM9G45.
On big endian systems there should be no difference after applying this
patch because uimage_to_cpu(x) and ntohl(x) both expand to 'x'.

Signed-off-by: Christian Eggers &lt;ceggers@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
do_bootm_standanlone() calls ntohl(images-&gt;ep) which is wrong because
endianess conversion has already been done:

do_bootm()
\-do_bootm_states()
  +-bootm_find_os()
  | \-images.ep = image_get_ep();
  |   \-uimage_to_cpu(hdr-&gt;ih_ep);
  \-boot_selected_os()
    \-do_bootm_standanlone()

Without this conversion the code works correctly at least on AT91SAM9G45.
On big endian systems there should be no difference after applying this
patch because uimage_to_cpu(x) and ntohl(x) both expand to 'x'.

Signed-off-by: Christian Eggers &lt;ceggers@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bootm: Reinstate special case for standalone images</title>
<updated>2014-01-14T14:01:05+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2013-12-26T23:26:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c5cbe1e299b60063e43a9008e85df95c8006d28f'/>
<id>c5cbe1e299b60063e43a9008e85df95c8006d28f</id>
<content type='text'>
For standalone images, bootm had a special case where the OS boot function
was NULL but did actually exist. It was just called manually.

This was removed by commit 35fc84fa which checks for the non-existence of
this function before the special case is examined.

There is no obvious reason why standalone is handled with a special case.
Adjust the code so that standalone has a normal OS boot function. We still
need a special case for when the function returns, but at least we can
avoid the main problem.

This is intended to fix the reported:

    ERROR: booting os 'U-Boot' (17) is not supported

but needs testing.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For standalone images, bootm had a special case where the OS boot function
was NULL but did actually exist. It was just called manually.

This was removed by commit 35fc84fa which checks for the non-existence of
this function before the special case is examined.

There is no obvious reason why standalone is handled with a special case.
Adjust the code so that standalone has a normal OS boot function. We still
need a special case for when the function returns, but at least we can
avoid the main problem.

This is intended to fix the reported:

    ERROR: booting os 'U-Boot' (17) is not supported

but needs testing.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.</title>
<updated>2013-12-16T13:59:05+00:00</updated>
<author>
<name>Miao Yan</name>
<email>miao.yan@windriver.com</email>
</author>
<published>2013-11-28T09:51:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=871a57bb817a7f4129d924d72f308228180c49ef'/>
<id>871a57bb817a7f4129d924d72f308228180c49ef</id>
<content type='text'>
The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware
description mechanism. For PowerPC, the boot interface conforms to
the ePAPR standard, which is:

   void (*kernel_entry)(ulong fdt_addr,
          ulong r4 /* 0 */,
          ulong r5 /* 0 */,
          ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
          ulong r8 /* 0 */, ulong r9 /* 0 */)

For ARM, the boot interface is:

   void (*kernel_entry)(void *fdt_addr)

Signed-off-by: Miao Yan &lt;miao.yan@windriver.com&gt;
[trini: Fix build error when !CONFIG_OF_FDT is set, typo on PowerPC,
missing extern ft_fixup_num_cores]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware
description mechanism. For PowerPC, the boot interface conforms to
the ePAPR standard, which is:

   void (*kernel_entry)(ulong fdt_addr,
          ulong r4 /* 0 */,
          ulong r5 /* 0 */,
          ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
          ulong r8 /* 0 */, ulong r9 /* 0 */)

For ARM, the boot interface is:

   void (*kernel_entry)(void *fdt_addr)

Signed-off-by: Miao Yan &lt;miao.yan@windriver.com&gt;
[trini: Fix build error when !CONFIG_OF_FDT is set, typo on PowerPC,
missing extern ft_fixup_num_cores]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.</title>
<updated>2013-12-13T14:18:45+00:00</updated>
<author>
<name>Miao Yan</name>
<email>miao.yan@windriver.com</email>
</author>
<published>2013-11-28T09:51:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=17ab52fef1c5221839f294d251224e4a8f19ad35'/>
<id>17ab52fef1c5221839f294d251224e4a8f19ad35</id>
<content type='text'>
do_bootm_vxworks now is available under the configuration option
CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems
that supported by bootm command. The bootvx command still depneds
on CONFIG_CMD_ELF.

Signed-off-by: Miao Yan &lt;miao.yan@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
do_bootm_vxworks now is available under the configuration option
CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems
that supported by bootm command. The bootvx command still depneds
on CONFIG_CMD_ELF.

Signed-off-by: Miao Yan &lt;miao.yan@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netbsd:fix documentation typo.</title>
<updated>2013-12-13T14:17:32+00:00</updated>
<author>
<name>Kees Jongenburger</name>
<email>kees.jongenburger@gmail.com</email>
</author>
<published>2013-12-12T15:18:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e2ce81696a6aeea65e86d7677d270e589a7d4d81'/>
<id>e2ce81696a6aeea65e86d7677d270e589a7d4d81</id>
<content type='text'>
The documentation suggested the arguments where passed over r3-r6
while the code below simply does that over r0-r3.

Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The documentation suggested the arguments where passed over r3-r6
while the code below simply does that over r0-r3.

Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common/cmd_bootm.c: fix subcommand processing in OS specific do_bootm_xxx() functions</title>
<updated>2013-11-08T14:41:37+00:00</updated>
<author>
<name>Miao Yan</name>
<email>miao.yan@windriver.com</email>
</author>
<published>2013-11-04T03:18:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5b629319cf58101b4d623017503d2437714e788a'/>
<id>5b629319cf58101b4d623017503d2437714e788a</id>
<content type='text'>
In commit "5c427e4: use BOOTM_STATE_OS_CMDLINE flag for plain bootm"
and "3d187b3: Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS",
BOOTM_STATE_OS_CMDLINE was added to do_bootm for PowerPC and MIPS. This
breaks other OSes (vxworks, netbsd, plan9,...) that don't support
subcommand processing, e.g. they all contain the following code in their
do_bootm_xxx():

    if (flag &amp; BOOTM_STATE_OS_PREP)
            return 0;
    if ((flag != 0) &amp;&amp; (flag != BOOTM_STATE_OS_GO))
            return 1;

which will result a "subcommand not supported" error.
This patch changes the above logic to:

    /* if not go command, pretend everything to be OK */
    if (flag != BOOTM_STATE_OS_GO)
         return 0;

Signed-off-by: Miao Yan &lt;miao.yan@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In commit "5c427e4: use BOOTM_STATE_OS_CMDLINE flag for plain bootm"
and "3d187b3: Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS",
BOOTM_STATE_OS_CMDLINE was added to do_bootm for PowerPC and MIPS. This
breaks other OSes (vxworks, netbsd, plan9,...) that don't support
subcommand processing, e.g. they all contain the following code in their
do_bootm_xxx():

    if (flag &amp; BOOTM_STATE_OS_PREP)
            return 0;
    if ((flag != 0) &amp;&amp; (flag != BOOTM_STATE_OS_GO))
            return 1;

which will result a "subcommand not supported" error.
This patch changes the above logic to:

    /* if not go command, pretend everything to be OK */
    if (flag != BOOTM_STATE_OS_GO)
         return 0;

Signed-off-by: Miao Yan &lt;miao.yan@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_bootm.c: Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS</title>
<updated>2013-09-23T18:20:37+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@ti.com</email>
</author>
<published>2013-09-23T18:20:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3d187b3924b5c027b3e591c439838bc1c70afefd'/>
<id>3d187b3924b5c027b3e591c439838bc1c70afefd</id>
<content type='text'>
In 5c427e4 we pass BOOTM_STATE_OS_CMDLINE as part of the bootm states to
run, on all arches.  However, this is only valid / useful on PowerPC and
MIPS, and causes a problem on ARM where we specifically do not use it.
Rather than make this state fake pass like we do for GO on some arches
(which need updating to use the GO state), we should just not pass
CMDLINE except when it may be used, like before.

Tested-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 5c427e4 we pass BOOTM_STATE_OS_CMDLINE as part of the bootm states to
run, on all arches.  However, this is only valid / useful on PowerPC and
MIPS, and causes a problem on ARM where we specifically do not use it.
Rather than make this state fake pass like we do for GO on some arches
(which need updating to use the GO state), we should just not pass
CMDLINE except when it may be used, like before.

Tested-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix loading freeze when netconsole is active</title>
<updated>2013-09-20T14:30:53+00:00</updated>
<author>
<name>Frederic Leroy</name>
<email>fredo@starox.org</email>
</author>
<published>2013-09-10T10:02:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8094972d594d883e3e556751f67ff5cdd8a286c5'/>
<id>8094972d594d883e3e556751f67ff5cdd8a286c5</id>
<content type='text'>
Netconsole calls eth_halt() before giving control to another operating
system.
But the state machine of netconsole don't take it into account.
Thus, netconsole calls network functions of an halted network device,
making the whole system freeze.
Rather than modifying the state machine of netconsole, we just unregister
the current network device before booting. It does work because
nc_send_packet() verifies that the current network device is not null.

Signed-off-by: Frédéric Leroy &lt;fredo@starox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Netconsole calls eth_halt() before giving control to another operating
system.
But the state machine of netconsole don't take it into account.
Thus, netconsole calls network functions of an halted network device,
making the whole system freeze.
Rather than modifying the state machine of netconsole, we just unregister
the current network device before booting. It does work because
nc_send_packet() verifies that the current network device is not null.

Signed-off-by: Frédéric Leroy &lt;fredo@starox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm</title>
<updated>2013-09-20T14:29:48+00:00</updated>
<author>
<name>Paul Burton</name>
<email>paul.burton@imgtec.com</email>
</author>
<published>2013-09-06T10:23:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5c427e49ce09c7e991ce63a686cb600bff3c877a'/>
<id>5c427e49ce09c7e991ce63a686cb600bff3c877a</id>
<content type='text'>
A plain bootm used to call the architecture specific boot function with
no flags, but was modified by commit 35fc84fa "Refactor the bootm
command to reduce code duplication" to call the architecture specific
boot function multiple times with various flags in sequence. The
BOOTM_STATE_OS_CMDLINE flag was not used, indeed it seems that at least
ARM prepares the command line on BOOTM_STATE_OS_PREP. However on MIPS
since commit 59e8cbdb "MIPS: bootm: refactor initialisation of kernel
cmdline" the command line is not prepared in response to a
BOOTM_STATE_OS_PREP flag, only on BOOTM_STATE_OS_CMDLINE or a call with
no flags. The end result is that a combination of those 2 commits leads
to MIPS boards booting kernels with no command line arguments.

An extra invocation of the architecture specific boot function with
BOOTM_STATE_OS_CMDLINE fixes this.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A plain bootm used to call the architecture specific boot function with
no flags, but was modified by commit 35fc84fa "Refactor the bootm
command to reduce code duplication" to call the architecture specific
boot function multiple times with various flags in sequence. The
BOOTM_STATE_OS_CMDLINE flag was not used, indeed it seems that at least
ARM prepares the command line on BOOTM_STATE_OS_PREP. However on MIPS
since commit 59e8cbdb "MIPS: bootm: refactor initialisation of kernel
cmdline" the command line is not prepared in response to a
BOOTM_STATE_OS_PREP flag, only on BOOTM_STATE_OS_CMDLINE or a call with
no flags. The end result is that a combination of those 2 commits leads
to MIPS boards booting kernels with no command line arguments.

An extra invocation of the architecture specific boot function with
BOOTM_STATE_OS_CMDLINE fixes this.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bootm: allow correct bounds-check of destination</title>
<updated>2013-09-03T19:30:26+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-08-16T14:59:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=315c0ace7c220591a9b220ab7698e85624b430c0'/>
<id>315c0ace7c220591a9b220ab7698e85624b430c0</id>
<content type='text'>
While nothing presently examines the destination size, it should at
least be correct so that future users of sys_mapmem() will not be
surprised. Without this, it might be possible to overflow memory.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While nothing presently examines the destination size, it should at
least be correct so that future users of sys_mapmem() will not be
surprised. Without this, it might be possible to overflow memory.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
