1. 14 Jan, 2023 2 commits
  2. 28 Jul, 2021 5 commits
    • Jeffrey Lee's avatar
      Use decgen cache files · 5b6c1710
      Jeffrey Lee authored
      Sadly we need one file per combination of action files, but by adding
      these pre-generated cache files to git we can speed up building the
      kernel from clean by a significant amount.
      5b6c1710
    • Jeffrey Lee's avatar
      Add OS_AbortTrap implementation · c199c178
      Jeffrey Lee authored
      This supports all the load/store instructions, including FPA & VFP/NEON.
      Most instructions are handled directly via the base version of the
      AbortTrap API that was first implemented in RISC OS Select. However, to
      properly cope with LDREX/STREX, and future support for prefetch aborts,
      the API has been extended to allow the kernel to request that a block of
      memory is mapped in with certain permissions. For LDREX/STREX the kernel
      will then rewind the PC so that the instruction can be retried directly.
      
      Test code in Dev/AbortTrap exists in order to allow checking of all
      major functionality, along with code for building the code in a
      softloadable module for easier/quicker testing.
      c199c178
    • Jeffrey Lee's avatar
      Allow RW/ZI sections to be used · 2b665896
      Jeffrey Lee authored
      * Instruct the linker to place any RW/ZI data sections in the last ~16MB
      of the memory map, starting from &ff000000 (with the current toolchain,
      giving it a fixed base address is much easier than giving it a variable
      base address)
      * The RW/ZI section is mapped as completely inaccessible to user mode
      * The initial content of the RW section is copied over shortly after MMU
      startup (in Continue_after_HALInit)
      * Since link's -bin option produces a file containing a copy of the
      (zero-initialised) ZI section, the kernel binary is now produced from a
      "binary with AIF header" AIF with the help of the new 'kstrip' tool.
      kstrip extracts just the RO and RW sections, ensuring the ROM doesn't
      contain a redundant block of zeros for the ZI section.
      
      This should make it easier to use C code & arbitrary libraries within
      the kernel, providing they're compiled with suitable settings (e.g.
      non-module, no FP, no stack checking, like HALs typically use)
      2b665896
    • Timothy E Baldwin's avatar
      Support multiple source files · 9bc4a580
      Timothy E Baldwin authored
      9bc4a580
    • Timothy E Baldwin's avatar
      Build kernel using relocatable AOF · 5835d7b0
      Timothy E Baldwin authored
      * Add KernelBaseA absolute symbol.
      * Use KernelBase - KernelBaseA to convert some expressions
        to/from AREA relative form.
      * Link to correct address.
      * Remove ORG directive
      * Move EndOfKernel to separate AREA
      5835d7b0
  3. 23 May, 2020 1 commit
    • Ben Avison's avatar
      Mirror OS_AMBControl changes from Pyromaniac · 2991e2df
      Ben Avison authored
      * Create new header file defining symbolic name for OS_AMBControl
        reason codes and flags
      * Implement OS_AMBControl 9 (used to determine required size of buffer
        passed to OS_AMBControl 8 - potential thread safety issue not addressed)
      * Return allocated error numbers in various failure cases
      
      Version 6.38. Tagged as 'Kernel-6_38'
      2991e2df
  4. 25 Mar, 2018 1 commit
  5. 29 Jul, 2017 1 commit
    • Jeffrey Lee's avatar
      Initial SMP changes · 9944afaf
      Jeffrey Lee authored
      Detail:
        This commit lays some of the groundwork for SMP support within the HAL, kernel, and OS.
        Makefile, hdr/HALDevice, hdr/DBellDevice - Add definitions for a doorbell HAL device, to allow CPU cores to signal each other via interrupts
        hdr/HALEntries - Repurpose HAL_Matrix and HAL_Touchscreen entry points for new SMP-related entry points. Add a couple of IRQ-related definitions.
        hdr/KernelWS - Boost MaxInterrupts to 256
        hdr/Options - Add new SMP build switch to control whether the kernel is built in SMP-friendly mode or not. SMP-friendly kernels should still run on single-core machines, but may behave slightly differently.
        s/ARMops - Make as many ARMops SMP-safe as possible, relying on hardware support for broadcasting of cache/TLB maintenance operations
        s/ExtraSWIs - Make SMP-friendly full OS_SynchroniseCodeAreas only sync application space and the RMA (full-cache IMB not really possible with SMP)
        s/NewIRQs - Update IRQ despatcher comments to (hopefully) reflect reality
        Docs/SMP/HAL, Docs/SMP/IRQ - Add documentation covering the new HAL calls and IRQ behaviour
      Admin:
        Tested on Raspberry Pi 2, 3, OMAP4, iMX6
      
      
      Version 5.86, 4.129.2.2. Tagged as 'Kernel-5_86-4_129_2_2'
      9944afaf
  6. 02 Aug, 2016 1 commit
    • Jeffrey Lee's avatar
      Add support for shareable pages and additional access privileges · 9cd4cbe4
      Jeffrey Lee authored
      Detail:
        This set of changes:
        * Refactors page table entry encoding/decoding so that it's (mostly) performed via functions in the MMU files (s.ARM600, s.VMSAv6) rather than on an ad-hoc basis as was the case previously
        * Page table entry encoding/decoding performed during ROM init is also handled via the MMU functions, which resolves some cases where the wrong cache policy was in use on ARMv6+
        * Adds basic support for shareable pages - on non-uniprocessor systems all pages will be marked as shareable (however, we are currently lacking ARMops which broadcast cache maintenance operations to other cores, so safe sharing of cacheable regions isn't possible yet)
        * Adds support for the VMSA XN flag and the "privileged ROM" access permission. These are exposed via RISC OS access privileges 4 and above, taking advantage of the fact that 4 bits have always been reserved for AP values but only 4 values were defined
        * Adds OS_Memory 17 and 18 to convert RWX-style access flags to and from RISC OS access privelege numbers; this allows us to make arbitrary changes to the mappings of AP values 4+ between different OS/hardware versions, and allows software to more easily cope with cases where the most precise AP isn't available (e.g. no XN on <=ARMv5)
        * Extends OS_Memory 24 (CheckMemoryAccess) to return executability information
        * Adds exported OSMem header containing definitions for OS_Memory and OS_DynamicArea
        File changes:
        - Makefile - export C and assembler versions of hdr/OSMem
        - Resources/UK/Messages - Add more text for OS_Memory errors
        - hdr/KernelWS - Correct comment regarding DCacheCleanAddress. Allocate workspace for MMU_PPLTrans and MMU_PPLAccess.
        - hdr/OSMem - New file containing exported OS_Memory and OS_DynamicArea constants, and public page flags
        - hdr/Options - Reduce scope of ARM6support to only cover builds which require ARMv3 support
        - s/AMBControl/Workspace - Clarify AMBNode_PPL usage
        - s/AMBControl/growp, mapslot, mapsome, memmap - Use AreaFlags_ instead of AP_
        - s/AMBControl/main, memmap - Use GetPTE instead of generating page table entry manually
        - s/ARM600 - Remove old coments relating to lack of stack. Update BangCam to use GetPTE. Update PPL tables, removing PPLTransL1 (L1 entries are now derived from L2 table on demand) and adding a separate table for ARM6. Implement the ARM600 versions of the Get*PTE ('get page table entry') and Decode*Entry functions
        - s/ARMops - Add Init_PCBTrans function to allow relevant MMU_PPLTrans/MMU_PCBTrans pointers to be set up during the pre-MMU stage of ROM init. Update ARM_Analyse to set up the pointers that are used post MMU init.
        - s/ChangeDyn - Move a bunch of flags to hdr/OSMem. Rename the AP_ dynamic area flags to AreaFlags_ to avoid name clashes and confusion with the page table AP_ values exported by Hdr:MEMM.ARM600/Hdr:MEMM.VMSAv6. Also generate the relevant flags for OS_Memory 24 so that it can refer to the fixed areas by their name instead of hardcoding the permissions.
        - s/GetAll - GET Hdr:OSMem
        - s/HAL - Change initial page table setup to use DA/page flags and GetPTE instead of building page table entries manually. Simplify AllocateL2PT by removing the requirement for the user to supply the access perimssions that will be used for the area; instead for ARM6 we just assume that cacheable memory is the norm and set L1_U for any L1 entry we create here.
        - s/Kernel - Add GetPTE macro (for easier integration of Get*PTE functions) and GenPPLAccess macro (for easy generation of OS_Memory 24 flags)
        - s/MemInfo - Fixup OS_Memory 0 to not fail on seeing non-executable pages. Implement OS_Memory 17 & 18. Tidy up some error generation. Make OS_Memory 13 use GetPTE. Extend OS_Memory 24 to return (non-) executability information, to use the named CMA_ constants generated by s/ChangeDyn, and to use the Decode*Entry functions when it's necessary to decode page table entries.
        - s/NewReset - Use AreaFlags_ instead of AP_
        - s/VMSAv6 - Remove old comments relating to lack of stack. Update BangCam to use GetPTE. Update PPL tables, removing PPLTransL1 (L1 entries are now derived from L2 table on demand) and adding a separate table for shareable pages. Implement the VMSAv6 versions of the Get*PTE and Decode*Entry functions.
      Admin:
        Tested on Raspberry Pi 1, Raspberry Pi 3, Iyonix, RPCEmu (ARM6 & ARM7), comparing before and after CAM and page table dumps to check for any unexpected differences
      
      
      Version 5.55. Tagged as 'Kernel-5_55'
      9cd4cbe4
  7. 24 Jul, 2016 1 commit
    • Robert Sprowson's avatar
      Resolve 2x header clashes · 8cfe216b
      Robert Sprowson authored
      hdr/AHCIDevice:
        Remove this, since it clashes with the (differing API version number) copy exported by SATADriver. Post merging the Kernel back to the trunk the newer file datestamp has meant the wrong one gets exported during any ROM build which includes both components. Since the Kernel doesn't need AHCIDevice itself, it is left to the respective client (SATADriver or AHCIDriver in this case) to export them.
      hdr/ModHand:
        Resolve the longstanding clash of Module_Title with the same named symbol that CMHG uses. There are very few assembler needing to look at the module header (Kernel, FileCore, Debugger, Podule) directly, but every C module which uses CMHG and wants one of the ModHandReason values ends up with a duplicate define.
        Obsolete Arthur era Module_LoadAddr value.
      ArthurSWIs.s/MoreComms.s/NewReset.s/SWINaming.s/SysComms.s/Utility.s:
        Module_Title->Module_TitleStr.
      ModHand.s:
        Module_Title->Module_TitleStr.
        Recode Module_LoadAddr using the file type from Hdr:FileTypes.
      GetAlls.s:
        Drop unused NVRAM and PortMan headers. Add Hdr:FileTypes.
      
      Version 5.54. Tagged as 'Kernel-5_54'
      8cfe216b
  8. 17 Mar, 2016 1 commit
  9. 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
  10. 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
  11. 19 Aug, 2015 1 commit
  12. 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...
      afc3b390
  13. 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
  14. 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
  15. 22 Oct, 2014 1 commit
  16. 29 Jun, 2014 1 commit
    • Robert Sprowson's avatar
      Makefile recreated from fragments · 1623cc89
      Robert Sprowson authored
      Need a custom ROM stage as the Kernel is linked as a binary, and a custom exports phase as the AAsmModule makefile tops out at 3 exported headers, but otherwise the rest can be shared.
      Tested in an IOMD ROM build.
      
      Version 5.35, 4.79.2.228. Tagged as 'Kernel-5_35-4_79_2_228'
      1623cc89
  17. 15 Dec, 2013 1 commit
    • Jeffrey Lee's avatar
      Assorted GraphicsV improvements · 694750de
      Jeffrey Lee authored
      Detail:
        This set of changes:
        * Adds basic support for multiple GraphicsV drivers, by way of some new OS_ScreenMode reason codes for registering/deregistering, selecting and enumerating drivers (11, 64-68)
        * Tidies up handling of HAL video calls so that the HAL calls will be transformed into a bona fide GraphicsV driver if they're implemented
        * Changes handling of 16bpp gamma table entries so that they're sent to GraphicsV in a generic form instead of in a VIDC-specific form
        * Adds a new GraphicsV call and defines new VIDC list items to allow GraphicsV drivers to utilise the new pixel formats
        File changes:
        * h/VIDCList, hdr/VIDCList, Makefile - Add new header export containing VIDC list type 3 definitions, to avoid repeated definitions in other components
        * Resources/UK/Messages - Add new GraphicsV/OS_ScreenMode error strings and some missing processor type strings
        * hdr/KernelWS - Clean up some pre-GraphicsV definitions, and add new workspace locations for storing the current GraphicsV driver number and the driver list
        * hdr/Options - Remove obsolete InverseTextTransparency option
        * hdr/VduExt - Add VDU variable 192 for storing GraphicsV driver number (same as ROL's VideoV driver number). Remove old 'Flag_*' mode flag definitions (use new 'ModeFlag_*' defintions instead). Add new OS_ScreenMode reason codes.
        * s/ARM600, s/VMSAv6, s/vdu/vdu23, s/vdu/vdugrafa, s/vdu/vdugrafd, s/vdu/vdupalxx, s/vdu/vdupointer, s/vdu/vduwrch - Strip out pre-GraphicsV code. Update GraphicsV code to use correct driver number.
        * s/ArthurSWIs - Pass the default GraphicsV claimant the VduDriverWorkSpace instead of ZeroPage
        * s/Getall - Add Hdr:VIDCList and s/vdu/VduGrafHAL to list of GETs
        * s/NewIRQs - Remove HAL VSync IRQ initialisation, is now handled by grafvhal. Remove old HAL VsyncIRQ entry point, all VSyncs are now handled by VsyncIRQ_ExtEntry.
        * s/PMF/osbyte - Stop OS_Byte 19 waiting forever if no video driver is active
        * s/PMF/osinit - Remove HAL VSync IRQ initialisation, is now handled by grafvhal
        * s/vdu/vducursoft - Use new workspace variable names and flag names
        * s/vdu/vdudecl - Remove old HALDAG_* definitions, GVDAG_* definitions are used instead. Add definition of the per-driver workspace structure and flags.
        * s/vdu/vdudriver - Remove pre-GraphicsV code. Update InitialiseMode to check for and initialise a HAL driver. Use cached driver features word in a few places instead of calling GraphicsV each time. Update PalIndexTable to disable VIDC mangling of 16bpp gamma tables.
        * s/vdu/vdugrafv, s/vdu/vdugrafhal - HAL<->GraphicsV code split off into its own file (vdugrafhal). Default GraphicsV claimant now only deals with VSync events for the active driver.
        * s/vdu/vdumodes - Get rid of old VIDC List type 3 definiton; now in hdr/VIDCList
        * s/vdu/vduswis - Added OS_ScreenMode reason codes 11 and 64-68 for registering, deregistering, selecting and enumerating GraphicsV drivers. Update mode set code to not bother checking if the driver supports the pixel format; instead we assume that the driver's vet mode call will do the check for us.
      Admin:
        Tested in Tungsten, IOMD, OMAP3 & BCM2835 ROMs
        Requires HdrSrc-2_38 and updated video driver modes
      
      
      Version 5.35, 4.79.2.203. Tagged as 'Kernel-5_35-4_79_2_203'
      694750de
  18. 20 Nov, 2013 1 commit
    • Robert Sprowson's avatar
      Migrate RTC driver out of the kernel · 574ab818
      Robert Sprowson authored
      The kernel will use RTC_Read and RTC_Write to access the hardware clock, while maintaining the software clock as before.
      Makefile: header export is now in the RTC module's sources
      KernelWS: remove RTCFitted flag
      NewReset: sync the time after the module init
      i2cutils: deleted clock chip code
      osinit: move OS_ResyncTime into PMF/realtime
      realtime: mostly packages up ordinals and calls the respective SWI
      
      Tested on IOMD softload.
      
      Version 5.35, 4.79.2.202. Tagged as 'Kernel-5_35-4_79_2_202'
      574ab818
  19. 06 Aug, 2013 1 commit
    • Jeffrey Lee's avatar
      Add support for the new RISC OS 5 style sprite mode word. Add partial support... · 57d1a29d
      Jeffrey Lee authored
      Add support for the new RISC OS 5 style sprite mode word. Add partial support for alpha channel sprite masks. Implement OS_ScreenMode reasons 13-15
      
      Detail:
        ECFShift/ECFYOffset:
        - hdr/PublicWS - Add ECFShift and ECFYOffset to list of public exports (SpriteExtend was using hardcoded values). Rearrange exports so that VduWorkspace exports are now labelled as such.
        - hdr/KernelWS - Make sure ECFShift & ECFYOffset match their exported locations
        - hdr/OSRSI6, s/Middle - Add OS_ReadSysInfo 6 items 83 & 84, for reading ECFYOffset and ECFShift locations
        Mode flags/VDU variables:
        - Makefile - Add hdr/VduExt to the C header exports
        - hdr/VduExt - Get rid of NotRVVTBarWobblyBits macro and defined VDU variables manually so that Hdr2H will handle them. Begin replacing overly generic 'Flag_*' mode flag definitions with 'ModeFlag_*' instead. Define new flags as required by the new screen/sprite modes. Add OS_ScreenMode reason codes and mode selector format (from s.vdu.vdudecl)
        - NewModes/NEWF2, NewModes/OldPSSrc, NewModes/PSSrc, s.vdu.vdu23, s.vdu.vducursoft, s.vdu.vdudriver, s.vdu.vdugrafg, s.vdu.vdugrafj, s.vdu.vdugrafl, s.vdu.vdumodes, s.vdu.vdupal10, s.vdu.vdupal20, s.vdu.vdupalette, s.vdu.vdupalxx, s.vdu.vduwrch - Renaming Flag_* to ModeFlag_*
        - s.vdu.vdudecl - Remove OS_ScreenMode reason codes & mode selector format definitions; these are now in hdr/VduExt. Flag_* -> ModeFlag_* renaming.
        - s.vdu.vdupalxx - Apply a greyscale palette in PV_SetDefaultPalette if the greyscale mode flag is set
        New sprite types:
        - s.vdu.vdudriver - Extend GenerateModeSelectorVars to deal with the wide mask flag, 64K sprites, and the new RISC OS 5 sprite mode word format.
        - s.vdu.vdugrafdec - Store more information about the sprite in the SprReadNColour ... SprLog2BPC block.
        - s.vdu.vdugrafg - Update SpriteVecHandler to be able to detect whether RISC OS 5 format sprites are allowed palettes. Update SetupSprModeData to store the extra sprite info that's defined in vdugrafdec. Update PutSprite to fault any sprites with wide masks - SpriteExtend must be used for that (once implemented!)
        - s.vdu.vdugrafh - Update WritePixelColour to avoid temporary poking of NColour VDU variable for 8bpp sprites. Correctly replicate data when writing to RISC OS 5 format sprites. Update ReadPixelMask, WritePixelMask, SpriteMaskAddr, GetMaskspWidth to deal with wide masks. Delete obsolete bounce_new_format_masks routine.
        - s.vdu.vdugrafi - Comment updated to reflect new reality
        - s.vdu.vdugrafj - Get rid of unused code block in CreateHeader/PostCreateHeader. Update SanitizeSGetMode to generate RISC OS 5 style sprite mode words where applicable. Update DecideMaskSize to rely on GetMaskspWidth for calculating mask width.
        - s.vdu.vdugrafl - Update SwitchOutputToSprite/SwitchOutputToMask to deal with the new sprite formats. Allow PushModeInfoAnyMonitor to fail.
        - s.vdu.vduswis - Extended OS_ReadModeVariable to cope with new sprite types
        Misc:
        - s.vdu.vdudriver - Fixed bug with VIDCList copying where any -1 value in the structure would terminate the copy, instead of only -1 as a control item number
        - s.vdu.vduswis - Implemented OS_ScreenMode 13 (Mode string to specifier), 14 (mode specifier to string), and 15 (set mode by string). Mostly as per ROL's specs, but minus support for teletext attributes, and plus support for new RISC OS 5 attributes (L... layout specifier, 4096 & 24bpp packed modes, etc.)
        - s.vdu.vduwrch - Pick correct default text colours for the new modes
      Admin:
        Tested on BB-xM
        Part of an implementation of the Extended Framebuffer Format spec:
        http://www.riscosopen.org/wiki/documentation/show/Extended%20Framebuffer%20Format%20Specification
      
      
      Version 5.35, 4.79.2.194. Tagged as 'Kernel-5_35-4_79_2_194'
      57d1a29d
  20. 28 Oct, 2012 1 commit
    • Robert Sprowson's avatar
      Review of Internation switch · d58ce177
      Robert Sprowson authored
      Variously the call to TranslateError was either followed (outside the switch) by an unnecessary SETV, or missing SETV for the non international case.
      Added DMA controller HAL device for IOMD.
      
      Version 5.35, 4.79.2.174. Tagged as 'Kernel-5_35-4_79_2_174'
      d58ce177
  21. 08 Oct, 2012 1 commit
    • Steve Revill's avatar
      Some tweaks ahead of an RPi code freeze. · 276a05dd
      Steve Revill authored
      Default CMOS tweaks now apply for the RPi hardware. Was missed in
      the previous commit.
      
      You can now build the Kernel without the ROM debug output stuff
      that's enabled for odd-numbered builds, by passing FREEZE_DEV_REL=TRUE
      into the makefile. For example, in the Components file, you'd add:
      
        -options FREEZE_DEV_REL=TRUE
      
      onto the Kernel line.
      
      Version 5.35, 4.79.2.171. Tagged as 'Kernel-5_35-4_79_2_171'
      276a05dd
  22. 24 Mar, 2012 1 commit
    • Ben Avison's avatar
      Retired *Configure options, and a new header export · 68f45833
      Ben Avison authored
      Detail:
        * As noted in recent commits to ADFS, the *Configure options Dir and NoDir
          haven't done anything since RISC OS 2, so ADFS has stopped reading the
          CMOS bit. Unusually, these options are implemented by the kernel, so this
          is the accompanying change to remove the *Configure options. This frees
          up a bit of CMOS for future re-use.
        * Now exports a C version of Hdr:ModHand.
      Admin:
        Builds OK, but not tested in a ROM build yet (should be fairly safe though)
      
      Version 5.35, 4.79.2.143. Tagged as 'Kernel-5_35-4_79_2_143'
      68f45833
  23. 25 Feb, 2012 1 commit
    • Jeffrey Lee's avatar
      Add compressed ROM support. Make more use of ARMv5+ instructions. Other misc tweaks. · 538f3c24
      Jeffrey Lee authored
      Detail:
        hdr/OSEntries, s/HAL, s/Kernel - Add compressed ROM support.
        With the current scheme, a compressed ROM will have everything except the HAL and kernel compressed.
        During the keyboard scan period the kernel will allocate some temporary decompression workspace and call the decompression stub that was appended to the ROM.
        The decompression stub is expected to perform in-place decompression of the ROM. Once decompression is complete the workspace will be freed and the page tables updated to make the ROM image readonly.
        It's the HAL's responsibility to make sure any compressed ROM is located in an area of physically contiguous RAM large enough to hold the uncompressed image.
        More info here: http://www.riscosopen.org/wiki/documentation/show/Compressed%20ROMs
        Makefile, h/OSEntries - Add C export of hdr/OSEntries
        hdr/HALDevice - Add device ID for Tungsten video device. Convert tabs to spaces for consistency.
        hdr/HALEntries, s/NewReset - Moved KbdFlag_* definitions to hdr/HALEntries so HALs can use them in their keyboard scan code
        s/ArthurSWIs, S/HAL, s/HeapSort, s/Kernel, s/MemInfo, s/Middle, s/NewIRQs, s/TickEvents, s/vdu/vdugrafb - Make use of BLX, BFI and long multiplies if the CPU supports them. Don't support SWI calls from thumb mode if the CPU doesn't support thumb.
        s/HAL - Made the LDMIA in Init_MapInRAM more sensible (register order was backwards). The old code did work, but wasn't doing what the comments described. Removed unused/unfinished HAL_Write0 function. Improve RISCOS_LogToPhys to check L1PT for any section mappings if the logical_to_physical call fails
        s/ModHand - Save one instruction by using ADR instead of MOV+ADD to compute lr
        s/NewReset, s/PMF/key - Pass L1PT to HAL_Reset to allow machines without hardware reset (e.g. IOMD) to perform resets by manually disabling the MMU and restarting the ROM
        s/vdu/vdudriver, s/vdu/vdugrafv - Use GVEntry macro borrowed from NVidia module for setting up the GraphicsV jump table. Make GraphicsV_ReadPaletteEntry call HAL_Video_ReadPaletteEntry if left unclaimed. Fixup GV_Render to only call HAL_Video_Render if the HAL call is implemented.
      Admin:
        Tested with OMAP3, IOMD & Tungsten ROMs/softloads.
      
      
      Version 5.35, 4.79.2.138. Tagged as 'Kernel-5_35-4_79_2_138'
      538f3c24
  24. 27 Nov, 2011 1 commit
    • Robert Sprowson's avatar
      Conversions rationalisation. · 0d73c680
      Robert Sprowson authored
      Delete pmf/convdate, moved to conversions.
      Moved OS_BinaryToDecimal to conversions.
      Remove OS_ConvertHex16 and friends.
      Add OS_ConvertVariform skeleton.
      Tidied conversions.
      
      Version 5.35, 4.79.2.125. Tagged as 'Kernel-5_35-4_79_2_125'
      0d73c680
  25. 03 Aug, 2011 2 commits
    • Jeffrey Lee's avatar
      Add new OS_ReadSysInfo 6 items. Change naming of PublicWS values. · d2c62e16
      Jeffrey Lee authored
      Detail:
        s/Middle - Added some new OS_ReadSysInfo 6 items which are needed by the zero page relocation kernel. Also duplicated some existing entries to avoid conflicts with ROL's allocations.
        hdr/OSRSI6, Makefile - New header listing OS_ReadSysInfo 6 items
        hdr/PublicWS - Duplicated the workspace definitions for &0-&4000, but with a 'Legacy_' prefix to their names. Also added some new entries as needed by the zero page relocation kernel. Once existing modules have been updated to use OS_ReadSysInfo 6 & the Legacy_ definitions, the old defs will be removed.
        hdr/KernelWS - Removed 'Export_' prefix from all the exported workspace values, since the kernel can now use the original names directly
        hdr/Options - Dummy HiProcVecs option so merging things will be a bit cleaner
      Admin:
        Tested on rev A2 BB-xM
      
      
      Version 5.35, 4.79.2.98.2.44. Tagged as 'Kernel-5_35-4_79_2_98_2_44'
      d2c62e16
    • Jeffrey Lee's avatar
      Add new OS_ReadSysInfo 6 items codes. Change naming of PublicWS values. · b1bc3052
      Jeffrey Lee authored
      Detail:
        s/Middle - Added some new OS_ReadSysInfo 6 items which are needed by the zero page relocation kernel. Also duplicated some existing entries to avoid conflicts with ROL's allocations.
        hdr/OSRSI6, Makefile - New header listing OS_ReadSysInfo 6 items
        hdr/PublicWS - Duplicated the workspace definitions for &0-&4000, but with a 'Legacy_' prefix to their names. Also added some new entries as needed by the zero page relocation kernel. Once existing modules have been updated to use OS_ReadSysInfo & the Legacy_ definitions, the old defs will be removed.
        hdr/KernelWS - Removed 'Export_' prefix from all the exported workspace values, since the kernel can now use the original names directly
        hdr/Options - Dummy HiProcVecs option so merging things will be a bit cleaner
      Admin:
        Tested in ROM softload on Iyonix
      
      
      Version 5.35, 4.79.2.118. Tagged as 'Kernel-5_35-4_79_2_118'
      b1bc3052
  26. 01 Aug, 2011 2 commits
    • Jeffrey Lee's avatar
      Bring Cortex kernel branch in line with HAL branch · c79c1310
      Jeffrey Lee authored
      Detail:
        Makefile - Now uses ${PERL} for running perl
        s/Kernel - Now uses correct "Bad OS_PlatformFeatures reason code" error number
        s/MemInfo - Updated list of OS_Memory 9 controllers
      Admin:
        OMAP3 ROM compiles OK; untested at runtime
      
      
      Version 5.35, 4.79.2.98.2.43. Tagged as 'Kernel-5_35-4_79_2_98_2_43'
      c79c1310
    • Jeffrey Lee's avatar
      Update 'perl' to '${PERL}' · 7f86b773
      Jeffrey Lee authored
      Detail:
        Makefile - A couple of makefile rules were invoking perl directly instead of using the more preferential ${PERL}. Fixed.
      Admin:
        Tungsten ROM compiles OK, untested at runtime.
      
      
      Version 5.35, 4.79.2.117. Tagged as 'Kernel-5_35-4_79_2_117'
      7f86b773
  27. 31 Jul, 2011 3 commits
    • Jeffrey Lee's avatar
      Add new GPIO device type & OMAP3 GPIO device ID · e14282c7
      Jeffrey Lee authored
      Detail:
        hdr/HALDevice - Added GPIO device type in the Comms group, and an ID for a generic OMAP3 GPIO device
        hdr/GPIODevice - Definition of GPIO device structure. Currently only used to store the type and revision of the main board, so the GPIO manager module can tailor its features appropriately.
        Makefile - Export hdr/GPIODevice
      Admin:
        Tested on rev A2 BB-xM
      
      
      Version 5.35, 4.79.2.98.2.42. Tagged as 'Kernel-5_35-4_79_2_98_2_42'
      e14282c7
    • Jeffrey Lee's avatar
      Update the method the HAL kernel uses to determine the UtilityModule & ROM dates · e249f5da
      Jeffrey Lee authored
      Detail:
        Three main changes:
        * On odd-numbered (i.e. development) versions of the module, the UtilityModule will now take its date from the VersionNum file instead of using a hard-coded date
        * All build versions now look for the new "extended ROM footer" (as created by romlinker 0.04+) at the end of the ROM image and use it to determine the ROM build date for return by OS_ReadSysInfo 9,2. Failing to find the build date in the footer will cause OS_ReadSysInfo 9,2 to return 0.
        * On odd-numbered versions, OS_Byte 0 will now use the ROM build date (as found in the extended footer) to generate the error block that's returned to the user. This seems OK as the PRM describes OS_Byte 0 as returning the "creation date of the operating system". Plus it's a convenient way of getting the ROM build date into the Switcher, since the switcher uses OS_Byte 0. If the extended footer can't be found (or if the string isn't initialised yet, e.g. before Service_PostInit) the code falls back to a hard-coded string containing the date from the VersionNum file.
        File changes:
        Makefile - Updated to not create the obsolete Time+Date file (previously used for the ROM build date)
        Version - Use date from VersionNum file for development builds
        hdr/Options - New UseNewFX0Error variable/option to make it easy to check which OS_Byte 0 variant should be enabled
        hdr/KernelWS - Added new string buffers & extended ROM footer pointer to workspace
        s/Middle - Updated OS_ReadSysInfo 9 code, and added utility functions for searching the extended ROM footer for certain tags
        s/NewReset - Added a couple of calls to initialise the new string buffers just prior to Service_PostInit. This is required since OS_Byte/OS_ReadSysInfo shouldn't enable interrupts, but date conversion relies on the Territory module, which may enable interrupts.
        s/PMF/osbyte - Updated OS_Byte 0 code
      Admin:
        Tested in Tungsten ROM, with and without the extended footer present.
      
      
      Version 5.35, 4.79.2.115. Tagged as 'Kernel-5_35-4_79_2_115'
      e249f5da
    • Jeffrey Lee's avatar
      Update the method the Cortex kernel uses to determine the UtilityModule & ROM dates · daa8607f
      Jeffrey Lee authored
      Detail:
        Three main changes:
        * On odd-numbered (i.e. development) versions of the module, the UtilityModule will now take its date from the VersionNum file instead of using a hard-coded date.
        * All build versions now look for the new "extended ROM footer" (as created by romlinker 0.04+) at the end of the ROM image and use it to determine the ROM build date for return by OS_ReadSysInfo 9,2. Failing to find the build date in the footer will cause OS_ReadSysInfo 9,2 to return 0.
        * On odd-numbered versions, OS_Byte 0 will now use the ROM build date (as found in the extended footer) to generate the error block that's returned to the user. This seems OK as the PRM describes OS_Byte 0 as returning the "creation date of the operation system". Plus it's a convenient way of getting the ROM build date into the Switcher, since the switcher uses OS_Byte 0. If the extended footer can't be found (or if the string hasn't been initialised yet, e.g. before Service_PostInit) the code falls back to a hard-coded string containing the date from the VersionNum file.
        File changes:
        Makefile - Updated to not create the obsolete Time+Date file (previously used for the ROM build date)
        Version - Use date from VersionNum file for development builds
        hdr/Options - New UseNewFX0Error variable/option to make it easy to check which OS_Byte 0 variant should be enabled
        hdr/KernelWS - Added new string buffers & extended ROM footer pointer to workspace
        s/Middle - Updated OS_ReadSysInfo 9 code, and added utility functions for searching the extended ROM footer for certain tags
        s/NewReset - Added a couple of calls to initialise the new string buffers just prior to Service_PostInit. This is required since OS_Byte/OS_ReadSysInfo shouldn't enable interrupts, but date conversion relies on the Territory module, which may enable interrupts.
        s/PMF/osbyte - Updated OS_Byte 0 code
      Admin:
        Tested in OMAP ROM, with and without the extended footer present.
      
      
      Version 5.35, 4.79.2.98.2.41. Tagged as 'Kernel-5_35-4_79_2_98_2_41'
      daa8607f
  28. 04 Jun, 2011 2 commits
    • Jeffrey Lee's avatar
      Add hdr.Variables to the C header export, fix ARMv6 issues · b8267d5d
      Jeffrey Lee authored
      Detail:
        Makefile - Added hdr.Variables to the C header export list
        hdr/ARMops, s/ARMops - Added ARM1176JZF-S to the list of known CPUs
        s/ARMops - Fix unaligned memory access in ARM_PrintProcessorType
        hdr/Copro15ops, s/ARMops, s/HAL, s/VMSAv6, s/AMBControl/memmap - Fixed all myDSB/myISB/etc. macro instances to specify a temp register, so that they work properly when building an ARMv6 version of the kernel
      Admin:
        Fixes build errors with the latest Draw module.
        Should also allow the kernel to work properly with the new S3C6410 port.
        ARMv6 version builds OK, but no other builds or runtime tests have been made.
      
      
      Version 5.35, 4.79.2.98.2.38. Tagged as 'Kernel-5_35-4_79_2_98_2_38'
      b8267d5d
    • Jeffrey Lee's avatar
      Add hdr.Variables to C header export · 819b8458
      Jeffrey Lee authored
      Detail:
        Makefile - Added hdr.Variables to the C header export list
      Admin:
        Fixes build errors with the latest Draw module
      
      
      Version 5.35, 4.79.2.113. Tagged as 'Kernel-5_35-4_79_2_113'
      819b8458
  29. 22 May, 2011 2 commits
    • Jeffrey Lee's avatar
      Add C version of Hdr.OSEntries to HAL kernel header export · 77d5848c
      Jeffrey Lee authored
      Detail:
        Makefile - now exports a C version of hdr.OSEntries
      Admin:
        Tested in Iyonix ROM softload.
        Needed for latest USB drivers to build.
      
      
      Version 5.35, 4.79.2.112. Tagged as 'Kernel-5_35-4_79_2_112'
      77d5848c
    • Jeffrey Lee's avatar
      Update Cortex branch of kernel to support HALSize env variable. Export C version of hdr.OSEntries. · 1bd9c9e0
      Jeffrey Lee authored
      Detail:
        Makefile - Now exports a C version of hdr.OSEntries, for use by the new HAL USB drivers
        s/GetAll, s/Kernel - The HALSize env variable is now used in place of hard-coded values for the HAL size
        s/HAL - Reset_IRQ_Handler now switches to SVC mode before calling HAL_KbdScanInterrupt, to allow the HAL USB drivers to re-enable interrupts if they wish.
        s/VMSAv6 - Deleted some obsolete definitions
      Admin:
        Tested on rev C2 BB, A2 BB-xM, C1 TouchBook
        Needs latest BuildSys, Env, HdrSrc
      
      
      Version 5.35, 4.79.2.98.2.37. Tagged as 'Kernel-5_35-4_79_2_98_2_37'
      1bd9c9e0