1. 08 Jan, 2016 1 commit
    • Jeffrey Lee's avatar
      Fix build error. Add HAL_PlatformName implementation. · 419bb1d2
      Jeffrey Lee authored
      Detail:
        s/Stubs, s/Top - Remove references to deleted HAL ATA calls
        s/GPIO, s/Top - Add implementation of HAL_PlatformName. Located in s/GPIO to allow easy re-use of the board revision table.
      Admin:
        Tested on Pi 2 Model B
      
      
      Version 0.51. Tagged as 'BCM2835-0_51'
      419bb1d2
  2. 15 Nov, 2015 1 commit
    • Jeffrey Lee's avatar
      Add basic HAL device for the official DSI display/touchscreen. Delete superfluous code. · 76db1228
      Jeffrey Lee authored
      Detail:
        Makefile, s/Touch - Basic HAL device for the official touchscreen, which just exposes the address of the buffer which the GPU periodically fills with a register dump of the touchscreen controller.
        hdr/BCM2835 - Remove old comment. Add new tag for getting the touchscreen buffer address.
        hdr/StaticWS - Remove old workspace entries. Add new entries for touchscreen.
        s/Messaging - Remove the messagebox tags which set a screen mode on startup (BCMVideo will handle that for us), and just blank the screen instead (to stop the GPU displaying a coloured square). Add tag to get the touchscreen buffer address.
        s/Top - Register touchscreen HAL device during HAL_InitDevices. Remove more old code.
      Admin:
        Tested on Raspberry Pi 1 B
      
      
      Version 0.50. Tagged as 'BCM2835-0_50'
      76db1228
  3. 08 Nov, 2015 1 commit
    • Ben Avison's avatar
      Compatibility with latest Pi firmware · 059ba08a
      Ben Avison authored
      Detail:
        * Recent versions of the firmware call the ROM's entry point in HYP mode
          (except for ARM11 boards which don't have it). Detect this eventuality
          and drop into SVC mode safely if so.
        * Whilst testing this fix, I discovered that occasionally, secondary CPUs
          seem to be being woken up, and start executing the ROM entry point also.
          This shouldn't be happening, but for safety's sake, I'm detecting this
          eventuality and putting any secondary CPUs into a sleep loop.
      Admin:
        Tested on Pi 1 and 2. Requires HdrSrc 2.56.
      
      Version 0.49. Tagged as 'BCM2835-0_49'
      059ba08a
  4. 29 Oct, 2015 1 commit
    • Robert Sprowson's avatar
      Build fix · e4b2b1fd
      Robert Sprowson authored
      Hdr:GPIODevice is already included via StaticWS.
      
      Version 0.48. Tagged as 'BCM2835-0_48'
      e4b2b1fd
  5. 14 Aug, 2015 1 commit
    • Jeffrey Lee's avatar
      Add extra memory barrier · fa58a55a
      Jeffrey Lee authored
      Detail:
        s/DMA - Although there are already plenty of memory barriers present to deal with the BCM2835's dodgy peripheral interface, code examination suggests one extra barrier is needed to make sure things will work correctly once the default NCB cache policy is Normal, non-cacheable rather than Device.
      Admin:
        Tested on Raspberry Pi 1
      
      
      Version 0.47. Tagged as 'BCM2835-0_47'
      fa58a55a
  6. 05 Aug, 2015 1 commit
    • Jeffrey Lee's avatar
      Don't map in VC memory · 765f5293
      Jeffrey Lee authored
      Detail:
        hdr/StaticWS, s/Top - Removed code to map in all of VC memory. Currently nothing needs it, and the code was broken anyway (debug output would corrupt a1 value given to OS_MapInIO)
      Admin:
        Tested on Raspberry Pi
      
      
      Version 0.46. Tagged as 'BCM2835-0_46'
      765f5293
  7. 26 Jul, 2015 1 commit
    • Jeffrey Lee's avatar
      Add basic HAL devices for the SPI controllers · f2a40e26
      Jeffrey Lee authored
      Detail:
        s/SPI - Basic HAL devices for the 3 SPI controllers. These expose the register addresses & IRQ numbers, and (for SPI1 & SPI2) deal with enabling/disabling the hardware and the shared IRQ line. GPIO mapping currently isn't dealt with - we don't know which pin group to use (SPI0 can use two different sets on the compute) or how many chip select lines are desired.
        Makefile - Add SPI source
        hdr/BCM2835 - Add aux SPI registers
        hdr/StaticWS - Reserve workspace for the HAL devices
        s/Top - Register new devices in HAL_InitDevices
      Admin:
        Tested on Raspberry Pi B & 2 B
      
      
      Version 0.45. Tagged as 'BCM2835-0_45'
      f2a40e26
  8. 16 Feb, 2015 1 commit
  9. 07 Feb, 2015 1 commit
    • Jeffrey Lee's avatar
      Add workaround for Cortex-A7 errata 814220 · 2b3d4781
      Jeffrey Lee authored
      Detail:
        hdr/BCM2835 - Errata 814220 states that the Cortex-A7 set/way cache maintenance operations violate the usual operation ordering rules, such that an L2 maintenance operation which is started after an L1 operation may actually complete before it, causing data corruption if the L1 data was to be evicted to the L2 entry. Implement the suggested workaround of performing a DSB when switching cache levels, rather than just at the end of the combined L1+L2 group of operations.
        Also, fix missing 99 label that would have caused a stack imbalance in the unlikely event of encountering a processor with fully coherent caches
      Admin:
        Tested on Raspberry Pi 2
      
      
      Version 0.43. Tagged as 'BCM2835-0_43'
      2b3d4781
  10. 03 Feb, 2015 1 commit
    • Ben Avison's avatar
      Properly supports new board revision scheme for SD source file · 1b785be4
      Ben Avison authored
      Detail:
        Parses the revision ID bitfield for new-style revisions - should provide
        some level of forward compatibility at last. The equivalent code in s.GPIO
        hasn't been tackled yet, mainly because it requires some thought about how
        best to handle the Compute module (given that the daughter card can be
        plugged into any number of devices, each of which will use GPIO differently).
      Admin:
        Tested on Compute module and Pi 2 with latest firmware.
      
      Version 0.42. Tagged as 'BCM2835-0_42'
      1b785be4
  11. 02 Feb, 2015 2 commits
    • Ben Avison's avatar
      Adapt to release version of Raspberry Pi 2 firmware · 0f6c0f83
      Ben Avison authored
      Detail:
        The board revision scheme has changed since pre-release firmware, so the
        previous version of the SD code would have misidentified a Pi 2 (as well
        as the model A+) as a Compute module. It looks like in future, board
        revisions could be a more meaningful bitfield rather than the order-of-
        release index that's been used up to now, but at this point we can still
        manage with a cunning combination of CMP and TEQ tests. Note that the GPIO
        part of the HAL hasn't yet been updated to be aware of the new board
        revisions.
      
      
      Version 0.41. Tagged as 'BCM2835-0_41'
      0f6c0f83
    • Ben Avison's avatar
      Add support for Raspberry Pi Compute module and Raspberry Pi 2 · 60752490
      Ben Avison authored
      Detail:
        * Compute module support consists of eMMC support in the SDHCI driver. The
          eMMC chip on the Compute module only works reliably if under-clocked to
          25 MHz.
        * Pi 1 vs Pi 2 differences are selected at runtime by checking the CPU ID,
          so a single ROM image will work with both boards.
        * Added ARMv7 cache maintenance routine for use on Pi 2.
        * The physical address of the peripherals has moved in Pi 2 to make space
          for the 1 GB of RAM.
        * The ARM physical address space is mapped differently onto the GPU
          address space in Pi 2 because the ARM now uses the L2 cache that comes
          with the Cortex-A7 instead of the GPU's L2 cache.
        * Still waiting for confirmation on the board revision ID that will be
          used for Pi 2, so may require further tweaks for production releases.
      
      
      Version 0.40. Tagged as 'BCM2835-0_40'
      60752490
  12. 30 Oct, 2014 1 commit
  13. 25 Oct, 2014 1 commit
  14. 09 Oct, 2014 1 commit
    • Robert Sprowson's avatar
      Add entry to boardtypes for GPIO for Compute module · de83026a
      Robert Sprowson authored
      There doesn't seem to be a pattern emerging for the allocation of board types, so it's likely that this table will need revisiting again in future as moving the catch all "-1" entry along was identifying a Compute module as a B+.
      Submission from TankStage.
      
      Version 0.37. Tagged as 'BCM2835-0_37'
      de83026a
  15. 17 Sep, 2014 1 commit
    • Robert Sprowson's avatar
      Propagate fix from IOMD-0_31 · 1adadc21
      Robert Sprowson authored
      Got the IIC transfer data offset wrong, harmless in this HAL since the stack already had to have space for 2 complete transfers.
      Not tested.
      
      Version 0.36. Tagged as 'BCM2835-0_36'
      1adadc21
  16. 14 Jul, 2014 1 commit
    • Ben Avison's avatar
      Support the Raspberry Pi model B+ · 4830dcfe
      Ben Avison authored
      Detail:
        The activity GPIO pin has been reassigned and its sense is inverted,
        compared to earlier boards. More importantly, the SD card detect pin has
        been removed entirely, so we need to signal to the SD stack to use its
        new timeout-based state machine (rather than polling for card presence).
      Admin:
        Already in use in RC12a.
      
      Version 0.35. Tagged as 'BCM2835-0_35'
      4830dcfe
  17. 25 Jun, 2014 1 commit
  18. 19 Jun, 2014 1 commit
    • Jeffrey Lee's avatar
      Add support code required for DWCDriver 'FIQ fix' · af7cf4e9
      Jeffrey Lee authored
      Detail:
        hdr/BCM2835, hdr/USB, s/USB - Update HAL_USBControllerInfo to return the MPHI address & IRQ number
        s/Interrupts - Add some missing memory barriers. Change FIQ enable/disable calls to not alter IRQ masking of the interrupt - simplifies the code and avoids any ordering issues with code that switches interrupts between IRQ & FIQ
        s/Timers - Add missing memory barrier
      Admin:
        Tested on Raspberry Pi
        Requires Kernel-5_35-4_79_2_227 to build
      
      
      Version 0.34. Tagged as 'BCM2835-0_34'
      af7cf4e9
  19. 29 Apr, 2014 1 commit
    • Ben Avison's avatar
      Make HAL report keyboard present during boot · 7380897b
      Ben Avison authored
      Detail:
        Given the complexity of the USB system on the BCM2835, it seems unlikely
        that the HAL keyboard scan will ever be implemented. Not only does this
        mean it doesn't honour any of the CMOS reset or monitor configuration keys,
        but it means the kernel will always attempt to boot the configured
        filing system and drive, irrespective of the *Configure [No]Boot setting,
        after printing "No keyboard present - autobooting". By changing the HAL
        to report a keyboard present but with no keys held down, we at least get
        the [No]Boot option honoured again (even if the Shift key can't be used
        to invert its sense), and have the message suppressed.
      Admin:
        Tested on a Raspberry Pi.
      
      Version 0.33. Tagged as 'BCM2835-0_33'
      7380897b
  20. 13 Apr, 2014 1 commit
  21. 19 Dec, 2013 1 commit
    • Jeffrey Lee's avatar
      Add RTC HAL device · f38116c4
      Jeffrey Lee authored
      Detail:
        CJE's RTC module uses a DS1307-compatible RTC chip similar to the one used in the Iyonix. Previously the kernel handled talking to it, but now that low-level RTC handling has been moved out of the kernel we need an RTC HAL device in the BCM2835 HAL instead.
        s/RTC - A copy of s.RTC from the Tungsten HAL, relicensed as BSD with permission from Rob Sprowson
        Makefile, hdr/StaticWS, s/Top - Additional changes needed to hook the code into the HAL
      Admin:
        Tested on Raspberry Pi, but without an RTC module fitted
        However the similarity of the clock chip to the one in the Iyonix should mean there's little chance of this code failing to work correctly when an RTC is fitted
      
      
      Version 0.31. Tagged as 'BCM2835-0_31'
      f38116c4
  22. 15 Dec, 2013 1 commit
    • Jeffrey Lee's avatar
      Remove obsolete stub HAL video API implementation · dd550494
      Jeffrey Lee authored
      Detail:
        s/Top, s/Video - Removed obsolete HAL video API implementation. A stub implementation is no longer required for systems that have a GraphicsV driver in a module, and can even cause problems if the OS decides to use the HAL implementation instead of the module one.
      Admin:
        Tested in BCM2835 ROM
        Requires Kernel-5_35-4_79_2_203
      
      
      Version 0.30. Tagged as 'BCM2835-0_30'
      dd550494
  23. 22 Jan, 2013 1 commit
    • Jeffrey Lee's avatar
      Implement HAL_IRQMax · 495018ca
      Jeffrey Lee authored
      Detail:
        hdr/BCM2835 - Add definition for highest IRQ number
        s/Boot, s/Interrupts - Added HAL_IRQMax implementation, to ensure correct functionality with latest Kernel
      Admin:
        Tested on 256MB Pi model B
        Requires Kernel-5_35-4_79_2_182
      
      
      Version 0.29. Tagged as 'BCM2835-0_29'
      495018ca
  24. 20 Jan, 2013 1 commit
  25. 18 Sep, 2012 3 commits
    • Robert Sprowson's avatar
      Reserve 5 bytes for timestamping · 79e44eed
      Robert Sprowson authored
      Also, swap magic numbers for defines.
      
      Version 0.27. Tagged as 'BCM2835-0_27'
      79e44eed
    • Jeffrey Lee's avatar
      Fix building with latest kernel · cb672d54
      Jeffrey Lee authored
      Detail:
        s/Top, s/Video - Renamed HAL_Video entries to match naming convention used by latest kernel
      Admin:
        Tested on Raspberry Pi with high processor vectors
      
      
      Version 0.26. Tagged as 'BCM2835-0_26'
      cb672d54
    • Jeffrey Lee's avatar
      Add a video HAL device to allow BCMVideo to determine which DMA channel it can use for render ops · 47a0e5d7
      Jeffrey Lee authored
      Detail:
        hdr/StaticWS, s/Top, s/Video - Added a simple VDU HAL device that exposes a DMA channel to BCMVideo for use with GraphicsV_Render
        hdr/BCM2835 - Don't allow DMA channel 12 to be used; latest firmware seems to have a bug which claims its free when in reality it isn't.
        s/Messaging, s/DMA - Adjust DMA init to allow the video device to claim a DMA channel before the DMA devices are initialised
      Admin:
        Tested on Raspberry Pi with high processor vectors
      
      
      Version 0.25. Tagged as 'BCM2835-0_25'
      47a0e5d7
  26. 10 Sep, 2012 1 commit
    • Jeffrey Lee's avatar
      Use BCS1 instead of BCS0 for IIC when running on rev 2 boards · a1c4df2f
      Jeffrey Lee authored
      Detail:
        hdr/BCM2835, hdr/StaticWS, s/IIC - On rev 2 boards the usage of BSC0 and BSC1 have been swapped, such that BSC1 is now sent to the expansion header instead of BSC0.
        To allow RISC OS to continue to work with clock chips and other hardware fitted to the header, expose BSC1 to RISC OS if on a rev 2 board, or BSC0 if on a rev 1.
      Admin:
        Changes received from Dave Higton
        Tested by Dave on rev 1 & rev 2 boards, with IIC devices
        Tested by me on rev 1 board (with no IIC devices fitted)
      
      
      Version 0.24. Tagged as 'BCM2835-0_24'
      a1c4df2f
  27. 08 Sep, 2012 2 commits
    • Jeffrey Lee's avatar
      Implement HAL_PhysInfo. Other misc tweaks. · 5a8b82be
      Jeffrey Lee authored
      Detail:
        s/Top - Added HAL_PhysInfo implementation. Tweaked HAL_Reset to reduce chances of failure.
        s/Stubs - Removed obsolete, unused UART stubs. Use KbdFlag_Done instead of magic number.
      Admin:
        Tested on Raspberry Pi
      
      
      Version 0.23. Tagged as 'BCM2835-0_23'
      5a8b82be
    • Jeffrey Lee's avatar
      Read board model, revision, and available DMA channels from messaging channel.... · 59e36802
      Jeffrey Lee authored
      Read board model, revision, and available DMA channels from messaging channel. Report board revision via GPIO HAL device. Recover lost ROM relocation code.
      
      Detail:
        hdr/StaticWS, s/Messaging, s/Top - Now reads board model, revision and available DMA channels from messaging channel
        hdr/StaticWS, s/GPIO - Updated GPIO HAL device to report board revision instead of a generic response of 'unknown'
        s/Top - Recovered ROM relocation code that got lost during a merge. End of ROM image no longer being corrupted, and RISC OS now sees correct amount of RAM.
        s/DMA - Ditch old code to read available DMA channels and use value read by HAL_QueryPlatform instead.
      Admin:
        Tested on Raspberry Pi (B rev 1) with various start.elf sizes & versions
        DMA channel reporting only available with latest firmware (i.e. 8th Sep)
        Board revision number read by messaging channel seems to match that returned by /proc/cpuinfo on Linux
      
      
      Version 0.22. Tagged as 'BCM2835-0_22'
      59e36802
  28. 02 Sep, 2012 1 commit
    • Jeffrey Lee's avatar
      Strip out video code & on-screen debug · d56f8a14
      Jeffrey Lee authored
      Detail:
        Makefile, s/Display - Deleted on-screen debug code
        hdr/BCM2835, hdr/StaticWS, s/IIC, s/Messaging, s/Stubs, s/Top, s/UART - Strip out calls to on-screen debug code, and a few bits of video code
        s/Video - Video code removed and replaced with stub functions similar to other HALs. Only remaining useful code is HAL_Video_StartupMode, which in time should probably be moved to BCMVideo as well.
      Admin:
        Tested on Raspberry Pi with high processor vectors
      
      
      Version 0.21. Tagged as 'BCM2835-0_21'
      d56f8a14
  29. 28 Aug, 2012 1 commit
    • Ben Avison's avatar
      Addition of I2C support · ade8e2c2
      Ben Avison authored
      Detail:
        Implementation of the high-level HAL IIC interface provided by Dave Higton.
      Admin:
        Checked it builds and runs at ROOL.
      
      Version 0.20. Tagged as 'BCM2835-0_20'
      ade8e2c2
  30. 24 Aug, 2012 1 commit
  31. 08 Aug, 2012 1 commit
    • Jeffrey Lee's avatar
      Don't claim that we support soft-off · e03f92cf
      Jeffrey Lee authored
      Detail:
        s/Top - Fix HAL_PlatformInfo to not claim that we support soft-off
      Admin:
        Tested in Pi ROM
        Fixes machine restarting after shutdown
      
      
      Version 0.18. Tagged as 'BCM2835-0_18'
      e03f92cf
  32. 02 Aug, 2012 1 commit
    • Jeffrey Lee's avatar
      Add GPIO & VCHIQ HAL devices. Fix FlushDataCache macro to perform a clean &... · 3b36df75
      Jeffrey Lee authored
      Add GPIO & VCHIQ HAL devices. Fix FlushDataCache macro to perform a clean & invalidate instead of just an invalidate.
      
      Detail:
        s/GPIO - Basic implementation of the GPIO HAL device to allow the GPIO module to detect the board type
        s/VCHIQ, hdr/StaticWS - New VCHIQ HAL device which exposes the functionality required by the work-in-progress VCHIQ driver.
        Makefile, s/Top - Hook up the new files/devices
        hdr/BCM2835 - Make the FlushDataCache macro perform a clean & invalidate, to match the behaviour of FlushDataCacheRange
      Admin:
        Tested on Raspberry Pi with high processor vectors
      
      
      Version 0.17. Tagged as 'BCM2835-0_17'
      3b36df75
  33. 23 Jul, 2012 1 commit
  34. 22 Jul, 2012 1 commit
  35. 19 Jul, 2012 1 commit
    • John Ballance's avatar
      Various updates to do with the messaging channel, HAL_MachineID, and HAL_Reset · ef241880
      John Ballance authored
      Detail:
      	HAL_Reset now causes a complete reboot of the machiine. It isnt yet properly called from
      	the kernel.. I've not investigated why yet. Behaviour tested using OS_Hardware call
      
      	HAL_MachineID, with the github start.elf from 18 July 2012 will provide a valid MAC address ..
      	i.e. that specific to this machine. The a1 value in HAL_ExtendedID needs to be set 0 for this to be reported
      	by OS_ReadSysInfo .. unfortunately, again at this stage, it stalls the boot when set 0, so just for now
      	the committed value for a1 in HAL_ExtendedID is not 0 .
      
      	centralised messaging routine added. This is used a fair bit in acquiring the operating environment
      	Not yet used in the DMA stuff. probably ought to be. At present the messaging channel this mainly
      	handles is not complete, so information from this code is still WIP
      
      Admin:
        (highlight level of testing that has taken place)
        (bugfix number if appropriate)
      
      
      Version 0.14. Tagged as 'BCM2835-0_14'
      ef241880
  36. 16 Jul, 2012 1 commit
    • Jeffrey Lee's avatar
      Improve RAM detection/setup code. Update mailbox code in DMA driver. · d05a29d9
      Jeffrey Lee authored
      Detail:
        s/Top - Improved RAM detection/setup to not assume that the OS image is at &0000 (current start.elf seems to place it at &8000). New code correctly supports compressed ROMs, and has some basic code implemented to read the RAM setup from the mailbox property interface (currently disabled, pending official firmware rollout + final testing)
        s/DMA - Updated mailbox property interface code to adhere to the current spec. Still needs testing with release firmware (the start.elf I'm using seems to report no DMA channels as being available)
      Admin:
        Tested with a release start.elf (July 9th, or thereabouts) as well as a more recent test version containing initial mailbox property interface implementation
        Fixes issue with last 32K of ROM being wiped on startup
      
      
      Version 0.13. Tagged as 'BCM2835-0_13'
      d05a29d9