- 19 Dec, 2020 1 commit
-
-
Jeffrey Lee authored
In HandleServiceModeTranslation, make sure WsPtr is initialised correctly before trying to use it. Fixes system heap corruption when responding to Service_ModeTranslation (most likely overwriting part of ChocolateMABlocks, and causing a crash when loading future modules) Fixes issue reported on forums: https://www.riscosopen.org/forum/forums/11/topics/15973 Version 6.47. Tagged as 'Kernel-6_47'
-
- 23 Nov, 2020 1 commit
-
-
Julie Stamp authored
Detail: RamFS now supports disc sizes up to 2GB-4KB, so raise the dynamic area limit from 508MB. Admin: Tested with a disc size up to 928MB Version 6.46. Tagged as 'Kernel-6_46'
-
- 28 Oct, 2020 1 commit
-
-
John Ballance authored
Changes in Kernel-6_44 left an undefined symbol in s.HAL in DebugTerminal_Rdch. These mods resolve that, and also add a note in s.Kernel to reflect this usage. Version 6.45. Tagged as 'Kernel-6_45'
-
- 24 Oct, 2020 1 commit
-
-
Timothy E Baldwin authored
Previously both `RdchInkey` and `PageTest` enabled interrupts after running callbacks before calling Portable_Idle with the result that callback could be delayed until the next interrupt. * Change `process_callback_chain` to leave interrupts disabled, and rename accordingly. * Remove redundant check of CallBack_Flag. * In `PageTest` move running calbacks into `CtrlShiftTest`, so that it is immediately before the test. * Re-enable interrupts at appropriate locations. Tested on StrongARM Risc PC. Version 6.44. Tagged as 'Kernel-6_44'
-
- 19 Oct, 2020 1 commit
-
-
ROOL authored
Version 6.43. Not tagged
-
- 19 Sep, 2020 1 commit
-
-
Jeffrey Lee authored
Multiple fixes, mostly related to error handling. 1. Ensure R1 is initialised correctly when generating BadPageNumber errors (labels 94 & 95). Generally this involves setting it to zero to indicate that no call to LogOp_MapOut is required. Failing to do this would typically result in a crash. 2. When branching back to the start of the loop after calling GetNonReservedPage, ensure R0 is reset to zero. Failing to do this would have a performance impact on LogOp_MapOut, but shouldn't be fatal. 3. In the main routine, postpone writing back DANode_Size until after the call to physical_to_ppn (because we may decide to abort the op and return an error without moving a page). 4. Fix stack offset when accessing PMPLogOp_GlobalTBLFlushNeeded. Getting this wrong could potentially result in some TLB maintenance being skipped when moving uncacheable pages. 5. Fix stack imbalance at label 94 Version 6.43. Tagged as 'Kernel-6_43'
-
- 25 Jul, 2020 1 commit
-
-
Timothy E Baldwin authored
This ensures that on exit from OS_ReadC / INKEY either a character is returned or the input buffer is empty, and that Portable_Idle is only called when the input buffer is empty. This avoids a 10 microsecond delay and relying on timer interrupts to make progress and allows reliably waiting for input and another event by: Disable Interrupts Repeat Call INKEY(0), exit loop if key pressed Check other event, exit loop if key pressed Call Portable_Idle Version 6.42. Tagged as 'Kernel-6_42'
-
- 11 Jul, 2020 1 commit
-
-
Jeffrey Lee authored
The current OS_Memory 7 implementation uses an address range structure returned by HAL_PhysInfo to decide which part of the physical address arrangement table to overwrite with RAM information. I suspect the original intention was for OS_Memory to use this address range to avoid marking the VRAM as DRAM (HAL_PhysInfo is expected to fill in the VRAM itself). But by overwriting everything between the start and the end address, OS_Memory will also overwrite any non-RAM areas which are sandwiched between RAM banks, e.g. the VideoCore-owned RAM on Pi models with >1GB RAM. There's also the problem that the address range returned by the HAL is using 32bit addresses, so it won't work as-is for RAM located above the 4GB barrier. Fix these issues by reworking the routine so that it ignores the address range returned by the HAL and instead detects VRAM by checking the IsVRAM flag in the PhysRamTable entry. And for detecting if the ROM is running from RAM, instead of using the address range we can rely on the flag available via OS_ReadSysInfo 8 (i.e. HAL_PlatformInfo), like OS_Memory 8 does. Also add a simple BASIC program (Dev.PhysInfo) to allow easy checking of HAL & OS physical address arrangement tables. Version 6.41. Tagged as 'Kernel-6_41'
-
- 01 Jul, 2020 1 commit
-
-
Jeffrey Lee authored
Fix GrowFreePoolFromAppSpace (i.e. appspace shrink operation) to issue UpCall_MemoryMoving / Service_Memory when attempting to shrink PMP-based appspace (i.e. AMBControl nodes). This fixes (e.g.) BASIC getting stuck in an abort loop if you try and use OS_ChangeDynamicArea to grow the free pool. Version 6.40. Tagged as 'Kernel-6_40'
-
- 22 Jun, 2020 1 commit
-
-
Jeffrey Lee authored
Despite never being properly documented in the RISC OS PRMs, there's evidence that Acorn were recommending that third-parties used OS_Byte 166 for locating the OS_Byte variables well into the mid-1990's: https://www.riscosopen.org/forum/forums/5/topics/14676#posts-94080 Currently OS builds which use zero page relocation will only return the low 16 bits of the address from OS_Byte 166, most likely breaking any third-party software which is trying to use it. Attempt to restore compatibility by having OS_Byte 166 add the missing high address bits into the "next location" value returned in R2, and fix OS_Byte 167 in a similar manner (adding into R1). Additionally, make the values read-only, because the kernel is littered with code that uses hard-coded OsbyteVars addresses and so is unlikely to do anything sensible if someone was to modify the OsbyteVars address that's stored in workspace. Version 6.39. Tagged as 'Kernel-6_39'
-
- 23 May, 2020 1 commit
-
-
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'
-
- 23 Mar, 2020 1 commit
-
-
ROOL authored
Edits to the RISCOS header file should really have gone through the allocations system. Fortunately, no harm was done in this case, but a minor syntactical change is required in order to bring it in line with the automatic redaction scripts used when exporting the header from the allocations database. Version 6.37. Not tagged
-
- 21 Mar, 2020 1 commit
-
-
Jeffrey Lee authored
* Listen out for PointerV 9, which (RISC OS 5) mouse drivers use to indicate scroll wheel updates + extra button status * Changes in the state of the extra buttons are treated the same as changes to normal mouse buttons: signalled via Event_Mouse, and stored in the mouse buffer (for reading via OS_Mouse). * Changes in the scroll wheel(s) are signalled via Event_Expansion,4. If the event vector call is unclaimed, the kernel's wheel position accumulators will be updated * Wheel position accumulators can be read via OS_Pointer 2 * Wheel position accumulators implement "wrap to zero" logic on overflow This matches RISCOS Ltd's implementation (http://www.riscos.com/support/developers/riscos6/input/pointerdevices.html), except that: * The kernel currently doesn't call PointerV 4, so PointerV 9 is the only way drivers can report wheel + extra button status * Extra mouse buttons don't generate KeyV transitions * Our implementation is in the kernel, not an OSPointer module Version 6.37. Tagged as 'Kernel-6_37'
-
- 18 Mar, 2020 1 commit
-
-
Robert Sprowson authored
During ModHandReason_ClaimAligned care is taken to start on a multiple of 32 and end on a multiple of 32 + 16 (such that the next block in the heap would be at +20 same as plain ModHandReason_Claim would do). However, during a ModHandReason_ExtendBlock there's a possibility that those criteria can't be retained, due to having to move to a larger gap elsewhere, leaving the end at an inconvenient +36. Similar allocation functions in other OS' don't guarantee to return an extended block with the same alignment, so take the position that for extends we always allocate a fresh block, copy the contents, and free the original. Shrinks are left in place. Tested with a random allocator which juggles 16 aligned allocations 50,000 times. Version 6.36. Tagged as 'Kernel-6_36'
-
- 02 Mar, 2020 2 commits
-
-
Robert Sprowson authored
OS_Module => R0=24 R3=size in bytes R4=alignment in bytes (must be a power of 2) <= R2=base of request or error Tested with a handful of valid and invalid alignments, and with one grossly larger than the free RMA to trigger an RMA extend to occur. Version 6.35. Tagged as 'Kernel-6_35'
-
ROOL authored
Detail: * various low-numbered dynamic areas used by RISC OS 6 and Pyromaniac * OS_ReadSysInfo 8 host platform classes for VirtualRPC, A9Home, Pyromaniac * OS_Byte 0,<not 0> MosVer values for various systems since the BBC micro * OS_Byte 129,0,255 (BASIC INKEY -256) values for various RISC OS systems Admin: Discovered that these weren't really recorded anywhere during recent allocation request. Some information gleaned from http://beebwiki.mdfs.net Version 6.34. Not tagged
-
- 27 Feb, 2020 2 commits
-
-
Jeffrey Lee authored
Dynamic area PostGrow handlers aren't able to return errors, so the V flag is likely undefined. Fix AreaGrow so that it ignores any V-set condition returned by the call (especially since the CallPostGrow rapper will have clobbered any error pointer). Fixes issue reported on forums: https://www.riscosopen.org/forum/forums/4/topics/14662 Version 6.34. Tagged as 'Kernel-6_34'
-
Robert Sprowson authored
The XHCIDriver module adds 64k to get the register address. In an attempt to phase this out (so the registers are the true base address), assign a flag so that loading a suitable XHCIDriver on an old HAL still works. Version 6.33. Not tagged
-
- 12 Feb, 2020 1 commit
-
-
Jeffrey Lee authored
* Update OS_ScreenMode 11's handling of drivers which fail to initialise. If there was no previous driver, then instead of trying to restore that nonexistant driver, stick with the new one. This is mainly to help with the case where the kernel's built in modes aren't accepted by the driver, and valid modes only become available once an MDF is loaded (this can happen with early OMAP3 chip revisions, which have very tight sync & porch limits, causing 90% of the kernel's modes to be rejected). If the kernel was to revert to the "no driver" state, then loading the MDF would still leave you with no video output. * Since we can now end up in a state where a driver is selected but hasn't been programmed yet, update OS_Byte 19 to detect this (via the magic ScreenBlankDPMSState value of 255) and avoid waiting for VSync * Update RemovePages & InsertRemovePagesExit (screen DA handlers) to avoid infinite loops if the screen DA gets shrunk to zero size (was seen while attempting to complete the !Boot sequence while no driver was active) Version 6.33. Tagged as 'Kernel-6_33'
-
- 19 Jan, 2020 1 commit
-
-
Timothy E Baldwin authored
Special case for empty files was crashing, fix by removing which also supports files which report a size of zero but actually contain data such as Unix device nodes and Linux procfs. Error where start outside file adjusted to permit a start exactly at the end of a file to permit (apparently) empty files with no output. Doing likewise for non-empty files is consistent. Also fix closing file in case of error reading GS format from CMOS. Version 6.32. Tagged as 'Kernel-6_32'
-
- 18 Jan, 2020 1 commit
-
-
Jeffrey Lee authored
OS_DynamicArea 21 was treating MaxCamEntry as if it was the exclusive upper bound, when really it's the inclusive bound. The consequence of this was that PMPs were unable to explicitly claim the highest-numbered RAM page in the system. Version 6.31. Tagged as 'Kernel-6_31'
-
- 24 Nov, 2019 3 commits
-
-
Timothy E Baldwin authored
OS_CLI permits commands to be prefixed with a temporary filing system, for example "ADFS:Format" It also passes commands unrecognised to FileSwitch to be executed, so "ADFS::HardDisc4.$.!Boot" first sets the temporary filing to ADFS then executes ":HardDisc4.$.!Boot". This does not work if the path contains a special field, currently this results in an error as the special filed would be lost. Unfortunately many programs, including the RISC OS source fail because of this. Instead if a filing system prefix with special field is found switch to the Temporary filing system and treat the whole command as a path to execute. For example passing "IXFS#W:$.HardDisc4.!Boot" sets the temporary filing system to "IXFS" then executes "IXFS#W:$.HardDisc4.!Boot". Version 6.30. Tagged as 'Kernel-6_30'
-
Jeffrey Lee authored
OS_DynamicArea 27 is the same as OS_DynamicArea 5 ("return free memory"), except the result is measured in pages instead of bytes, allowing it to behave sensibly on machines with many gigabytes of RAM. Similarly, OS_DynamicArea 28 is the same as OS_DynamicArea 7 (internal DA enumeration call used by TaskManager), except the returned size values are measured in pages instead of bytes. A flags word has also been added to allow for more expansion in the future. Hdr:OSMem now also contains some more definitions which external code will find useful. Version 6.29. Tagged as 'Kernel-6_29'
-
Robert Sprowson authored
Version 6.28. Not tagged
-
- 19 Nov, 2019 2 commits
-
-
Jeffrey Lee authored
This change adds a new OS_Memory reason code, 23, for reserving memory without actually assigning it to a dynamic area. Other dynamic areas can still use the memory, but only the code that reserved it will be allowed to claim exclusive use over it (i.e. PageFlags_Unavailable). This is useful for systems such as the PCI heap, where physically contiguous memory is required, but the memory isn't needed all of the time. By reserving the pages, it allows other regular DAs to make use of the memory when the PCI heap is small. But when the PCI heap needs to grow, it guarantees that (if there's enough free memory in the system) the previously reserved pages can be allocated to the PCI heap. Notes: * Reservations are handled on an honour system; there's no checking that the program that reserved the memory is the one attempting to map it in. * For regular NeedsSpecificPages DAs, reserved pages can only be used if the special "RESV" R0 return value is used. * For PMP DAs, reserved pages can only be made Unavailable if the entry in the page block also specifies the Reserved page flag. The actual state of the Reserved flag can't be modified via PMP DA ops, the flag is only used to indicate the caller's permission/intent to make the page Unavailable. * If a PMP DA tries to make a Reserved page Unavailable without specifying the Reserved flag, the kernel will try to swap it out for a replacement page taken from the free pool (preserving the contents and generating Service_PagesUnsafe / Service_PagesSafe, as if another DA had claimed the page) Version 6.28. Tagged as 'Kernel-6_28'
-
Timothy E Baldwin authored
* MinAplWork isn't used. * SuperMode isn't used and is less well known than "SWI OS_EnterOS". * MEMCADR is now only a magic value returned by OS_UpdateMEMC, so it is clearer to include it literally with comment. Added a comment to explain the baffling combination of the MEMC1 control register's address with it's value. Version 6.27. Not tagged
-
- 09 Nov, 2019 1 commit
-
-
Timothy E Baldwin authored
This makes SVLK and NVECTORS available. Version 6.27. Tagged as 'Kernel-6_27'
-
- 05 Nov, 2019 1 commit
-
-
Jeffrey Lee authored
Version 6.26. Tagged as 'Kernel-6_26'
-
- 20 Oct, 2019 2 commits
-
-
Timothy E Baldwin authored
Version 6.25. Tagged as 'Kernel-6_25'
-
Timothy E Baldwin authored
Between RISC OS 3.6 and 3.7 the directory was renamed from Doc to Docs and was duplicated during CVS import. Fix by deleting Doc. Identical files remain in Docs. Version 6.24. Not tagged
-
- 30 Sep, 2019 1 commit
-
-
Jeffrey Lee authored
Detail: This adds a new OS_DynamicArea reason code, 26, for adjusting AplWorkMaxSize at runtime. This allows compatibility tools such as Aemulor to adjust the limit without resorting to patching the kernel. Any adjustment made to the value will affect the upper limit of application space, and the lower limit of dynamic area placement. Attempting to adjust beyond the compile-time upper/default limit, or such that it will interfere with existing dynamic areas / wimpslots, will result in an error. Relevant forum thread: https://www.riscosopen.org/forum/forums/11/topics/14734 Admin: Tested on BB-xM, desktop active & inactive Version 6.24. Tagged as 'Kernel-6_24'
-
- 21 Sep, 2019 1 commit
-
-
Jeffrey Lee authored
Detail: - s/HAL - Fix ADD v. SUB muddle that could prevent addresses from being rounded down correctly. Fix incorrect logical address being returned to caller on pre-ARMv6 machines due to PageTableSync corrupting a1. - s/NewReset - Initialising the CMOS RAM cache while in the middle of setting up the processor vectors feels a bit silly. Move the code to just afterwards so that it feels a bit safer, and so that early crashes are easier to debug (processor vectors in stable state) Admin: Tested on Iyonix. Fixes ROM softload failure reported on forums: https://www.riscosopen.org/forum/forums/11/topics/14749 Version 6.23. Tagged as 'Kernel-6_23'
-
- 16 Aug, 2019 1 commit
-
-
Ben Avison authored
To achieve this: * DecodeL1Entry and DecodeL2Entry return 64-bit physical addresses in r0 and r1, with additional return values shuffled up to r2 and r3 * DecodeL1Entry now returns the section size, so callers can distinguish section- from supersection-mapped memory * PhysAddrToPageNo now accepts a 64-bit address (though since the physical RAM table is currently still all 32-bit, it will report any top-word-set addresses as being not in RAM) Version 6.22. Tagged as 'Kernel-6_22'
-
- 29 Jun, 2019 1 commit
-
-
Robert Sprowson authored
ControlList_Interlaced is taken to have meant "output interlaced sync on H/V" and "configure DMA to show alternate lines in the framestore on alternate fields", therefore SyncPol flags mean: b43 00 = 'normal' progressive scan 01 = interlaced sync, but both fields show the same image 10 = (invalid) 11 = interlaced sync, fields use alternate lines from the image Version 6.21. Tagged as 'Kernel-6_21'
-
- 23 Jun, 2019 1 commit
-
-
Ben Avison authored
Without this, some CPUs (including Cortex-A72) take the undefined instruction trap when encountering any CP15-encoded barrier instructions. Requires RiscOS/Sources/Programmer/HdrSrc!1 Version 6.20. Tagged as 'Kernel-6_20'
-
- 24 Feb, 2019 1 commit
-
-
Jeffrey Lee authored
Detail: s/vdu/vdudriver - When mapping external framestores, only double-map them if the driver supports hardware scrolling. Avoids wasting IO address space, and reduces IO space fragmentation if the framestore address changes Admin: Tested on Raspberry Pi 3 Version 6.19. Tagged as 'Kernel-6_19'
-
- 20 Jan, 2019 1 commit
-
-
Jeffrey Lee authored
Detail: s/vdu/vdupalxx: - Fix conditional code sequence in PV_BulkWrite which meant that the greyscale palette flag was being recalculated when the border or pointer colour was changed. - Change PV_1stFlashState / PV_2ndFlashState to act as NOPs in true colour modes, which helps to avoid regular redundant gamma table updates (due to the flashing colour logic in the VSync handler). Admin: Tested on Raspberry Pi 3 Version 6.18. Tagged as 'Kernel-6_18'
-
- 29 Nov, 2018 1 commit
-
-
Jeffrey Lee authored
Detail: s/vdu/legacymodes - Make the Service_ModeExtension implementation automatically use ExtraBytes to request that the row length is a multiple of a word (since things fail with non-word aligned rows) hdr/VIDCList - Un-deprecate SyncPol bits 2 & 3 and improve the comments to indicate the difference between SyncPol interlace and control list interlace Admin: Tested on BB-xM Version 6.17. Tagged as 'Kernel-6_17'
-
- 19 Nov, 2018 1 commit
-
-
Jeffrey Lee authored
Detail: s/vdu/vduswis - Fix 18 year old register corruption bug in FindOKMode which would prevent it from falling back to Service_ModeTranslation if Service_ModeExtension returned a VIDC list but the VIDC list was rejected by the GraphicsV driver s/vdu/vdudriver - Also, change a couple of error cases in ModeChangeSub so that they use the "Screen mode not available" error instead of the incorrect "Not enough screen memory" error. Admin: Tested on Raspberry Pi 3 Fixes issue reported on forums where if AnyMode is loaded, numbered modes in unsupported colour depths weren't being replaced with substitutes (although note that there are still some AnyMode-related issues to resolve) https://www.riscosopen.org/forum/forums/4/topics/12773 Version 6.16. Tagged as 'Kernel-6_16'
-
- 14 Nov, 2018 1 commit
-
-
Jeffrey Lee authored
Detail: s/ARMops - If the ICacheInvalidate macro was told to pull a2, it would pull it before invoking ICache_InvalidateRange, causing the end address of the range to be lost. Avoid this by only pulling the registers after the ranged call. Also optimise MMU_ChangingEntry to go straight to ICache_InvalidateRange instead of doing a redundant range size check. Admin: Tested on OMAP5 Potentially fixes lockup/long stall seen when using PhotoDesk, reported by Willi Theiss Version 6.15. Tagged as 'Kernel-6_15'
-