32 Commits

Author SHA1 Message Date
Travis Geiselbrecht
75eaa5c489 [app][warnings] fix -Wmissing-declarations warnings in app/ 2021-10-21 23:16:57 -07:00
Travis Geiselbrecht
f7d8e2300c [warnings] add -Wshadow which helps detect local variables that override globals
Nothing particularly bad showed up but cleaned up a bit of code.
2020-07-25 16:49:25 -07:00
Travis Geiselbrecht
cba9e47987 [license] replace the longer full MIT license with a shorter one
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
d8fa82cb91 [formatting] run everything through codestyle
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
1b7a28efb8 [include][lk] fixup lk/ include path move 2019-06-19 19:46:11 -07:00
Travis Geiselbrecht
5dea3e1933 [warnings] fix a few warnings introduced with newer version of gcc
Most of the warnings are new, such as needing to mark fallthroughs on
cases explicitly. A few are based on signed vs unsigned comparisons.

Disable one warning that was annoying about comparing null to arguments
marked nonnull.
2018-03-15 14:10:12 -07:00
Travis Geiselbrecht
a4ca0a6e00 [vmm] move most users of arch_mmu_query directly to vaddr_to_paddr() 2016-02-14 12:45:53 -08:00
Travis Geiselbrecht
3b2d7a268b [make] remove the need for a module to manually add $(LOCAL_DIR)/include to the global include path
Pretty much every module in the system was already doing it, so do it
automatically.
2015-10-19 19:07:16 -07:00
John Grossman
eab2816302 [lib][ptable] Modify ptable to respect erase geometries.
Modify the existing ptable code to pay attention to bio device erase
geometry if present.  Significant changes include...

+ Partitions must be allocated on both program and erase block
  boundaries.
+ Partitions lengths must be multiples of both program and erase block
  sizes.
+ Partitions may not span non-homogeneous regions of erase geometry.
+ ptable_allocate as been made private.
+ Users may no longer explicitly select a position for partitions to
  be added, they may only ask for the partition to be allocated at the
  begining or the end of the block device.
+ A bio subdevice will be registered for each active partition in the
  system.  Users are encouraged to add their partition using
  ptable_add, and then open a handle to the subdevice using bio_open.
  The bio subdevice will prevent accidental scribbling outside of the
  partition lines, and also advertise the partition erase size.

Signed-off-by: John Grossman <johngro@google.com>
Change-Id: I09bf9038d210ff8be42d44166ab92c789872e036
2015-06-29 17:32:10 -07:00
Nathaniel Quillin
6c3dc4cdda [lkboot] add flag to disable autoboot from a project
Change-Id: Iea9c714c869543ba486f63a6604f379acd469385
2015-06-30 00:29:54 +00:00
Travis Geiselbrecht
056b30bfe7 [app][lkboot] ask platform code if we should autoboot before booting
-have the zynq nak autobooting if the BOOT_MODE pins were set to
JTAG mode.
-Clean up some of the timeout logic a bit.

Change-Id: I4ace6354de89f2e88aa270e5ebc1bf01ebe3b046
2015-05-20 23:31:39 -07:00
Travis Geiselbrecht
fada1c63ca [app][lkboot] remove printf warning
Change-Id: Ibee4aa7fec25ccb2a5c91fb4e3d6bc87ed0231c0
2015-05-20 14:25:37 -07:00
Travis Geiselbrecht
e3834e4601 [app][lkboot] allow building lkboot without server, sysparams control autoboot behavior
add lkboot.autoboot and lkboot.autoboot_timeout sysparam overrides to the default.

Change-Id: I84640db94bc6ab0df906ad78e00462819150422c
2015-04-27 16:34:02 -07:00
Travis Geiselbrecht
3764cb3a2d [app][lkboot] modularlize lkboot, add secondary DCC channel, remove large buffer
Change-Id: I5a59f06c909722fe7269aa0991da10fa1ea8196e
2015-04-27 16:29:45 -07:00
Travis Geiselbrecht
5cea44316c [platform][zynq] make building gem/minip optional, make initializing sdram optional
Change-Id: Ia499573363fcf9b60a7338e072ea21f72e7e4eee
2015-03-17 17:47:54 -07:00
Travis Geiselbrecht
d449902adc [app][lkboot] restructure to add booting out of flash
-Now lkboot will start a network server (if networking is enabled)
    and wait for a predetermined amount of time (5 seconds currently).
    If after that time no one has talked to it, it will try to boot
    an image out of flash.
-If no networking, then directly boot an image out of flash immediately.

TODO: configure timeout, add 'autoboot' command to lkboot to let the host
short circuit the wait.
2015-03-03 14:59:27 -08:00
Travis Geiselbrecht
295d26c907 [app][lkboot] assume fpga images have already been endian swapped
Remove endian swap code on the receiving side.
2014-12-11 20:01:11 -08:00
Travis Geiselbrecht
0b8d9befda [app][lkboot] first stab at trying to pass arguments to binaries loaded with lkboot 2014-12-11 19:58:46 -08:00
Travis Geiselbrecht
ee9d2927ad [arm] add ability to pass and generically read up to 4 boot args from whoever loaded lk
-Extend arch_chain_load() to pass 4 args
2014-11-21 15:50:18 -08:00
Travis Geiselbrecht
2a7913e43e [app][lkboot] add code to create/remove additional partitions, try to boot bootimages if passed 2014-11-21 15:50:18 -08:00
Travis Geiselbrecht
30add04420 [app][lkboot] align the boot buffer on 16MB boundary virtually and physically 2014-08-18 14:50:03 -07:00
Brian Swetland
82fa2c8d7e [app][lkboot] complete boot command in a thread
so we can allow the lkboot transaction to complete and the
host tool doesn't hang waiting for an ack
2014-08-13 15:16:05 -07:00
Travis Geiselbrecht
462e1475e1 [app][lkboot] remove console from the required module list 2014-08-12 16:21:27 -07:00
Travis Geiselbrecht
43e914f453 [app][lkboot] add boot command 2014-08-12 16:21:27 -07:00
Brian Swetland
e3f3a428a2 [app][lkboot] fix a dumb bug 2014-08-08 19:03:55 -07:00
Brian Swetland
fc898a85d6 [app][lkboot] fix lkb_write() for len 65536 2014-08-08 16:03:49 -07:00
Brian Swetland
47c2ae27e3 [app][lkboot] provide a means to register additional commands 2014-08-08 15:58:13 -07:00
Brian Swetland
312e5e146a [lkboot] reboot support 2014-08-06 16:09:55 -07:00
Travis Geiselbrecht
d3419db6f0 [warnings] knock out a few warnings and add a few vim tags 2014-08-06 15:03:32 -07:00
Travis Geiselbrecht
45b8467ff0 [lib][minip] change tcp socket handles to an opaque tcp_socket_t struct 2014-08-06 15:01:28 -07:00
Brian Swetland
b8bd9b9edb [lkboot] add "getsysparam", support data return from server 2014-08-06 10:34:09 -07:00
Brian Swetland
5b2e6584f8 [app][lkboot] network bootloader server 2014-08-05 18:19:08 -07:00