1. 30 Jun, 2016 2 commits
    • Jeffrey Lee's avatar
      Delete STB code · 9a571a08
      Jeffrey Lee authored
      Detail:
        This change gets rid of the following switches from the source (picking appropriate code paths for a desktop build):
        * STB
        * RO371Timings
        * NormalSpeedROMS
        * AutoSpeedROMS
        * RISCPCBurstMode
        * InterlacedPointer
        * ParallelFlashUpgrade (and s/FlashROM file)
        * Embedded_UI
        Some of the deleted code might be worth revisiting in future:
        * OS_ReadSysInfo 4 support for storing the MAC in alternate CMOS locations (including 2nd copy for error checking) or fetching via Service_MachineAddress
        * Mouse handling changes, possibly aimed at hiding the mouse pointer if a mouse isn't connected
        * More strict CMOS validation in s/NewReset
      Admin:
        Identical binary to previous revision for IOMD & Raspberry Pi builds
      
      
      Version 5.50. Tagged as 'Kernel-5_50'
      9a571a08
    • Jeffrey Lee's avatar
      Delete pre-HAL and 26bit code · 7d5bfc66
      Jeffrey Lee authored
      Detail:
        This change gets rid of the following switches from the source (picking appropriate code paths for a 32bit HAL build):
        * HAL
        * HAL26
        * HAL32
        * No26bitCode
        * No32bitCode
        * IncludeTestSrc
        * FixR9CorruptionInExtensionSWI
        Various old files have also been removed (POST code, Arc/STB keyboard drivers, etc.)
      Admin:
        Identical binary to previous revision for IOMD & Raspberry Pi builds
      
      
      Version 5.49. Tagged as 'Kernel-5_49'
      7d5bfc66
  2. 24 May, 2016 1 commit
    • Jeffrey Lee's avatar
      Add OS_PlatformFeatures 0 flag to indicate that the "Unknown... · 417d0f7c
      Jeffrey Lee authored
      Add OS_PlatformFeatures 0 flag to indicate that the "Unknown OS_PlatformFeatures reason codes always raise an error" bug has been fixed
      
      Detail:
        hdr/OSMisc - Use bit 31 to indicate that the error reporting bug has been fixed
        s/ARMops - Make sure the flag is set when preparing ProcessorFlags (i.e. the OS_PlatformFeatures 0 flags)
      Admin:
        Tested on Raspberry Pi
      
      
      Version 5.35, 4.79.2.325. Tagged as 'Kernel-5_35-4_79_2_325'
      417d0f7c
  3. 19 May, 2016 1 commit
    • Jeffrey Lee's avatar
      Add new OS_PlatformFeatures reason code for reading CPU features (inspired by... · 9944f0f8
      Jeffrey Lee authored
      Add new OS_PlatformFeatures reason code for reading CPU features (inspired by ARMv6+ CPUID scheme). Add OS_ReadSysInfo 8 flags for indicating the alignment mode the ROM was built with. Fix long-standing bug with OS_PlatformFeatures when an unknown reason code is used.
      
      Detail:
        s/CPUFeatures, hdr/OSMisc, hdr/KernelWS - Code and definitions for reading CPU features and reporting them via OS_PlatformFeatures 34. All the instruction set features which are exposed by the CPUID scheme and which are relevant to RISC OS are exposed, along with a few extra flags which we derive ourselves (e.g. things relating to < ARMv4, and some register usage restrictions in instructions). s/CPUFeatures is designed to be easily copyable into a future version of CallASWI without requiring any changes.
        s/ARMops - Read and cache CPU features during ARMop initialisation
        s/GetAll - GET new file
        s/Kernel - Hook up the CPU features code to OS_PlatformFeatures. Fix a long standing stack imbalance bug (fixed in RISC OS 3.8, but never merged back to our main branch) which meant that calling OS_PlatformFeatures with an invalid reason code would raise an error, even if it was the X form of the SWI that was called. Similar fix also applied to the unused service call code, along with a fix for the user's R1-R9 being corrupt (shuffled up one place) should an error have been generated.
        s/MemInfo - Extra LTORG needed to keep things happy
        s/Middle - Extend OS_ReadSysInfo 8 to include flags for indicating what memory alignment mode (if any) the OS relies upon. Together with OS_PlatformFeatures 34 this could e.g. be used by !CPUSetup to determine which options should be offered to the user.
      Admin:
        Tested on Raspberry Pi 1, 2, 3
      
      
      Version 5.35, 4.79.2.319. Tagged as 'Kernel-5_35-4_79_2_319'
      9944f0f8
  4. 06 Apr, 2016 1 commit
    • Jeffrey Lee's avatar
      Revise error pointer validity checks · 67837a43
      Jeffrey Lee authored
      Detail:
        s/Kernel, hdr/KernelWS - Avoid performing error pointer checks for XOS_GenerateError, since (a) it's a no-op as far as errors are concerned, and (b) many programs take advantage of that fact and abuse the SWI for other purposes (triggering callbacks, BASIC string conversion, etc.)
      Admin:
        Tested on Raspberry Pi
        Fixes issue reported on forums with Sunfish crashing:
        https://www.riscosopen.org/forum/forums/5/topics/4060
      
      
      Version 5.35, 4.79.2.314. Tagged as 'Kernel-5_35-4_79_2_314'
      67837a43
  5. 05 Apr, 2016 1 commit
    • Jeffrey Lee's avatar
      Add SWI error pointer validation, SeriousErrorV hooks, and OS_ReadSysInfo 15 · b4cf3959
      Jeffrey Lee authored
      Detail:
        Resources/UK/Messages, hdr/KernelWS, s/Kernel - On return from a SWI with V set, do some basic validity checks on the error pointer in order to try and catch buggy SWIs that return bad pointers or invalid error blocks. If a bad pointer is found we'll substitute it with a pointer to a different error block, which has the SWI number in the error message, to allow the user to identify the source of the problem. (There's also a chance we'll crash when investigating a bad pointer, but crashing here in the kernel is preferable to crashing elsewhere because R12 should still contain the SWI number)
        hdr/OSMisc - Define SeriousErrorV reason codes and extended ROM footer entry IDs
        hdr/Options - Remove HangWatch integration flag, obsolete now that SeriousErrorV is available
        s/ArthurSWIs - Keep defaultvectab up to date with vector allocations
        s/Middle - Update serious error handling to call SeriousErrorV at several key points. This allows for accurate crash dumps to be obtained, along with a mechanism to warn low-level components such as RTSupport that the privileged mode stacks are being flattened.
        s/Middle - Add OS_ReadSysInfo 15, for enumerating extended ROM footer entries
        s/PMF/osbyte - Update InitNewFX0Error to use the ROM footer entry ID defined in hdr/OSMisc
      Admin:
        Tested on Pi 1B, 2B, 3B
      
      
      Version 5.35, 4.79.2.313. Tagged as 'Kernel-5_35-4_79_2_313'
      b4cf3959
  6. 04 Apr, 2016 1 commit
  7. 25 Mar, 2016 1 commit
    • Jeffrey Lee's avatar
      New HAL device ID reservations · ff04e525
      Jeffrey Lee authored
      Detail:
        hdr/HALDevice - Reserve device IDs for BCM283x CPU clock device and GPU mailbox device
      Admin:
        Tested on Raspberry Pi 1B/2B/3B
      
      
      Version 5.35, 4.79.2.310. Tagged as 'Kernel-5_35-4_79_2_310'
      ff04e525
  8. 17 Mar, 2016 1 commit
  9. 10 Mar, 2016 1 commit
    • Jeffrey Lee's avatar
      Cache maintenance fixes · b0682acb
      Jeffrey Lee authored
      Detail:
        This set of changes tackles two main issues:
        * Before mapping out a cacheable page or making it uncacheable, the OS performs a cache clean+invalidate op. However this leaves a small window where data may be fetched back into the cache, either accidentally (dodgy interrupt handler) or via agressive prefetch (as allowed for by the architecture). This rogue data can then result in coherency issues once the pages are mapped out or made uncacheable a short time later.
          The fix for this is to make the page uncacheable before performing the cache maintenance (although this isn't ideal, as prior to ARMv7 it's implementation defined whether address-based cache maintenance ops affect uncacheable pages or not - and on ARM11 it seems that they don't, so for that CPU we currently force a full cache clean instead)
        * Modern ARMs generally ignore unexpected cache hits, so there's an interrupt hole in the current OS_Memory 0 "make temporarily uncacheable" implementation where the cache is being flushed after the page has been made uncacheable (consider the case of a page that's being used by an interrupt handler, but the page is being made uncacheable so it can also be used by DMA). As well as affecting ARMv7+ devices this was found to affect XScale (and ARM11, although untested for this issue, would have presumably suffered from the "can't clean uncacheable pages" limitation)
          The fix for this is to disable IRQs around the uncache sequence - however FIQs are currently not being dealt with, so there's still a potential issue there.
        File changes:
        - Docs/HAL/ARMop_API, hdr/KernelWS, hdr/OSMisc - Add new Cache_CleanInvalidateRange ARMop
        - s/ARM600, s/VMSAv6 - BangCam updated to make the page uncacheable prior to flushing the cache. Add GetTempUncache macro to help with calculating the page flags required for making pages uncacheable. Fix abort in OS_MMUControl on Raspberry Pi - MCR-based ISB was resetting ZeroPage pointer to 0
        - s/ARMops - Cache_CleanInvalidateRange implementations. PL310 MMU_ChangingEntry/MMU_ChangingEntries refactored to rely on Cache_CleanInvalidateRange_PL310, which should be a more optimal implementation of the cache cleaning code that was previously in MMU_ChangingEntry_PL310.
        - s/ChangeDyn - Rename FastCDA_UpFront to FastCDA_Bulk, since the cache maintenance is no longer performed upfront. CheckCacheabilityR0ByMinusR2 now becomes RemoveCacheabilityR0ByMinusR2. PMP LogOp implementation refactored quite a bit to perform cache/TLB maintenance after making page table changes instead of before. One flaw with this new implementation is that mapping out large areas of cacheable pages will result in multiple full cache cleans while the old implementation would have (generally) only performed one - a two-pass approach over the page list would be needed to solve this.
        - s/GetAll - Change file ordering so GetTempUncache macro is available earlier
        - s/HAL - ROM decompression changed to do full MMU_Changing instead of MMU_ChangingEntries, to make sure earlier cached data is truly gone from the cache. ClearPhysRAM changed to make page uncacheable before flushing cache.
        - s/MemInfo - OS_Memory 0 interrupt hole fix
        - s/AMBControl/memmap - AMB_movepagesout_L2PT now split into cacheable+non-cacheable variants. Sparse map out operation now does two passes through the page list so that they can all be made uncacheable prior to the cache flush + map out.
      Admin:
        Tested on StrongARM, XScale, ARM11, Cortex-A7, Cortex-A9, Cortex-A15, Cortex-A53
        Appears to fix the major issues plaguing SATA on IGEPv5
      
      
      Version 5.35, 4.79.2.306. Tagged as 'Kernel-5_35-4_79_2_306'
      b0682acb
  10. 29 Feb, 2016 1 commit
    • Ben Avison's avatar
      Support for ARMv8 · 66b90f9d
      Ben Avison authored
      Detail:
        * Filled in CPU tables for publicly documented ARMv8 cores (Cortex-A53,57,72).
        * Recent ARM ARMs (e.g. section B1.9.2 of the ARMv7AR ARM) permit the core to
          take an undefined instruction exception upon encountering even not-taken
          conditional undefined instructions. This option is exercised by the
          Cortex-A53, unlike all ARMv7 cores previously supported by RISC OS. This
          unfortunately trips up a lot of kernel code that adapts to different
          architectures at runtime. These have now all been replaced with branches
          over the affected code on the opposite condition.
        * Fixed bug in HAL_InvalidateCache_ARMvF: for the main body of the loop,
          which was written as though to act on the CLIDR register, r8 actually
          contained the CTR register instead.
      Admin:
        Tested on Raspberry Pi 3
      
      Version 5.35, 4.79.2.304. Tagged as 'Kernel-5_35-4_79_2_304'
      66b90f9d
  11. 28 Feb, 2016 2 commits
    • Robert Sprowson's avatar
      Define some extra platform feature flags · 96546b5a
      Robert Sprowson authored
      For disc based applications (ie. those that don't know the architecture at build time, like a ROM would) we have OS_PlatformFeatures to provide an abstract way of seeing when new chunks of instructions get added. Back at ARMv6 ARM deprecated SWP, but currently we have no way of knowing that at runtime without grubbing round the coprocessor registers.
      Add 3 new flags
      * One to say LDR/STREX is (not) available
      * One to say that SWP/SWPB is (not) available
      * One to say that CLREX and LDR/STREX[B|H|D] is (not) available
      shame it took a few goes for ARM to bring in these variants, requiring 3 flags not 1.
      
      Also:
      Condition the exception on vector read code on No32bitCode, rather than just having it permanently disabled.
      Improve the HAL device docs.
      
      Tested on a StrongARM Risc PC, Model B Pi, and Titanium.
      
      Version 5.35, 4.79.2.303. Tagged as 'Kernel-5_35-4_79_2_303'
      96546b5a
    • Robert Sprowson's avatar
      Change struct layouts for C module compatibility · d5669ff5
      Robert Sprowson authored
      The HAL device APIs are modelled around the C APCS, and furthermore can be implemented either in a HAL (with SB) or RISC OS module (with R12). Therefore, exporting SB or requiring its use as a function argument precludes implementing the device in a normal module.
      For examples of how to keep track of SB for the HAL case, see AudC or BMU or CPUClk or DMA or GPIO or IDE or Mixer or RTC or SDHCI or CacheC devices, which typically keep it in their HAL workspace referenced relative to the device pointer passed in a1/R0.
      d5669ff5
  12. 05 Jan, 2016 1 commit
    • Robert Sprowson's avatar
      Add OS_ReadSysInfo 9,6 and 9,7 · ea837302
      Robert Sprowson authored
      Subreason 7 returns a string naming the HAL platform. Use HAL entry 97 to get this, and obsolete 97/98/99 in favour of using a HAL device. Line up the HAL video entries to match the others.
      Subreason 6 is just back filling one ROL added, testing this on RISC OS Select just returned the OS name so we do the same now (same as subreason 0, not sure what ROL's distinction was for).
      Allocate a HAL device for PATA IDE controllers, and the 2 known ones to date - Tungsten and IOMD systems.
      
      Version 5.35, 4.79.2.301. Tagged as 'Kernel-5_35-4_79_2_301'
      ea837302
  13. 01 Dec, 2015 1 commit
    • Jeffrey Lee's avatar
      Allocate some extra HAL device IDs · 4639dcc3
      Jeffrey Lee authored
      Detail:
        hdr/HALDevice - Allocate device IDs for iMX6 HDMI audio controller, and a generic software mixer
      Admin:
        Tested in iMX6 ROM build
      
      
      Version 5.35, 4.79.2.300. Tagged as 'Kernel-5_35-4_79_2_300'
      4639dcc3
  14. 14 Nov, 2015 1 commit
    • Jeffrey Lee's avatar
      Fix overriding of default CMOS settings. Reserve HAL device ID for the... · 5a0a4b96
      Jeffrey Lee authored
      Fix overriding of default CMOS settings. Reserve HAL device ID for the official Raspberry Pi touchscreen/display.
      
      Detail:
        s/PMF/i2cutils - Move $CMOS_Override to the start of DefaultCMOSTable, so that it can be used to override values which are already in the table (since NVMemory_ResetValue stops its search on the first address match)
        hdr/HALDevice - Add new Touchscreen device type and reserve an ID for the official Pi touchscreen controller
      Admin:
        Tested on Raspberry Pi
        Fixes filesystem incorrectly defaulting to ADFS
      
      
      Version 5.35, 4.79.2.299. Tagged as 'Kernel-5_35-4_79_2_299'
      5a0a4b96
  15. 08 Nov, 2015 1 commit
    • Ben Avison's avatar
      New method to control default CMOS settings · e3c0cd6d
      Ben Avison authored
      Detail:
        Rather than fill the Kernel sources with an ever-increasing number of
        platform-specific switches to control the default CMOS settings, this
        change introduces a variable which passes the requirements direct from
        the Components file to the Kernel. Since it uses a comma-separated list
        of address/value pairs, it is inherently extensible. All the symbolic
        names of addresses from Hdr:CMOS are available, and any valid objasm
        expression can be used for the value.
      Admin:
        This removes the need for the EnforceSCSI4 switch, and leaves almost
        no uses of the Machine variable in the Kernel either.
      
      
      Version 5.35, 4.79.2.298. Tagged as 'Kernel-5_35-4_79_2_298'
      e3c0cd6d
  16. 07 Nov, 2015 1 commit
    • ROOL's avatar
      Raise some workspace limits, define extra devices · f50a7d61
      ROOL authored
      Detail:
        Raise the maximum number of interrupts and IIC buses acceptable, to account for the OMAP5 port.
        Add TLV320/TLV320/SDMA/SDMA/AM572x/GC320/CPSW/SynopsisDWC for Titanium.
        Add OMAP5/OMAP5/OMAP5/TWL6037/OMAP5/OMAP5/SynopsisDWC for OMAP5.
      Admin:
        There's likely some rationalisation to be had here, these controllers especially across the OMAP3/4/5 are probably the same thing really and don't merit individual allocations.
      
      Version 5.35, 4.79.2.297. Tagged as 'Kernel-5_35-4_79_2_297'
      f50a7d61
  17. 28 Oct, 2015 1 commit
    • Robert Sprowson's avatar
      Hand off ownership of GPIODevice · 9274df1c
      Robert Sprowson authored
      The kernel has no place holding this header export, since it doesn't use it nor implement any of its interfaces.
      
      Version 5.35, 4.79.2.296. Tagged as 'Kernel-5_35-4_79_2_296'
      9274df1c
  18. 16 Oct, 2015 1 commit
  19. 24 Sep, 2015 1 commit
  20. 01 Sep, 2015 1 commit
    • Jeffrey Lee's avatar
      Remove OS_Memory 10 and associated code · 6ee2f464
      Jeffrey Lee authored
      Detail:
        s/MemInfo - Remove OS_Memory 10 (free pool locking). Locking the free pool has never been a very nice thing to do, so now that there's no logical mapping of the free pool it seems like it's a good time to outlaw the behaviour altogether.
        s/ChangeDyn - No free pool locking means one less thing to check when claiming the OS_ChangeDynamicArea mutex.
        hdr/KernelWS - VRAMRescue_control workspace variable is no longer needed
      Admin:
        Tested on Pandaboard
      
      
      Version 5.35, 4.79.2.285. Tagged as 'Kernel-5_35-4_79_2_285'
      6ee2f464
  21. 31 Aug, 2015 1 commit
    • Jeffrey Lee's avatar
      Add initial support for "physical memory pools" · 54872d8c
      Jeffrey Lee authored
      Detail:
        This set of changes adds support for "physical memory pools" (aka PMPs), a new type of dynamic area which allow physical pages to be claimed/allocated without mapping them in to the logical address space. PMPs have full control over which physical pages they use (similar to DAs which request specific physical pages), and also have full control over the logical mapping of their pages (which pages go where, and per-page access/cacheability control).
        Currently the OS makes use of two PMPs: one for the free pool (which now has a logical size of zero - freeing up gigabytes of logical space), and one for the RAM disc (logical size of 1MB, allowing for a physical size limited only by the amount of free memory)
        Implementing these changes has required a number of other changes to be made:
        * The CAM has been expanded from 8 bytes per entry to 16 bytes per entry, in order to allow each RAM page to store information about its PMP association
        * The syst...
      54872d8c
  22. 20 Aug, 2015 1 commit
    • John Ballance's avatar
      Corrected makefile omissions. · da41d3a5
      John Ballance authored
        Removed errant tab characters from EtherDevice header
      Detail:
      Admin:
      
      
      Version 5.35, 4.79.2.283. Tagged as 'Kernel-5_35-4_79_2_283'
      da41d3a5
  23. 19 Aug, 2015 1 commit
  24. 14 Aug, 2015 1 commit
    • Jeffrey Lee's avatar
      Replace WriteBuffer_Drain ARMop with a suite of memory barrier ARMops · afc3b390
      Jeffrey Lee authored
      Detail:
        - Docs/HAL/ARMop_API - Updated with documentation for the new ARMops.
        - s/ARMops - Set up pointers for the new memory barrier ARMops. Add full implementations for ARMv6 & ARMv7; older architectures should be able to get by with a mix of null ops & write buffer drain ops. Update ARMopPtrTable to validate structure against the list in hdr/OSMisc
        - hdr/KernelWS - Reserve workspace for new ARMops. Free up a bit of space by limiting ourselves to 2 cache levels with ARMv7. Remove some unused definitions.
        - hdr/OSMisc - New header defining OS_PlatformFeatures & OS_MMUControl reason codes, OS_PlatformFeatures 0 flags, and OS_MMUControl 2 ARMop indices
        - Makefile - Add export rules for OSMisc header
        - hdr/ARMops, s/ARM600, s/VMSAv6 - Remove CPUFlag_* and MMUCReason_* definitions. Update OS_MMUControl write buffer drain to use DSB_ReadWrite ARMop (which is what most existing write buffer drain implementations have been renamed to).
        - s/GetAll - Get Hdr:OSMisc
        - s/Kernel - Use OS_PlatformFeatures reason code symbols
        - s/vdu/vdudecl - Remove unused definition
      Admin:
        Tested on ARM11, Cortex-A8, Cortex-A9
      
      
      Version 5.35, 4.79.2.279. Tagged as 'Kernel-5_35-4_79_2_279'
      afc3b390
  25. 10 Aug, 2015 3 commits
  26. 05 Aug, 2015 1 commit
    • Jeffrey Lee's avatar
      Improve support for VMSAv6 cache policies & memory types. Expose raw ARMops... · afb010f2
      Jeffrey Lee authored
      Improve support for VMSAv6 cache policies & memory types. Expose raw ARMops via OS_MMUControl & cache information via OS_PlatformFeatures.
      
      Detail:
        Docs/HAL/ARMop_API - Document two new ARMops: Cache_Examine and IMB_List
        hdr/KernelWS - Shuffle workspace round a bit to allow space for the two new ARMops. IOSystemType now deleted (has been deprecated and fixed at 0 for some time)
        s/ARM600 - Cosmetic changes to BangCam to make it clearer what's going on. Add OS_MMUControl 2 (get ARMop) implementation.
        s/ARMops - Switch out different ARMop implementations and XCB tables depending on MMU model - helps reduce assembler warnings and make it clearer what code paths are and aren't possible. Add implementations of the two new ARMops. Simplify ARM_Analyse_Fancy by removing some tests which we know will have certain results. Use CCSIDR constants in ARMv7 ARMops instead of magic numbers. Update XCB table comments, and add a new table for VMSAv6
        s/ChangeDyn - Define constant for the new NCB 'idempotent' cache policy (VMSAv6 normal, non-cacheable memory)
        s/HAL - Use CCSIDR constants instead of magic numbers. Extend RISCOS_MapInIO to allow the TEX bits to be specified.
        s/Kernel - OS_PlatformFeatures 33 (read cache information) implementation (actually, just calls through to an ARMop)
        s/MemInfo - Modify VMSAv6 OS_Memory 0 cache/uncache implementation to use the XCB table instead of modifying L2_C directly. This allows the cacheability to be changed without affecting the memory type - important for e.g. unaligned accesses to work correctly. Implement cache policy support for OS_Memory 13.
        s/Middle - Remove IOSystemType from OS_ReadSysInfo 6.
        s/VMSAv6 - Make sure BangCam uses the XCB table for working out the attributes of temp-uncacheable pages instead of manipulating L2_C directly. Add OS_MMUControl 2 implementation.
        s/AMBControl/memmap - Update VMSAv6 page table pokeing to use XCB table
        s/PMF/osinit - Remove IOSystemType reference, and switch out some pre-HAL code that was trying to use IOSystemType.
      Admin:
        Tested on Iyonix, ARM11, Cortex-A7, -A8, -A9, -A15
        Note that contrary to the comments in the source the default NCB policy currently maps to VMSAv6 Device memory type (as per previous kernel versions). This is just a temporary measure, and it will be switched over to Normal, non-cacheable once appropriate memory barriers have been added to the affected IO code.
      
      
      Version 5.35, 4.79.2.273. Tagged as 'Kernel-5_35-4_79_2_273'
      afb010f2
  27. 26 Jul, 2015 1 commit
    • Jeffrey Lee's avatar
      Add HAL device numbers for Raspberry Pi SPI controllers · fc4cbde0
      Jeffrey Lee authored
      Detail:
        hdr/HALDevice - Add a new device type for SPI controllers, and allocate two device numbers for use on the Pi (to differentiate between the main and aux controllers)
      Admin:
        Tested on Raspberry Pi B & 2 B
      
      
      Version 5.35, 4.79.2.272. Tagged as 'Kernel-5_35-4_79_2_272'
      fc4cbde0
  28. 17 Jul, 2015 1 commit
    • Jeffrey Lee's avatar
      Expose more areas via OS_ReadSysInfo 6 & OS_Memory 16. Expose processor... · 5e6fd146
      Jeffrey Lee authored
      Expose more areas via OS_ReadSysInfo 6 & OS_Memory 16. Expose processor vectors base + size via OS_PlatformFeatures.
      
      Detail:
        hdr/KernelWS - Define processor vectors address. Currently same as ZeroPage, but in the future will differ for some machines.
        hdr/OSRSI6, s/Middle - Expose VecPtrTab & NVECTORS via OS_ReadSysInfo items 85 & 86
        s/Kernel - Add OS_PlatformFeatures 32, for returning the base + size of the processor vectors
        s/MemInfo - Add areas 12 thru 15 to OS_Memory 16, for reporting ZeroPage, ProcVecs, DebuggerSpace and ScratchSpace. The task manager can now use these for calculating memory usage instead of assuming 32K workspace from &0-&8000.
      Admin:
        Tested on Raspberry Pi
      
      
      Version 5.35, 4.79.2.271. Tagged as 'Kernel-5_35-4_79_2_271'
      5e6fd146
  29. 10 Jul, 2015 1 commit
    • Jeffrey Lee's avatar
      Add builtin software pointer support · d1af0ed0
      Jeffrey Lee authored
      Detail:
        This set of changes adds support for rendering software mouse pointers directly in the kernel, rather than requiring graphics drivers to render them themselves as was the case previously.
        If a driver returns from GraphicsV_Features with the 'hardware pointer' bit clear, and a call to GraphicsV_UpdatePointer is returned unclaimed, then the kernel will step in and render a software pointer. This allows selective control over which areas of the screen the software pointer is used (e.g. if hardware only supports its use in some areas)
        hdr/KernelWS - Shrink PointerXEigFactor to 1 byte to free up some space for tracking the display log2bpp. Use 8 words of space for tracking software pointer state.
        s/vdu/vducursoft - Adjust existing the existing calls to the software pointer RemovePointer/RestorePointer functions so that they're called with IRQs enabled
        s/vdu/vdudriver - Keep track of display log2bpp. Claim/release memory needed for restoring pixels under software pointer.
        s/vdu/vdugrafhal - Update HAL_VideoUpdatePointer handling so that 0 can be returned in a1 to indicate the GraphicsV call should be left unclaimed.
        s/vdu/vdupalxx - Trigger updates of the cached software pointer palette whenever it's likely to become invalidated.
        s/vdu/vdupointer - Add software pointer implementation. Relying on a SpriteExtend OS_SpriteOp would be nice, but we're in the background so have to do plotting & unplotting manually. ColourTrans is used to cache the pointer palette colours for the current mode, although we're limited to calling it from a callback.
      Admin:
        Tested on Raspberry Pi & BB-xM
        Pointer is very flickery under some circumstances (e.g. running !CloseUp) due to needing to plot/unplot around any VDU driver screen access (as per text cursor). So code may need revising in future once we can trap reads/writes from specific screen memory pages.
      
      
      Version 5.35, 4.79.2.269. Tagged as 'Kernel-5_35-4_79_2_269'
      d1af0ed0
  30. 04 Jul, 2015 1 commit
    • Jeffrey Lee's avatar
      Enable high processor vectors/zero page relocation. OS_DynamicArea 20 fixes. · f5644f74
      Jeffrey Lee authored
      Detail:
        Makefile, hdr/Options - By default enable high processor vectors/zero page relocation for compatible machines, but also allow the components file to override the setting if required
        s/ChangeDyn - Fix OS_DynamicArea 20 to check the correct range for doubly mapped areas, and to correctly localise its error message
      Admin:
        Tested on Iyonix
      
      
      Version 5.35, 4.79.2.268. Tagged as 'Kernel-5_35-4_79_2_268'
      f5644f74
  31. 19 Jun, 2015 1 commit
    • Jeffrey Lee's avatar
      Fix HiProcVecs build. Remove old-style PublicWS definitions. · 1aa4be26
      Jeffrey Lee authored
      Detail:
        s/ARMops - Added extra LTORG to fix HiProcVecs build error for some platforms
        hdr/PublicWS - Remove the old (non-Legacy_) workspace exports, and add a comment explaining how the newer Legacy_ exports should be used.
      Admin:
        HiProcVecs ROMs for various platforms now appear to build OK
        Untested at runtime
      
      
      Version 5.35, 4.79.2.266. Tagged as 'Kernel-5_35-4_79_2_266'
      1aa4be26
  32. 26 Feb, 2015 1 commit
    • Jeffrey Lee's avatar
      Add TouchBook to hdr:GPIODevice · 06396b24
      Jeffrey Lee authored
      Detail:
        hdr/GPIODevice - Added the TouchBook as an OMAP3 machine type. We don't actually create a GPIO HAL device for it, but having it defined here is useful for SDIO support in the HAL.
      Admin:
        Tested on TouchBook
      
      
      Version 5.35, 4.79.2.258. Tagged as 'Kernel-5_35-4_79_2_258'
      06396b24
  33. 16 Feb, 2015 1 commit
  34. 11 Jan, 2015 1 commit
    • Jeffrey Lee's avatar
      Add ARMops for PL310 L2 cache controller · 6eb6ee2a
      Jeffrey Lee authored
      Detail:
        Unlike on the Cortex-A8 or Cortex-A15, the L2 cache that's used with the Cortex-A9 isn't hooked up to the standard ARMv7 CP15 cache maintenance ops. Instead, memory-mapped registers must be used to program and maintain the cache.
        Since the PL310 can't be detected automatically, this change adds support for a 'cache controller' HAL device which the HAL can use to advertise the presence of any external caches. If a cache device is registered during HAL_InitDevices the kernel will then check it against a list of known cache types and replace the appropriate ARMop routines with the alternatives for that controller.
        File changes:
        - hdr/PL310 - New header containing PL310 register listing
        - Makefile - Add export for PL310 header. Reorder exports to be alphabetical
        - hdr/HALDevice - Add cache controller device type, PL310 device
        - hdr/KernelWS - Allocate some workspace for storing a pointer to the current cache HAL device
        - s/ARMops - Add code for searching for known cache types, and implementation of PL310-specific ARMops
        - s/GetAll - Get Hdr:PL310
        - s/NewReset - Look for a cache controller after calling HAL_InitDevices
      Admin:
        Tested on Pandaboard
        Fixes various assorted instability issues
      
      
      Version 5.35, 4.79.2.252. Tagged as 'Kernel-5_35-4_79_2_252'
      6eb6ee2a
  35. 21 Dec, 2014 1 commit
    • Robert Sprowson's avatar
      Delegate L2 (and below) cache init at power on/reset to the HAL · 16c00596
      Robert Sprowson authored
      Historically the kernel looked after all aspects of cache control since they were common across all ARMs. However, not all cache controllers are created equal, and sometimes more complex initialisation steps are needed than fit the generic coprocessor ops - for example the PL310 attached to a Cortex-A9 has memory mapped control registers.
      Rather than clutter the kernel with one shot init code for every cache controller invented, we delegate that step to the HAL in HAL_Init. This is only a few hundred instructions later than where it was already being set. The kernel remains responsible for subsequent maintenance, this is just init which is being handed off.
      A quick survey of the Cortex-A TRMs shows:
      A5 - optional, for example ARM's PL310, ref TRM section 8.1.7.
      A7 - optional, C bit of SCTLR, ref TRM section 1.1.
      A8 - L2EN bit of ACTLR, note this bit has been recycled for other uses on other cores, ref TRM section 8.3.
      A9 - not integrated, ARM's PL310 uses bit 0 of control register 1, ref PL310 TRM section 3.1.1.
      A12 - see A17
      A15 - integrated, C bit of SCTLR, ref TRM section 7.2.3.
      A17 - integrated, bit 18 of L2CTLR & C bit of SCTLR, ref TRM section 7.2.
      and while we've got the TRMs open, back fill the CPU id register table.
      
      Version 5.35, 4.79.2.250. Tagged as 'Kernel-5_35-4_79_2_250'
      16c00596
  36. 06 Dec, 2014 1 commit
    • Robert Sprowson's avatar
      Untangle some buses · aaddca77
      Robert Sprowson authored
      Docs/HAL/NewAPI:
       More clearly describe the intent of the different bus types.
      hdr/HALDevice
       Reclassify the OMAP interconnect as either a system bus or peripheral bus, noting their names from the datasheet.
       Reclassify the GPMC as an expansion bus.
       Add AMBA 3's AXI bus, which (along with the existing AHB/APB) is what iMx6 uses. Delete redundant iMx6 interconnect type.
      
      Version 5.35, 4.79.2.249. Tagged as 'Kernel-5_35-4_79_2_249'
      aaddca77