History log of /haiku/src/system/boot/platform/u-boot/start.cpp
Revision Date Author Comments
# a8cd19b6 28-Feb-2020 Alexander von Gluck IV <kallisti5@unixzen.com>

system/boot: Begin factoring gFDT out of non-u-boot code

Change-Id: Ibe010c6c7ed71a20fc852ce6c72c6f32b98dfad2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2292
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 250b21a5 28-Jan-2020 Alexander von Gluck IV <kallisti5@unixzen.com>

system/u-boot: Some 64-bit cleanups to our u-boot code

Change-Id: I70c50b36cd56263dcb37faeffc4037dea4af88c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2171
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 8de3883d 01-Nov-2018 Alexander von Gluck IV <kallisti5@unixzen.com>

bcm2835: Move mailbox init into bcm2835 framebuffer

We won't need the mailbox for most chipsets except bcm2835
to determine the framebuffer base address.
(especially at this early boot stage)

This simplifies things by making the mailbox usage limited
to boot_arch_arm and not spreading it all thoughout the
platform u-boot code... however we keep the mailbox driver
as-is since it would make a good kernel driver someday.

mmu_man mentioned us "finding" the fb base from the mailbox
and modifying the FDT to let it know the base reg of the
framebuffer... that's beyond 'just getting things building'
though :-)

Change-Id: Ic2772b85dff004f9d21447ea5958b5ae9776d526


# 645e6f89 30-Oct-2018 Alexander von Gluck IV <kallisti5@unixzen.com>

u-boot: Drop openfirmware in u-boot platform hack

* If we need this, we can do builds with openfirmware
platform on u-boot loader now.

Change-Id: I67b5bda165a78b772e246c008c5018b2d6f459e9


# 9642f770 31-Jul-2018 Alexander von Gluck IV <kallisti5@unixzen.com>

arch: Cleanup of __ARM__ checks

* gcc 7.x defines __arm__ and __ARM__ (and others)
* clang defines __arm__ and __arm
* cleanup a few related ifdef vs if macros

Change-Id: I5da4bafac590f6fa3e10e543688001c2449f840d


# e40cea64 09-Jul-2017 Alexander von Gluck IV <kallisti5@unixzen.com>

u-boot/arm: Initial steps to drop target board requirements


# f4dc609d 22-Apr-2016 François Revol <revol@free.fr>

U-Boot: PPC: dump the start of the board_data struct

Not so useful but just in case...

Sadly, this struct is both compile-time and arch dependent :-(


# 115ac6bc 28-Mar-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

arm/mailbox: Load mailbox base from FDT in loader


# c6a4fee5 28-Mar-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

loader/u-boot: Use FDT serial info to create uart

* drop my fdt tests
* we have to call fdt parsing code *after* cpu_init (why?)
* pass fdt pointer to all FDT support calls to avoid confusion
once we get into the kernel land
* look for PL011 compatible uart and use it
* Add some saftey checks to serial putc code to avoid null*
* fdt_node_check_compatible returns 0 on success not 1
* fdt_get_device_reg needs to add the SOC base to the result
* fdt_get_device_reg might need to add the second range cell
instead of reg?


# f121867b 14-Mar-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

arm/fdt: Initial reorg of fdt support code

* Makes FDT support code useable by everyone
without all of the externs
* Further movement to be non-u-boot centic
may still happen.


# 5906dbb4 06-Mar-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

platform/u-boot: Work towards using arm mailbox driver

* Reference bcm2708 framebuffer when it makes sense
* Add bcm2708 define to Raspberry Pi board_config.h


# b7ff6340 03-Nov-2014 François Revol <revol@free.fr>

U-Boot: always initialize args.arguments_count


# cb3ea122 03-Nov-2014 François Revol <revol@free.fr>

U-Boot: delay checking /chosen:bootargs after remapping FDT

This avoids having to copy the strings.
For now we disregard argv[] as it is not remapped before
being used in add_stage2_driver_settings() and is not used
by the linux entry point.

This makes the overo loader panic at the same place as
the beagle xm one now, even though it fails to display
anything with the default RAM size since we allocate
the framebuffer beyond 128MB...


# 92fcf262 01-Nov-2014 François Revol <revol@free.fr>

ARM: Check for RAM size in FDT

We skip the check when we already have ranges inserted,
like from the raspberry Pi start code, and we fall back to
32MB at SDRAM_BASE is not found.


# 5de5d59d 01-Nov-2014 François Revol <revol@free.fr>

U-Boot: move gUImage and gFDT back to BSS section

No need for this trick anymore.


# 909a14bb 01-Nov-2014 François Revol <revol@free.fr>

U-Boot: introduce a start_gen() catch-all entry

So we can pass it all the optional stuff instead of playing tricks
to initialize them outside of BSS.


# 16286325 31-Oct-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: u-boot: fixup FDT handling

If we find an FDT (either from uImage or otherwise) we make sure
we map it after mmu_init() and use kernel_args to pass it to the
kernel (so it is available at all times there).


# eea45d0a 06-Sep-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: cleanup of bootloader memory mapping

* Removes default mapping of a portion of the RAM (will be done
as needed)
* Passes on the page directory area to kernel, so on early vm init
the kernel can use the area for pagetable allocation.
* Leaves it to the platform to pass in physical memory range(s). This
will ultimately come from FDT.
* Fix long standing issue with allocation of the heap, potentially
causing other part of the bootloader to overwrite the heap.
* Implements pagetable allocator in kernel for early vm mapping.

This fixes the first PANIC seen, we now just get the same one later
on when the VM is up... more to come...


# e3020a50 06-Sep-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: remove initrd handling from mmu code

Let the platform mmu_map_physical_memory the initrd region, and
reserve it before calling mmu_init. This removes another hardcoded
address, since e.g. U-Boot gets the address from the uImage file.


# 0a163b65 06-Sep-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: define bootloader stack in linker script

This removes the need for the whole HAIKU_BOARD_LOADER_STACK_BASE
sing and dance, since it is always included in the bootloader binary
itself.


# 780ca2bd 30-Aug-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: abort() is already pulled in using kernel_util.o

It was just here to make libgcc happy.


# 6f742d85 27-Jun-2014 Arvind S Raj <sraj.arvind@gmail.com>

Corrected check to ensure that command line options are indeed passed.

* Currently, no command line options are being passed via u-boot
to haiku. However, the comparison doesn't ensure that cmdline
is not an empty string - it merely ensures cmdline is not null.

Signed-off-by: Ithamar R. Adema <ithamar@upgrade-android.com>


# 3f92e864 15-Oct-2013 François Revol <revol@free.fr>

Style fixes


# b55cb439 15-Oct-2013 François Revol <revol@free.fr>

U-Boot: pass around argv and /chosen/bootargs

Not really handled correctly yet, but at least they are passed.


# 247db0d1 20-Apr-2013 François Revol <revol@free.fr>

U-Boot: pass a copy of the FDT to the kernel


# 4c50a9bc 17-Feb-2013 François Revol <revol@free.fr>

U-Boot: move of_init() call before cpu_init()

So we can use the OF wrapper there as well and copy code verbatim from
the OF platform.


# ef7bb168 01-Jan-2013 François Revol <revol@free.fr>

U-Boot: fix warnings


# 344b3218 12-Nov-2012 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM/u-boot: Add support for FDTs passed in the uImage

Since we're using multi-part uImage format, we can add the FDT as
a seperate "blob" in the uImage, if the used U-Boot version is not
"FDT enabled".

This is used for example for our Verdex target. Currently I've got
a local hack in the platform/u-boot/Jamfile, looking into pulling
in the FDT files and a proper Jam setup to do that properly...


# f24f5903 06-Nov-2012 François Revol <revol@free.fr>

U-Boot: implement part of the OpenFirmware wrapper

We'll see later on if it's really useful to keep it around.


# 338324dc 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: check for /chosen in the FDT for an initrd holding our tgz

* since the FDT linux boot method doesn't pass the uimage, we can't
use it to pass the kernel+driver tgz in a multi-file uimage.
* instead we check for the linux initrd properties in the /chosen node.

(cherry picked from my sam460ex branch)


# 9b8ce8c4 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: initialize the debug UART using FDT hints when possible

* we first try to find 'serial', 'serial0' or 'serial1' in /aliases
* extract the required properties from the found node and use them
* fallback to the hardcoded UART from the board definition header

(cherry picked from my sam460ex branch)


# 18f4b7dd 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: dump the passed FDT

* add some helpers for Flattened Device Trees, for now a dump call
* dump the passed FDT on startup for now

Conflicts:
src/system/boot/platform/u-boot/Jamfile

(cherry picked from my sam460ex branch)


# 80dfcc73 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: check for /chosen in the FDT for an initrd holding our tgz

* since the FDT linux boot method doesn't pass the uimage, we can't
use it to pass the kernel+driver tgz in a multi-file uimage.
* instead we check for the linux initrd properties in the /chosen node.


# 74eeabe4 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: initialize the debug UART using FDT hints when possible

* we first try to find 'serial', 'serial0' or 'serial1' in /aliases
* extract the required properties from the found node and use them
* fallback to the hardcoded UART from the board definition header


# 696526b2 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: dump the passed FDT

* add some helpers for Flattened Device Trees, for now a dump call
* dump the passed FDT on startup for now


# acda52f5 24-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Fixes for other platforms.


# 3a2a3367 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Support static_cast on FixedWidthPointer.


# f1244978 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Added an ELF64 version of preloaded_image.

* There is now 2 structures, preloaded_elf32_image and preloaded_elf64_image,
which both inherit from preloaded_image.
* For now I've just hardcoded in use of preloaded_elf32_image, but the
bootloader ELF code will shortly be converted to use templates which use
the appropriate structure. The kernel will be changed later when I add
ELF64 support to it.
* All kernel_args data is now compatible between 32-bit and 64-bit kernels.


# dc09611a 02-Jun-2012 François Revol <revol@free.fr>

U-Boot: move gFDT declaration to shell.S

* this avoids it falling into the BSS section which we clear quite late,
and allows setting it from asm code if needed.


# b011337e 17-May-2012 François Revol <revol@free.fr>

U-Boot: save passed FDT and call common code

* should work better this way :D


# d86473df 17-May-2012 François Revol <revol@free.fr>

Cleanup U-Boot global data struct

* there are only a few members we can really rely on, the rest is compile-time dependant.
* don't use ARM-specific stuff.


# 229e112e 12-May-2012 François Revol <revol@free.fr>

Drop ARM-specific register pointer

* the global data is already stored in a variable from shell.S anyway when available


# 5409323a 12-May-2012 François Revol <revol@free.fr>

Add empty C linux-style entry points

* On PPC, there are two different kernel entry signatures for Linux


# d1645229 10-May-2012 François Revol <revol@free.fr>

Rename u-boot start2.cpp to start.cpp

* rename the file for consistency with other platforms.
* there used to be a start.S, long since renamed to shell.S anyway.


# 115ac6bcaebba8001e476265d74cc2aa34e8c65b 28-Mar-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

arm/mailbox: Load mailbox base from FDT in loader


# c6a4fee57959c986091fcd52f2096b28b98456e2 28-Mar-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

loader/u-boot: Use FDT serial info to create uart

* drop my fdt tests
* we have to call fdt parsing code *after* cpu_init (why?)
* pass fdt pointer to all FDT support calls to avoid confusion
once we get into the kernel land
* look for PL011 compatible uart and use it
* Add some saftey checks to serial putc code to avoid null*
* fdt_node_check_compatible returns 0 on success not 1
* fdt_get_device_reg needs to add the SOC base to the result
* fdt_get_device_reg might need to add the second range cell
instead of reg?


# f121867b877df03246ef7c4ca3f168a17f2395a9 14-Mar-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

arm/fdt: Initial reorg of fdt support code

* Makes FDT support code useable by everyone
without all of the externs
* Further movement to be non-u-boot centic
may still happen.


# 5906dbb4d4656919daaf375510132107b0af6a8a 06-Mar-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

platform/u-boot: Work towards using arm mailbox driver

* Reference bcm2708 framebuffer when it makes sense
* Add bcm2708 define to Raspberry Pi board_config.h


# b7ff6340ae200ac60c43e97efdbc2ce190fb165f 03-Nov-2014 François Revol <revol@free.fr>

U-Boot: always initialize args.arguments_count


# cb3ea122d3c5d2ad41eff682dd5f78e0e1193d10 03-Nov-2014 François Revol <revol@free.fr>

U-Boot: delay checking /chosen:bootargs after remapping FDT

This avoids having to copy the strings.
For now we disregard argv[] as it is not remapped before
being used in add_stage2_driver_settings() and is not used
by the linux entry point.

This makes the overo loader panic at the same place as
the beagle xm one now, even though it fails to display
anything with the default RAM size since we allocate
the framebuffer beyond 128MB...


# 92fcf262ff40fce289b97998cbde6082314ce1e3 01-Nov-2014 François Revol <revol@free.fr>

ARM: Check for RAM size in FDT

We skip the check when we already have ranges inserted,
like from the raspberry Pi start code, and we fall back to
32MB at SDRAM_BASE is not found.


# 5de5d59d785643fc6dacf2690eadf5890bdb0307 01-Nov-2014 François Revol <revol@free.fr>

U-Boot: move gUImage and gFDT back to BSS section

No need for this trick anymore.


# 909a14bb55d37bfef602538362eee343357e089e 01-Nov-2014 François Revol <revol@free.fr>

U-Boot: introduce a start_gen() catch-all entry

So we can pass it all the optional stuff instead of playing tricks
to initialize them outside of BSS.


# 16286325845103afbcd9ecf1cd37a531d9d54c14 31-Oct-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: u-boot: fixup FDT handling

If we find an FDT (either from uImage or otherwise) we make sure
we map it after mmu_init() and use kernel_args to pass it to the
kernel (so it is available at all times there).


# eea45d0a329d51c5fcf8bf904316e7761aaaa96f 06-Sep-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: cleanup of bootloader memory mapping

* Removes default mapping of a portion of the RAM (will be done
as needed)
* Passes on the page directory area to kernel, so on early vm init
the kernel can use the area for pagetable allocation.
* Leaves it to the platform to pass in physical memory range(s). This
will ultimately come from FDT.
* Fix long standing issue with allocation of the heap, potentially
causing other part of the bootloader to overwrite the heap.
* Implements pagetable allocator in kernel for early vm mapping.

This fixes the first PANIC seen, we now just get the same one later
on when the VM is up... more to come...


# e3020a50396a213352f70782904fa34546b6f2e4 06-Sep-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: remove initrd handling from mmu code

Let the platform mmu_map_physical_memory the initrd region, and
reserve it before calling mmu_init. This removes another hardcoded
address, since e.g. U-Boot gets the address from the uImage file.


# 0a163b65c71323e37490471c4933f2289e4e80e8 06-Sep-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: define bootloader stack in linker script

This removes the need for the whole HAIKU_BOARD_LOADER_STACK_BASE
sing and dance, since it is always included in the bootloader binary
itself.


# 780ca2bd158bacffe8fac40f15c8ce1788e3c041 30-Aug-2014 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM: abort() is already pulled in using kernel_util.o

It was just here to make libgcc happy.


# 6f742d85f9f907e6c2f69fffca89d029e3fc247b 27-Jun-2014 Arvind S Raj <sraj.arvind@gmail.com>

Corrected check to ensure that command line options are indeed passed.

* Currently, no command line options are being passed via u-boot
to haiku. However, the comparison doesn't ensure that cmdline
is not an empty string - it merely ensures cmdline is not null.

Signed-off-by: Ithamar R. Adema <ithamar@upgrade-android.com>


# 3f92e864a1b468d7e87cd763be515c44d463d269 15-Oct-2013 François Revol <revol@free.fr>

Style fixes


# b55cb439e7fb4c23f8448d38f2897def15f15385 15-Oct-2013 François Revol <revol@free.fr>

U-Boot: pass around argv and /chosen/bootargs

Not really handled correctly yet, but at least they are passed.


# 247db0d169987a50b75a5ad581cf33fd1e13202b 20-Apr-2013 François Revol <revol@free.fr>

U-Boot: pass a copy of the FDT to the kernel


# 4c50a9bcfd5f92310d3a3493381c9042f6ef5df8 17-Feb-2013 François Revol <revol@free.fr>

U-Boot: move of_init() call before cpu_init()

So we can use the OF wrapper there as well and copy code verbatim from
the OF platform.


# ef7bb168f77d9d3537cc0b08bedbe70d50c86924 01-Jan-2013 François Revol <revol@free.fr>

U-Boot: fix warnings


# 344b3218d40b44df5bfc8c7c4859e7d9ed4d06f2 12-Nov-2012 Ithamar R. Adema <ithamar@upgrade-android.com>

ARM/u-boot: Add support for FDTs passed in the uImage

Since we're using multi-part uImage format, we can add the FDT as
a seperate "blob" in the uImage, if the used U-Boot version is not
"FDT enabled".

This is used for example for our Verdex target. Currently I've got
a local hack in the platform/u-boot/Jamfile, looking into pulling
in the FDT files and a proper Jam setup to do that properly...


# f24f590392a910b547e2463843d34b33d4fdb958 06-Nov-2012 François Revol <revol@free.fr>

U-Boot: implement part of the OpenFirmware wrapper

We'll see later on if it's really useful to keep it around.


# 338324dc66c15a8c8c92d73f14d0a489732abe1d 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: check for /chosen in the FDT for an initrd holding our tgz

* since the FDT linux boot method doesn't pass the uimage, we can't
use it to pass the kernel+driver tgz in a multi-file uimage.
* instead we check for the linux initrd properties in the /chosen node.

(cherry picked from my sam460ex branch)


# 9b8ce8c462c53cbf9172c415f56a75ec406529dd 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: initialize the debug UART using FDT hints when possible

* we first try to find 'serial', 'serial0' or 'serial1' in /aliases
* extract the required properties from the found node and use them
* fallback to the hardcoded UART from the board definition header

(cherry picked from my sam460ex branch)


# 18f4b7dd3b97f7dc42337445ea0290b65e0b2a18 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: dump the passed FDT

* add some helpers for Flattened Device Trees, for now a dump call
* dump the passed FDT on startup for now

Conflicts:
src/system/boot/platform/u-boot/Jamfile

(cherry picked from my sam460ex branch)


# 80dfcc73119a3c34347db3709819c6a17d9883de 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: check for /chosen in the FDT for an initrd holding our tgz

* since the FDT linux boot method doesn't pass the uimage, we can't
use it to pass the kernel+driver tgz in a multi-file uimage.
* instead we check for the linux initrd properties in the /chosen node.


# 74eeabe4a645ee37466160d824975cda4fe200b7 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: initialize the debug UART using FDT hints when possible

* we first try to find 'serial', 'serial0' or 'serial1' in /aliases
* extract the required properties from the found node and use them
* fallback to the hardcoded UART from the board definition header


# 696526b2b8a21a95ca1bdc1bac2fb0f2279a25a0 24-Aug-2012 François Revol <revol@free.fr>

U-Boot: dump the passed FDT

* add some helpers for Flattened Device Trees, for now a dump call
* dump the passed FDT on startup for now


# acda52f5e963b1c76fed2eca0409444cda4529b5 24-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Fixes for other platforms.


# 3a2a3367dc9bec2a5fbcd4ac849da6ac65e74e79 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Support static_cast on FixedWidthPointer.


# f1244978152350f9cc010e766d09c2e9ad34dfce 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Added an ELF64 version of preloaded_image.

* There is now 2 structures, preloaded_elf32_image and preloaded_elf64_image,
which both inherit from preloaded_image.
* For now I've just hardcoded in use of preloaded_elf32_image, but the
bootloader ELF code will shortly be converted to use templates which use
the appropriate structure. The kernel will be changed later when I add
ELF64 support to it.
* All kernel_args data is now compatible between 32-bit and 64-bit kernels.


# dc09611aad3a8c4b17c632703051ac8d64c96efd 02-Jun-2012 François Revol <revol@free.fr>

U-Boot: move gFDT declaration to shell.S

* this avoids it falling into the BSS section which we clear quite late,
and allows setting it from asm code if needed.


# b011337e20bf312aa0d12536b86d51f4267f0ffc 17-May-2012 François Revol <revol@free.fr>

U-Boot: save passed FDT and call common code

* should work better this way :D


# d86473dfb94ed15a65725e11311823096018f8e3 17-May-2012 François Revol <revol@free.fr>

Cleanup U-Boot global data struct

* there are only a few members we can really rely on, the rest is compile-time dependant.
* don't use ARM-specific stuff.


# 229e112eb4a2e83edd4e7bb44f3a265f1b4681fa 12-May-2012 François Revol <revol@free.fr>

Drop ARM-specific register pointer

* the global data is already stored in a variable from shell.S anyway when available


# 5409323add017f43372830b22733699dae5abc20 12-May-2012 François Revol <revol@free.fr>

Add empty C linux-style entry points

* On PPC, there are two different kernel entry signatures for Linux


# d1645229d142e2979c35ea67c1709fa71a0d8b1d 10-May-2012 François Revol <revol@free.fr>

Rename u-boot start2.cpp to start.cpp

* rename the file for consistency with other platforms.
* there used to be a start.S, long since renamed to shell.S anyway.