1. 11 Dec, 2020 1 commit
  2. 24 Mar, 2016 1 commit
  3. 21 Feb, 2013 1 commit
    • Gabe Black's avatar
      netboot: Move some netboot interfaces around. · 00e52f8f
      Gabe Black authored
      Instead of having the code which controls who gets outgoing or incoming
      packets in the netboot directory, this change moves some of it to be alongside
      uip in src/net, and some of it to be in src/drivers/net alongside future drivers.
      The code in src/net is essentially the same as what used to be in
      appcall.[hc]. In its new location it's bundled together with the bulk of uip,
      making it available to any future consumer of the network stack.
      The code that lets uip send packets through a network device was moved into
      src/drivers/net. This has two advantages. First, it means that this code is
      associated with the network drivers it provides access to instead of the
      netbooting code which isn't really involved at that level. Second, it makes it
      easy to flesh out the functionality a network driver can provide.
      The interface now has functions to read the MAC, send a packet, receive a
      packet if one's available, and checking if the device is ready to send/receive
      right now.
      The uip stack continues to use the "uip" class in the Makefiles because it
      needs a flag to disable strict alias checking. The rest of the code, including
      the code managing the callback and the network drivers, go in a "net" class.
      Anything that wants to use networking will build in those two classes.
      TEST=Built the netboot payload for Link.
      Change-Id: I2734ba376efad6140b4126ad4bfae7e8ba811d78
      Signed-off-by: default avatarGabe Black <gabeblack@google.com>
      Reviewed-on: https://gerrit-int.chromium.org/32730
  4. 12 Feb, 2013 1 commit
    • Gabe Black's avatar
      depthcharge: Create a "driver" interface for accessing flash contents. · dabe2d42
      Gabe Black authored
      On our x86 systems flash is memory mapped which makes it convenient to get to.
      Because it's so convenient, there hasn't been a need for a more formal
      interface to get at data stored there, you just had to compute a pointer and
      grab what you wanted.
      To support systems without memory mapped flash, and to facilitate better
      performance if using the programmer interface directly is faster, this change
      creates an interface which abstracts out exactly how flash is read or where
      the contents are stored.
      The new interface supports a single function, flash_read, which takes the
      offset into the flash and a size and returns a pointer to the requested data
      in memory. If the flash is memory mapped, the "driver" is just computing the
      pointer which points to the data you want and tells you to access it in
      place. If the driver actually goes out and reads the flash, it should put the
      data into a buffer which will act as a cache and return a pointer to that.
      A memory mapped flash driver and a dummy driver are provided as well.
      TEST=With this and other changes, moved over to using this interface to access
      flash. Built and booted on Link, built for Daisy, Lumpy and Haswell.
      Change-Id: I455ea6edca3987b38fbb9580286158e8272f5391
      Signed-off-by: default avatarGabe Black <gabeblack@google.com>
      Reviewed-on: https://gerrit-int.chromium.org/32350
      Reviewed-by: default avatarRonald G. Minnich <rminnich@google.com>
  5. 11 Feb, 2013 1 commit
  6. 28 Jan, 2013 1 commit
    • Gabe Black's avatar
      depthcharge: Wrap setting an initial post code in an arch specific function. · 075fd8be
      Gabe Black authored
      The read only and read/write main functions start by outputing a post code to
      show that depthcharge is running even if no other output works. Unfortunately
      that's architecture specific and can't be left in otherwise architecture
      agnostic code. This change wraps it in a new function called "sign_of_life"
      which can be implemented differently for different architectures.
      To minimize dependence on the stack, proper linking, etc., the function is
      defined as static inline and put directly in the architecture specific
      header file.
      TEST=Built and booted on Link. Built for Snow and saw errors about outb in
      main go away.
      Change-Id: Id2be74090574306b22114dab1bfd894deabf98e5
      Signed-off-by: default avatarGabe Black <gabeblack@google.com>
      Reviewed-on: https://gerrit-int.chromium.org/31641
      Reviewed-by: default avatarRonald G. Minnich <rminnich@google.com>
  7. 23 Jan, 2013 1 commit
  8. 20 Nov, 2012 1 commit
  9. 08 Oct, 2012 1 commit
  10. 28 Sep, 2012 1 commit
    • Gabe Black's avatar
      depthcharge: Add more subdirectories, and change how includes work. · c4f01c41
      Gabe Black authored
      This change adds some new subdirectories, makes includes relative to the base
      of the source directory, splits out the "time.c" vboot file into the vboot
      interface part and the time keeping part, and makes all the includes in C
      files and the include files themselves follow some conventions. The "include"
      directory is no longer used or needed and is deleted. Finally, a bunch of
      unnecessary includes of libpayload.h and libpayload-config.h were removed.
      The new subdirectories are:
      base: Basic functionality which doesn't fit elsewhere.
      boot: Files related to actually booting a Linux kernel.
      drivers: Files related to controlling devices.
      The conventions for including files is now to include all files not provided
      by depthcharge first using <>s, followed by includes which are provided by
      depthcharge using ""s, seperated by a blank line if applicable. Each group
      should be locally alphabetized.
      In the include files themselves, the compiler guard should start with two
      underscores, then have the path of the include with slashes replaced with
      underscores, then the name of the file with any dots replaced with underscores,
      and finally two more underscores. For instance:
       base/foo.h => __BASE_FOO_H__
      The #endif which ends the file should have the compiler guard after it in a
      /**/ style comment, like this:
       #endif /* __BASE_FOO_H__ */
      TEST=Built and booted on Link
      Change-Id: I4187b22e644a5dc1ac5a76f6f885e6ed4e4186a6
      Signed-off-by: default avatarGabe Black <gabeblack@google.com>
      Reviewed-on: https://gerrit-int.chromium.org/26164
      Reviewed-by: default avatarStefan Reinauer <reinauer@google.com>
  11. 27 Sep, 2012 1 commit
  12. 07 Sep, 2012 1 commit
  13. 31 Aug, 2012 2 commits