Commit f549c0ff authored by John Ballance's avatar John Ballance
Browse files

Changes to resolve some of the BCM2835 initial hacks

  1: Added HAL_FramebufferAddress entry.
  2: Minor mod the NoIrqVecSwiDispatch mods recently submitted. Improved coverage
  3: Added compile time switch InverseTextTransparency to toggle sense of text
  (pre-wimp) for use until correct transparency behaviour is introduced in the RPi
  start.elf.
  4: Ensured that if a non aligned frame buffer is reported, ALL of the space
  is actually mapped in.
Detail:
  (list files and functions that have changed)
Admin:
  builds and runs .. Still needs service_mode extension work to replace hard
  coded mode definition files
  (highlight level of testing that has taken place)
  (bugfix number if appropriate)


Version 5.35, 4.79.2.147.2.5. Tagged as 'Kernel-5_35-4_79_2_147_2_5'
parent 65b2059f
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.147.2.4"
Module_Date SETS "18 May 2012"
Module_ApplicationDate SETS "18-May-12"
Module_MinorVersion SETS "4.79.2.147.2.5"
Module_Date SETS "20 May 2012"
Module_ApplicationDate SETS "20-May-12"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.147.2.4)"
Module_HelpVersion SETS "5.35 (18 May 2012) 4.79.2.147.2.4"
Module_FullVersion SETS "5.35 (4.79.2.147.2.5)"
Module_HelpVersion SETS "5.35 (20 May 2012) 4.79.2.147.2.5"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.147.2.4
#define Module_Date_CMHG 18 May 2012
#define Module_MinorVersion_CMHG 4.79.2.147.2.5
#define Module_Date_CMHG 20 May 2012
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.147.2.4"
#define Module_Date "18 May 2012"
#define Module_MinorVersion "4.79.2.147.2.5"
#define Module_Date "20 May 2012"
#define Module_ApplicationDate "18-May-12"
#define Module_ApplicationDate "20-May-12"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.147.2.4)"
#define Module_HelpVersion "5.35 (18 May 2012) 4.79.2.147.2.4"
#define Module_FullVersion "5.35 (4.79.2.147.2.5)"
#define Module_HelpVersion "5.35 (20 May 2012) 4.79.2.147.2.5"
#define Module_LibraryVersionInfo "5:35"
......@@ -170,6 +170,8 @@ EntryNo_HAL_TimerIRQStatus # 1
EntryNo_HAL_ExtMachineID # 1 ; ReadSysInfo 10
EntryNo_HAL_Video_FramestoreAddress # 1
KnownHALEntries # 0 ; Used inside Kernel
; Various flags and constants
......
......@@ -292,6 +292,9 @@ DebugTerminal SETL {FALSE}
GBLL DebugHALTX
DebugHALTX SETL (Version :AND: 1) = 1 ; Yes for odd numbered development
GBLL InverseTextTransparency
InverseTextTransparency SETL {FALSE}
GBLL DebugHeaps ; initialise claimed and freed blocks
DebugHeaps SETL {FALSE} ; (may slow things down unacceptably)
......
......@@ -39,6 +39,34 @@
CallHAL $rout
MEND
MACRO
DebugTXHex
! 0, "FIXME: jb temporary code"
;!!!
STR lr,[sp,#-4]!
BL HALDebugHexTX
LDR lr,[sp],#4
MEND
MACRO
DebugTXHex4
! 0, "FIXME: temporary code"
;!!!
STR lr,[sp,#-4]!
BL HALDebugHexTX4
LDR lr,[sp],#4
MEND
MACRO
DebugTXHex2
! 0, "FIXME: temporary code"
;!!!
STR lr,[sp,#-4]!
BL HALDebugHexTX2
LDR lr,[sp],#4
MEND
MACRO
DebugTX $str
[ DebugHALTX
......@@ -1470,11 +1498,11 @@ VecSwiDespatch ROUT
[ NoARMT2
AND r14, r14, #&F0000000 ; extract caller's CCs
BIC r11, r11, #&F0000000 ; mask out ours
BIC r11, r11, #I32_bit ; enable IRQs
ORR r11, r11, #I32_bit ; disable IRQs (cf J Lee mod)
ORR r11, r11, r14 ; add in CCs
|
MOV r14, r14, LSR #28
BIC r11, r11, #I32_bit ; enable IRQs
ORR r11, r11, #I32_bit ; disable IRQs (cf J Lee mod)
BFI r11, r14, #28, #4 ; add in caller's CCs
]
MSR CPSR_cf, r11 ; and set it all up
......
......@@ -946,21 +946,36 @@ TV_Mode_string
; ConvertBankToAddress (was a bug!)
[ UseGraphicsV
Push "r0-r4"
! 0, "FIXME: temporary code"
;!!!
[ {FALSE}
Push "r0-r6"
! 0, "FIXME: fixed (!?) temporary code"
MOV r4, #GraphicsV_FramestoreAddress
BL CallGraphicsV
TEQ r4, #0
BNE %FT581
[ {TRUE}
; for mapping in, round start address down and size up to megabyte boundaries
; r0 = physical start, r1= size
; so frame buffer is wholly contained within the mapped in area
MOV r3, #1<<20 ; 1 Megabyte
SUB r3, r3, #1 ; convert to mask
MOV r4, r1 ; remember what was asked for
AND r5, r0, r3 ; and offset from megabyte base
TST r1, r3 ; non integer megabyte?
BIC r2, r1, r3 ; (clear the bits)
ADDNE r2, r2, #1<<20 ; yes.. up to next megabyte
BIC r1, r0, r3 ; ensure megabyte boundary at start
MOV r0, #13 ; map in permanently
ORR r0, r0, #1:SHL:8 ; buffered, uncached
ORR r0, r0, #1:SHL:16+1:SHL:17 ; doubly map, access permission specified
SWI XOS_Memory
BVS %FT581
STR r4, [WsPtr, #TotalScreenSize] ; what we asked for
ADD r3, r3, r4 ; compute end
ADD r3, r3, r5 ; and allow offset dfrom start
STR r3, [WsPtr, #ScreenEndAddr] ; actual screen end
MOV r14, #1
B %FT582
|
;hardcoded values for R-Pi alpha. external framestore requires a GraphicsV client,
; but still debating the merits of external vs internal
MOV r0,#&2000000
MOV r1,#&0800000
MOV r4,#0
]
MOV r1, r1, LSR #20 ; round size down to 1MB
MOV r2, r1, LSL #20
ADD r0, r0, #1:SHL:20 ; round addr up to 1MB
......@@ -977,6 +992,8 @@ TV_Mode_string
STR r3, [WsPtr, #ScreenEndAddr]
MOV r14, #1
B %FT582
]
581
MOV r0, #128+2
SWI XOS_ReadDynamicArea
......@@ -985,7 +1002,7 @@ TV_Mode_string
STRVC r0, [WsPtr, #ScreenEndAddr]
MOV r14, #0
582
Pull "r0-r4"
Pull "r0-r6"
STRB r14, [WsPtr, #ExternalFramestore]
]
......
......@@ -45,7 +45,7 @@ MOSGraphicsV_Table
GVEntry SetDMAAddress ; 6
GVEntry VetMode ; 7
GVEntry DisplayFeatures ; 8
MOV pc, lr ; 9
GVEntry FramestoreAddress ; 9
GVEntry WritePaletteEntry ; 10
GVEntry WritePaletteEntries ; 11
GVEntry ReadPaletteEntry ; 12
......@@ -136,6 +136,13 @@ GV_DisplayFeatures
MOV r2, r0
Pull "r0,r1,r3, r9, pc"
GV_FramestoreAddress
Push "r3, r9, lr"
mjsAddressHAL WsPtr
MOV r4, #0
mjsCallHAL HAL_Video_FramestoreAddress
Pull "r3, r9, pc"
GV_WritePaletteEntry
Push "r0-r3, r9, lr"
mjsAddressHAL WsPtr
......
......@@ -165,8 +165,13 @@ DefaultColours ROUT
[ {TRUE} ; TMD 25-Jun-93 - change default text colour in 16bpp to &7FFF, and 32bpp to &00FFFFFF
LDR r14, =&FFFF
CMP fore, r14
[ InverseTextTransparency ; test to invert text transparency when transparency channel inverted
ORREQ fore, fore, #&8000 ; &7FFF -> &FFFF
ORRHI fore, fore, #&FF000000 ; &00FFFFFF -> &FFFFFFFF
|
BICEQ fore, fore, #&8000 ; &FFFF -> &7FFF
BICHI fore, fore, #&FF000000 ; &FFFFFFFF -> &00FFFFFF
]
]
MOV back, #0
ADD R14, WsPtr, #TForeCol
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment