Teach the kernel about different memory attributes
Jeffrey Lee authored
Detail:
  Briefly, this set of changes:
  * Adjusts PhysRamTable so that it retains the flags passed in by the HAL from OS_AddRAM (by storing them in the lower 12 bits of the size field)
  * Sorts the non-VRAM entries of PhysRamTable by speed and DMA capability, to ensure optimal memory allocation during OS startup.
  * Adjust the initial memory allocation logic to allow the cursor/sound chunk and HAL noncacheable workspace to come from DMA capable memory
  * Extends OS_Memory 12 to accept a 'must be DMA capable' flag in bit 8 of R0. This is the same as available in ROL's OS.
  * Extends OS_DynamicArea 0 to allow the creation of dynamic areas that automatically allocate from DMA capable memory. In ROL's OS this was done by setting bit 12 of R4, but we're using bits 12-14 for specifying the cache policy, so instead bit 15 is used.
  * Fixes OS_ReadSysInfo 6 to return the correct DevicesEnd value now that the IRQ/device limit is computed at runtime
  File changes:
  * hdr/OSEntries - Add definitions of the various flags passed to OS_AddRAM by the HAL. Add a new flag, NoDMA, for memory which can't be used for DMA.
  * hdr/KernelWS - Tidy PhysRamTable definition a bit by removing all the DRAM bank definitions except the first - this makes it easier to search for code which is interacting with the table. Remove VRAMFlags, it's redundant now that the flags are kept in the table. Add DMA allocation info to InitWs.
  * s/AMBControl/memmap - Updated to mask out the flags from PhysRamTable when reading RAM block sizes.
  * s/ARM600 - Strip out a lot of IOMD specific pre-HAL code.
  * s/ChangeDyn - Updated to cope with the flags stored in PhysRamTable. Implement support for DMA-capable dynamic areas. Rewrite InitDynamicAreas to insert pages into the free pool in the right order so that the fastest memory will be taken from it first.
  * s/GetAll, s/Middle - Fix OS_ReadSysInfo 6 to return the correct HAL-specific DevicesEnd value
  * s/HAL - Significant rework of initial RAM allocation code to allow the kernel workspace to come from the fastest DMA incapable RAM, while also allowing allocation of DMA capable memory for HAL NCNB workspace & kernel cursor/sound chunks. ClearPhysRAM rewritten as part of this.
  * s/MemInfo - Updated to cope with the flags stored in PhysRamTable. Add support for the new OS_Memory 12 flag. Update OS_Memory 7 to not assume PhysRamTable entries are sorted in address order, and rip out the old pre-HAL IOMD implementation.
  * s/NewReset - Remove GetPagesFromFreePool option, assume TRUE (as this has been the case for the past 10+ years). Revise a few comments and strip dead code. Update to cope with PhysRamTable flags.
  * s/VMSAv6 - Remove a couple of unused definitions
  * s/vdu/vdudriver - Update to cope with PhysRamTable flags
Admin:
  Tested in Kinetic RiscPC ROM softload, Iyonix softload, & OMAP3


Version 5.35, 4.79.2.186. Tagged as 'Kernel-5_35-4_79_2_186'
c40b2dba
Name Last commit Last update
..
vdu23 Make GraphicsV_IICOp more consistent
vdu5 Commit of kernel as featured in release 5.00.
vducursoft Be more careful when updating Vinit from the VSync IRQ handler
vdudecl Improve heap manager. Add heap testbed. Add dummy implementation of some OS_ScreenMode reason codes.
vdudriver Teach the kernel about different memory attributes
vdufont Import from cleaned 360 CD
vdufontl1 Kernel now sets "interlaced" mode flag itself from mode control parameters; this simplifies the Interlace module's job significantly.
vdugrafa Commit of kernel as featured in release 5.00.
vdugrafb Add compressed ROM support. Make more use of ARMv5+ instructions. Other misc tweaks.
vdugrafc Import from cleaned 360 CD
vdugrafd Added 'UnConv' error (see also HdrSrc).
vdugrafdec Import from cleaned 360 CD
vdugrafe Rationalise some old switches.
vdugraff Reindent Arthur2.
vdugrafg Commit of kernel as featured in release 5.00.
vdugrafh Review of Internation switch
vdugrafi Reindent Arthur2.
vdugrafj Review of Internation switch
vdugrafk Added compile-time support for full-resolution teletext characters in teletext emulation mode (MODE 7) for that authentic BBC Micro feel.
vdugrafl Reindent Arthur2.
vdugrafv Merge with HAL branch
vdumodes Correct mode 47 parameters
vdupal10 partial video changes for kernel/HAL split near-HAL code for VIDC/IOMD in vdu.vduhint briefly tested in Ursula desktop build still some kernel workspace dependency in near-HAL code
vdupal20 partial video changes for kernel/HAL split near-HAL code for VIDC/IOMD in vdu.vduhint briefly tested in Ursula desktop build still some kernel workspace dependency in near-HAL code
vdupalette Miscellaneous v6-related updates
vdupalxx
vduplot
vdupointer
vduswis
vduttx
vduwrch