1. 05 Nov, 2019 1 commit
    • Jeffrey Lee's avatar
      Add support for HeapReason_GetSkewAligned · b954559e
      Jeffrey Lee authored
      Similar to HeapReason_GetAligned, GetSkewAligned is used for allocating
      aligned blocks (with optional boundary limit). However instead of using
      the logical address of the user portion of the block for the alignment
      calculation, it uses an arbitrary offset specified in R5. This makes
      it useful for clients such as the PCI module, which care about the
      physical alignment of blocks rather than logical alignment.
      Tested with heaptest
  2. 30 Jun, 2016 1 commit
    • Jeffrey Lee's avatar
      Delete lots of old switches · f655fcf6
      Jeffrey Lee authored
        This change gets rid of the following switches from the source (picking appropriate code paths for a 32bit HAL build):
        * FixCallBacks
        * UseProcessTransfer
        * CanLiveOnROMCard
        * BleedinDaveBell
        * NewStyleEcfs
        * DoVdu23_0_12
        * LCDPowerCtrl
        * HostVdu
        * Print
        * EmulatorSupport
        * TubeInfo
        * AddTubeBashers
        * TubeChar, TubeString, TubeDumpNoStack, TubeNewlNoStack macros
        * FIQDebug
        * VCOstartfix
        * AssemblingArthur (n.b. still defined for safety with anything in Hdr: which uses it, but not used explicitly by the kernel)
        * MouseBufferFix
        * LCDInvert
        * LCDSupport
        * DoInitialiseMode
        * Interruptible32bitModes
        * MouseBufferManager
        * StrongARM (new CacheCleanerHack and InterruptDelay switches added to hdr/Options to cover some functionality that StrongARM previously covered)
        * SAcleanflushbroken
        * StrongARM_POST
        * IrqsInClaimRelease
        * CheckProtectionLink
        * GSWorkspaceInKernelBuffers
        * EarlierReentrancyInDAShrink
        * LongCommandLines
        * ECC
        * NoSPSRcorruption
        * RMTidyDoesNowt
        * RogerEXEY
        * StorkPowerSave
        * DebugForcedReset
        * AssembleKEYV
        * AssemblePointerV
        * ProcessorVectors
        * Keyboard_Type
        Assorted old files have also been deleted.
        Identical binary to previous revision for IOMD & Raspberry Pi builds
      Version 5.51. Tagged as 'Kernel-5_51'
  3. 01 Jul, 2012 1 commit
    • Robert Sprowson's avatar
      Sort out SetBorder · fe354937
      Robert Sprowson authored
      The one remaining use of SetBorder was to denote the user asked for and got a CMOS reset, which in the HAL case emitted a warning because setting the border is potentially complicated/slow.
      To solve this, the reset is noted and replaces the normal RISC OS banner with a warning message. The behaviour and text for this comes from the BBC Master, though the escape key is used in place of break since a reset isn't actually needed.
      Moved the unused cputable inside its corresponding switch.
      Two occurrences of WriteS_Translated would have executed the message in the V=1 case.
      Flag added to workspace, translation added to messages files.
      Commented out use of SetBorder removed.
      SetBorder macro removed.
      Switched out use of SetBorder removed.
      Conditional WriteS_Translated would try to execute the message in the opposite condition case.
      Version 5.35, Tagged as 'Kernel-5_35-4_79_2_157'
  4. 26 May, 2012 1 commit
    • Robert Sprowson's avatar
      Adoption of *CONFIGURE/STATUS CACHE commands · ef95917b
      Robert Sprowson authored
      The kernel already looks after all other aspects of the ARM CPU, so can look after the cache control command too.
       HelpStrs.s:New tokens for help and syntax
       CmdHelp.s:UK help and syntax
       Arthur3.s:Tables updates for *CONFIGURE/STATUS, lined some stuff up, default error text sync'd with Hdr:NewErrors
       MoreComms.s:Parsing and doing of *CACHE
       Utility.s:Hashing table updated for *CACHE
      Other minor changes
       hdr/Options:Bring 'MosVer' into the private header
       hdr/RISCOS:aasm aliases for SP removed, MainVars and MosVer made private, added definition of the start of application space
       HeapMan.s:Use of GRAB changed to Pull
       Offset of TutuCMOS changed for more informative PrintSoundCMOS
       PMF/osbyte.s:Use OsBytes header file in place of MainVars
      Version 5.35, Tagged as 'Kernel-5_35-4_79_2_151'
  5. 10 Dec, 2011 2 commits
    • Jeffrey Lee's avatar
      Fix OS_Heap 4. Fix stack imbalance in system heap code. · 19995840
      Jeffrey Lee authored
        s/HeapMan - The code to check if it's safe to shrink a block by 4 bytes assumed 'addr' was the address of the block, when in reality it's just an offset. This was causing the "OK to shrink?" check to always ignore the shrink request on heaps located below the 2G limit, but fail with "heap corrupt" errors in heaps located above the 2G limit.
        s/ArthurSWIs - Fix stack imbalance causing a crash if OS_Heap returns an unexpected error in DoSysHeapOpWithExtension/ClaimSysHeapNode
        Tested in Iyonix ROM softload
        Testbed didn't pick up heap shrink bug due to the sanity checks it performs not being vigorous enough.
      Version 5.35, Tagged as 'Kernel-5_35-4_79_2_130'
    • Jeffrey Lee's avatar
      Improve heap manager. Add heap testbed. Add dummy implementation of some... · 4a30b643
      Jeffrey Lee authored
      Improve heap manager. Add heap testbed. Add dummy implementation of some OS_ScreenMode reason codes.
        s/HeapMan, hdr/KernelWS - Heap manager improvements:
          - Errors generated by interrupted heap operations that are forced to complete by a OS_Heap call from the background are now cached in kernel workspace until the foreground task is resumed. This prevents them from being potentially overwritten by MessageTrans running out of background error buffers.
          - Added new OS_Heap reason code, #7 - Get area aligned. This allows areas of memory to be allocated at specific (power-of-2) alignments, and optionally without crossing a given (power-of-2) boundary. Alignment & boundary calculations are performed using logical addresses.
          - Removed the limitation that all free and allocated blocks must be a multiple of 8 bytes in length. This change was required in order to allow OS_Heap 7 to function correctly. Now the only requirements are that blocks must be multiples of 4 bytes in length, at 4 byte alignment, with a minimum length of 8 bytes. 4 extra padding bytes may still be added to the end of allocations in order to avoid creating 4-byte free blocks.
        s/HeapMan, TestSrc/HeapTest/Makefile, TestSrc/HeapTest/c/testbed, TestSrc/HeapTest/s/asm - Added heap testbed program. Can either use the OS_Heap SWI or directly include a copy of the Kernel's heap manager sources.
        s/vdudecl, s/vduswis - Added dummy implementations of OS_ScreenMode 4, 5 and 6. This prevents the Wimp generating lots of "Unknown OS_ScreenMode reason code" errors when redrawing the screen.
        s/Arthur3, s/Oscli - Moved dotstring closer to where it's used to avoid "ADRL out of range" errors in Tungsten build
        Tested in OMAP3 ROM & Tungsten ROM softload.
        Heap testbed successfully performed over 400 million heap ops, so there shouldn't be any serious bugs in the new code (touch wood)
      Version 5.35, Tagged as 'Kernel-5_35-4_79_2_128'
  6. 24 Sep, 2011 1 commit
    • Jeffrey Lee's avatar
      Fix objasm 4 warnings · 6d052230
      Jeffrey Lee authored
        s/Arthur3, s/ChangeDyn, s/HAL, s/HeapMan, s/Middle, s/MoreSWIs, s/NewIRQs, s/Utility, s/VMSAv6, s/PMF/key, s/PMF/osbyte, s/PMF/osword, s/vdu/vdudecl, s/vdu/vdudriver, s/vdu/vduplot, s/vdu/vduwrch - Tweaked lots of LDM/STM instructions in order to get rid of the depracation/performance warnings
        Tested on rev A2 BB-xM
      Version 5.35, Tagged as 'Kernel-5_35-4_79_2_98_2_53'
  7. 08 Aug, 2011 1 commit
    • Jeffrey Lee's avatar
      Add zero page relocation support · 2247d8e9
      Jeffrey Lee authored
        A whole mass of changes to add high processor vectors + zero page relocation support to the Cortex branch of the kernel
        At the moment the code can only cope with two ZeroPage locations, &0 and &FFFF0000. But with a bit more tweaking those restrictions can probably be lifted, allowing ZeroPage to be hidden at almost any address (assuming it's fixed at compile time). If I've done my job right, these restrictions should all be enforced by asserts.
        There's a new option, HiProcVecs, in hdr/Options to control whether high processor vectors are used. When enabling it and building a ROM, remember:
        * FPEmulator needs to be built with the FPEAnchor=High option specified in the components file (not FPEAnchorType=High as my FPEmulator commit comments suggested)
        * ShareFS needs unplugging/removing since it can't cope with it yet
        * Iyonix users will need to use the latest ROOL boot sequence, to ensure the softloaded modules are compatible (OMAP, etc. don't really softload much so they're OK with older sequences)
        * However VProtect also needs patching to fix a nasty bug there - http://www.riscosopen.org/tracker/tickets/294
        The only other notable thing I can think of is that the ProcessTransfer code in s/ARM600 & s/VMSAv6 is disabled if high processor vectors are in use (it's fairly safe to say that code is obsolete in HAL builds anyway?)
        Fun challenge for my successor: Try setting ZeroPage to &FFFF00FF (or similar) so its value can be loaded with MVN instead of LDR. Then use positive/negative address offsets to access the contents.
        File changes:
        - hdr/ARMops - Modified ARMop macro to take the ZeroPage pointer as a parameter instead of 'zero'
        - hdr/Copro15ops - Corrected $quick handling in myISB macro
        - hdr/Options - Added ideal setting for us to use for HiProcVecs
        - s/AMBControl/allocate, s/AMBControl/growp, s/AMBControl/mapslot, s/AMBControl/memmap, s/AMBControl/service, s/AMBControl/shrinkp, s/Arthur2, s/Arthur3, s/ArthurSWIs, s/ChangeDyn, s/ExtraSWIs, s/HAL, s/HeapMan, s/Kernel, s/MemInfo, s/Middle, s/ModHand, s/MoreSWIs, s/MsgCode, s/NewIRQs, s/NewReset, s/Oscli, s/PMF/buffer, s/PMF/IIC, s/PMF/i2cutils, s/PMF/key, s/PMF/mouse, s/PMF/osbyte, s/PMF/oseven, s/PMF/osinit, s/PMF/osword, s/PMF/oswrch, s/SWINaming, s/Super1, s/SysComms, s/TickEvents, s/Utility, s/vdu/vdu23, s/vdu/vdudriver, s/vdu/vdugrafl, s/vdu/vdugrafv, s/vdu/vdupalxx, s/vdu/vdupointer, s/vdu/vduswis, s/vdu/vduwrch - Lots of updates to deal with zero page relocation
        - s/ARM600 - UseProcessTransfer option. Zero page relocation support. Deleted pre-HAL ClearPhysRAM code to tidy the file up a bit.
        - s/ARMops - Zero page relocation support. Set CPUFlag_HiProcVecs when high vectors are in use.
        - s/KbdResPC - Disable compilation of dead code
        - s/VMSAv6 - UseProcessTransfer option. Zero page relocation support.
        Tested with OMAP & Iyonix ROM softloads, both with high & low zero page.
        High zero page hasn't had extensive testing, but boot sequence + ROM apps seem to work.
      Version 5.35, Tagged as 'Kernel-5_35-4_79_2_98_2_48'
  8. 05 Jun, 2001 1 commit
    • Stewart Brodie's avatar
      Minor optimisation to the heap manager for performance enhancement. · 79db54e0
      Stewart Brodie authored
        When splitting a free block in order to satisfy an allocation request,
          don't split if the remaining free space falls below a specified
          threshold (<= 8 bytes) to avoid creating lots of tiny free blocks,
          but instead gift the extra 8 bytes to the newly allocated block.
          This should stop the worst case heap fragmentation seen with OS_Heap
          heaps (particular the Toolbox's dynamic area).
        Tested in Ursula desktop build.
      Version 5.44. Tagged as 'Kernel-5_44'
  9. 15 Sep, 2000 1 commit
    • Kevin Bracey's avatar
      * Converted to building with ObjAsm (but still a single object file using ORG). · 49836a59
      Kevin Bracey authored
      * Added ARM_IMB and ARM_IMBRange SWIs as recommended by ARMv5.
      * Some early prototype HAL bits popped in - a lot of source restructuring still
        to come.
      * New debug target creates an AIF image with debug information, and translates
        this into an ASCII object file for the 16702B logic analyser.
      Version 5.35, Tagged as 'Kernel-5_35-4_79_2_1'
  10. 12 Apr, 2000 1 commit
    • Stewart Brodie's avatar
      Bug fixes only. · 53aadeeb
      Stewart Brodie authored
        "Podule" number now displayed again in *ROMModule output - flag
           preservation issue caused it to disappear in 5.23.
        *Eval output no longer misses its trailing space, neither do "Podule" or
          "Extn ROM" in *ROMModules output.
        Heap manager now works again in non-SVC modes.
        Exception dump now contains faked up 26-bit PC+PSR lookalike.
  11. 04 Apr, 2000 1 commit
    • Kevin Bracey's avatar
      32-bit Kernel. · b4016e9c
      Kevin Bracey authored
        The Kernel will now compile to produce a pure 32-bit system if No26bitCode is
        set to TRUE.
        If No26bitCode is FALSE, then the Kernel will be a standard 26-bit Kernel,
        although some internal changes have taken place to minimise compile
        switches between the two cases. See Docs.32bit for more technical info.
        The hardest part was the flood-fill...
      Other changes:
        Pointer shape changes now take place on the next VSync, rather than actually
        WAITING for the VSync. Turning the Hourglass on shouldn't slow your machine
        down by 5% now :)
        Lots of really crusty pre-IOMD code removed.
        Tested in 32 and 26-bit forms in a limited desktop build. Basically, this
        will need to see a lot of use to iron out difficulties. I'd like anyone who
        has a non-frozen project to at least attempt using this Kernel.
      Version 5.23. Tagged as 'Kernel-5_23'
  12. 03 Aug, 1999 1 commit
    • Kevin Bracey's avatar
      * Added support for 24LC64 8K EEPROM (untested). · f52b4580
      Kevin Bracey authored
      * Integrated Ursula fast service call dispatch code.
      * Added Interruptible32bitModes from Ursula.
      * Stopped allowing ROM modules (other than the Kernel/UtilityModule) to write
        to the hardware vectors in 26-bit mode.
      Version 4.81. Tagged as 'Kernel-4_81'
  13. 21 Jan, 1997 1 commit
  14. 06 Nov, 1996 1 commit
  15. 05 Nov, 1996 1 commit