Source
...
Target
Commits (6)
  • Jeffrey Lee's avatar
    Tweak debug code · 79f305e5
    Jeffrey Lee authored
    Detail:
      hdr/80321 - Improved notes about debug options.
      s/Boot - Don't reinit UART 3 if it's already in use for debugging
      s/Top, hdr/80321 - Use new FlashCheckInDebug option to help work out whether flash check failure code is called
      s/UART - Disable HAL UART API if UART 3 is in use for debugging
    Admin:
      Tested in ROM softload
    
    
    Version 0.29. Tagged as 'Tungsten-0_29'
    79f305e5
  • Jeffrey Lee's avatar
    Update keyboard scanning to work with new kernel changes · b65fb87b
    Jeffrey Lee authored
    Detail:
      c/USBHAL, h/USBHAL - Updated HAL_KbdScanInterrupt to follow the behaviour that the kernel expects. The interrupting device number is passed in in a1, and the function should return a1 unmodified if the device is unrecognised, or -1 if the interrupt was handled.
    Admin:
      Tested in ROM on Iyonix
    
    
    Version 0.30. Tagged as 'Tungsten-0_30'
    b65fb87b
  • Jeffrey Lee's avatar
    Fix HAL_UARTModemControl · ae45fb7f
    Jeffrey Lee authored
    Detail:
      s/UART - Fixed HAL_UARTModemControl to pay attention to the 'mask' parameter
    Admin:
      Tested in Iyonix ROM softload
    
    
    Version 0.31. Tagged as 'Tungsten-0_31'
    ae45fb7f
  • Jeffrey Lee's avatar
    Update to support alternate HAL sizes · a11f352f
    Jeffrey Lee authored
    Detail:
      s/Boot, s/Top - Now uses OSROM_HALSize for the HAL size instead of fixed 64K constant.
    Admin:
      Tested in ROM softload with 64K & 32K HAL sizes.
      However, Aemulor doesn't seem to like a 32K HAL size.
    
    
    Version 0.32. Tagged as 'Tungsten-0_32'
    a11f352f
  • Robert Sprowson's avatar
    Store ROM distribution tool used with 5.16. · 56e15ee2
    Robert Sprowson authored
    Ought to archive it somewhere!
    
    Version 0.33. Tagged as 'Tungsten-0_33'
    56e15ee2
  • Robert Sprowson's avatar
    Update ROM distribution tool. · 2b3e44d9
    Robert Sprowson authored
    Searched for date set to match 5.18 kernel.
    Lowercase function changed to not leak 255 bytes on every call.
    Old patches removed.
    Improved indentation in a few places.
    Changed longhand creation of 4 byte file to use BPUT instead.
    Some variable name and comment typos ammended.
    
    Version 0.34. Tagged as 'Tungsten-0_34'
    2b3e44d9
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.28"
Module_Version SETA 28
Module_MajorVersion SETS "0.34"
Module_Version SETA 34
Module_MinorVersion SETS ""
Module_Date SETS "19 Jan 2010"
Module_ApplicationDate SETS "19-Jan-10"
Module_Date SETS "07 Jan 2012"
Module_ApplicationDate SETS "07-Jan-12"
Module_ComponentName SETS "Tungsten"
Module_ComponentPath SETS "castle/RiscOS/Sources/HAL/Tungsten"
Module_FullVersion SETS "0.28"
Module_HelpVersion SETS "0.28 (19 Jan 2010)"
Module_FullVersion SETS "0.34"
Module_HelpVersion SETS "0.34 (07 Jan 2012)"
END
/* (0.28)
/* (0.34)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.28
#define Module_MajorVersion_CMHG 0.34
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Jan 2010
#define Module_Date_CMHG 07 Jan 2012
#define Module_MajorVersion "0.28"
#define Module_Version 28
#define Module_MajorVersion "0.34"
#define Module_Version 34
#define Module_MinorVersion ""
#define Module_Date "19 Jan 2010"
#define Module_Date "07 Jan 2012"
#define Module_ApplicationDate "19-Jan-10"
#define Module_ApplicationDate "07-Jan-12"
#define Module_ComponentName "Tungsten"
#define Module_ComponentPath "castle/RiscOS/Sources/HAL/Tungsten"
#define Module_FullVersion "0.28"
#define Module_HelpVersion "0.28 (19 Jan 2010)"
#define Module_LibraryVersionInfo "0:28"
#define Module_FullVersion "0.34"
#define Module_HelpVersion "0.34 (07 Jan 2012)"
#define Module_LibraryVersionInfo "0:34"
......@@ -569,7 +569,7 @@ static int find_keyboard (usb_descriptor_t* d)
return -1;
}
int HAL_KbdScanInterrupt (void)
int HAL_KbdScanInterrupt (int devno)
{
int w, intr;
OHCI_TD* dh;
......@@ -577,7 +577,11 @@ int HAL_KbdScanInterrupt (void)
if (uh == 0)
{
dprintf (("", "Interrupt called out of context\n"));
return 0;
return devno;
}
if(devno != uh->irq_device)
{
return devno;
}
intr = OREAD(OHCI_INTERRUPT_STATUS);
......@@ -802,7 +806,7 @@ root_change:
{
uh->result |= HAL_KbdScan_Complete;
}
return !intr;
return -1;
}
}
......@@ -810,7 +814,7 @@ root_change:
hal_ack_usb_irq(uh->irq_device);
return !intr;
return -1;
}
#if defined(HAL) && defined(DEBUGLIB)
......
......@@ -18,7 +18,7 @@
extern void HAL_KbdScanSetup (void);
extern unsigned int HAL_KbdScan (void);
extern void HAL_KbdScanFinish (void);
extern int HAL_KbdScanInterrupt (void);
extern int HAL_KbdScanInterrupt (int devno);
extern void HAL_IRQEnable(int);
......
......@@ -16,9 +16,17 @@
GBLL RevB
RevB SETL {TRUE}
; Debugging in the serial port,and the choice of UART (1 or 3)
; Debugging in the serial port (HAL_DebugTX, HAL_DebugRX)
GBLL Debug
Debug SETL {FALSE}
; Choice of debug UART (1 or 3)
; UART 1 = backplate port 1, shared with Serial module
; UART 3 = backplate port 2. Ordinarily used by DualSerial module
; (via HAL UART API). But if (Debug :LAND: (DebugPort=3)), HAL debug
; code will be sole user.
; Note that this option also selects the port used by the FlashCheck
; code
GBLA DebugPort
DebugPort SETA 1
......@@ -34,6 +42,11 @@ DisableUSB SETL {TRUE}
GBLL FlashCheck
FlashCheck SETL {TRUE} :LAND: RevB
; Should flash checking be enabled, even if debug is
; (must be true for current softload tool to load debug images)
GBLL FlashCheckInDebug
FlashCheckInDebug SETL {TRUE}
; Should the I cache be off when the MMU is
GBLL CacheOff
CacheOff SETL {FALSE}
......
......@@ -17,6 +17,7 @@
GET Hdr:System
GET Hdr:Machine.<Machine>
GET Hdr:ImageSize.<ImageSize>
GET Hdr:HALSize.<HALSize>
GET Hdr:MEMM.ARM600
......@@ -27,7 +28,7 @@
GET hdr.StaticWS
GET hdr.80321
; This version assumes a RISC OS image starting 64K after us.
; This version assumes a RISC OS image starting OSROM_HALSize bytes after us.
AREA |Asm$$Code|, CODE, READONLY, PIC
......@@ -107,7 +108,7 @@ rom_checkedout_ok
BL generate_POR_flags
ORR a1, a1, #OSStartFlag_RAMCleared
ADRL a2, HAL_Base + 64*1024 ; a2 -> RISC OS image
ADRL a2, HAL_Base + OSROM_HALSize ; a2 -> RISC OS image
ADR a3, HALdescriptor
MOV a4, v1
CallOSM OS_Start
......@@ -116,7 +117,7 @@ rom_checkedout_ok
HALdescriptor DATA
DCD HALFlag_NCNBWorkspace
DCD HAL_Base - HALdescriptor
DCD 64*1024
DCD OSROM_HALSize
DCD HAL_EntryTable - HALdescriptor
DCD HAL_Entries
DCD HAL_WsSize
......@@ -434,8 +435,10 @@ HAL_Init
BL ATA_Init
[ :LNOT: (Debug :LAND: (DebugPort = 3))
MOV a1,#0
BL HAL_UARTStartUp
]
; MOV a1,#1
; BL HAL_UARTStartUp
; MOV a1,#2
......
......@@ -18,6 +18,7 @@
GET Hdr:System
GET Hdr:Machine.<Machine>
GET Hdr:ImageSize.<ImageSize>
GET Hdr:HALSize.<HALSize>
GET Hdr:PCI
GET Hdr:MEMM.ARM600
......@@ -81,7 +82,7 @@ restart
MCR p15, 0, a1, c7, c7 ; invalidate caches
MCR p15, 0, a1, c8, c7 ; invalidate TLBs
ADRL v1, HAL_Base + 64*1024 ; v1 -> RISC OS image
ADRL v1, HAL_Base + OSROM_HALSize ; v1 -> RISC OS image
LDR v8, [v1, #OSHdr_Entries]
ADD v8, v8, v1 ; v8 -> RISC OS entry table
......@@ -173,10 +174,10 @@ copy_rom_to_ram
ADRL v1, HAL_Base
LDR v2, =OSROM_ImageSize * 1024
|
ADRL v1, HAL_Base + 64*1024
ADRL v1, HAL_Base + OSROM_HALSize
LDR v2, [v1, #OSHdr_ImageSize]
SUB v1, v1, #64*1024 ; start of ROM
ADD v2, v2, #64*1024 ; size of ROM
SUB v1, v1, #OSROM_HALSize ; start of ROM
ADD v2, v2, #OSROM_HALSize ; size of ROM
]
BL get_end_of_ram
SUB a2, a1, v2 ; a2 -> start of RAM copy
......@@ -255,7 +256,7 @@ wait_for_aau
; now back up to ROM
[ FlashCheck :LAND: :LNOT: Debug
[ FlashCheck :LAND: (FlashCheckInDebug :LOR: :LNOT: Debug)
; Is the ROM valid?
TEQ v4, #0
; if not signal the failure on the floppy drive light and
......
......@@ -61,7 +61,11 @@ $label BaseAddr
; Return array of UART port physical addresses.
;
HAL_UARTPorts
[ Debug :LAND: (DebugPort = 3)
MOV a1, #0
|
MOV a1, #1
]
MOV pc, lr
; void StartUp(int port)
......@@ -390,16 +394,16 @@ HAL_UARTBreak
HAL_UARTModemControl
BaseAddr
PHPSEI ip, a3
LDRB a3, [a1, #UART_MCR]
PHPSEI ip, a4
LDRB a4, [a1, #UART_MCR]
CMP a2, #-1
AND a4, a3, #DTR+RTS ; a4 = relevant bits of current MCR
BIC a3, a3, #DTR+RTS ; a3 = other bits of current MCR
ANDNE a2, a2, #DTR+RTS ; a2 = relevant bits on entry
ORRNE a2, a2, a3
STRNEB a2, [a1, #UART_MCR]
ORR a3, a3, #256-(DTR+RTS) ; Only allow DTR+RTS to be modified
AND a2, a2, #DTR+RTS
ANDNE a3, a3, a4
EORNE a3, a3, a2
STRNEB a3, [a1, #UART_MCR]
PLP ip
MOV a1, a4
AND a1, a4, #DTR+RTS
MOV pc, lr
......
......@@ -19,12 +19,12 @@
COMPONENT = !ROM<Build$KernelVersion>
INSTDIR := ${INSTDIR}.${COMPONENT}
include Makefiles:StdTools
include StdTools
all: install
install:
${AWK} '/^Version/ { VERSION=$3 } END { system("set Build$KernelVersion " VERSION) }' <Src$Dir>.Kernel.Version
${AWK} '/^Version/ { VERSION=$3 } END { system("set Build$KernelVersion " VERSION) }' <Build$Dir>.castle.RiscOS.Sources.Kernel.Version
${MKDIR} ${INSTDIR}
${CP} Resources.!+Resource ${INSTDIR}.!+Resource ${CPFLAGS}
${CP} LocalRes:!Help ${INSTDIR}.!Help ${CPFLAGS}
......
| Copyright 2009 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
IfThere <BootResources$Dir>.!+Resource Then /<BootResources$Dir>.!+Resource
| Copyright 2009 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Set FlashICPFile$Dir <Obey$Dir>
IfThere <FlashICPFile$Dir>.Update Then Run <FlashICPFile$Dir>.Update
......@@ -20,4 +6,3 @@ Wimpslot -min 5000k
If "%0" <> "" Then Run <FlashICPFile$Dir>.FlashICP %*0 Else Run <FlashICPFile$Dir>.Warning
UnSet FlashICPFile$Dir
| Copyright 2009 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
|Section 510<Auto
|Start Acorn !Boot 0.26 510 Auto tasks
IFthere Boot:RO510Hook.Res Then Repeat Filer_Boot Boot:RO510Hook.Res -Applications -Tasks
......
......@@ -7,44 +7,54 @@ IYONIX pc with a new version of RISC OS.
Programming the Flash ROM is done in a five part process:
1. The new ROM Image is loaded in to memory and check summed.
2. A restore programmer is written to the hard disc root dir.
(see below)
3. Any patching required is undertaken on the rom image.
1. The new ROM image is loaded in to memory and checksummed.
2. A backup copy of the former ROM contents is written to
the hard disc root dir, see below.
3. Any patching required is undertaken on the ROM image.
4. The Flash ROM is erased.
5. The new ROM Image is programmed into the Flash ROM.
5. The new ROM image is programmed into the Flash ROM.
You will additionally be given the option to program either a Full ROM
or a Transfer ROM. The Transfer ROM is for use primarily before
swapping or installing Graphics cards.
You will additionally be given the option to program either a "Full ROM"
or a "Transfer ROM". The "Transfer ROM" is for use primarily before
swapping or installing graphics cards.
Once stage four has begun it is important that the computer is
not reset until the completion of stage five. If for any reason
the computer is re-set at any point during the stages four and
five it will be left with an incomplete version of RISC OS in
the Flash ROM and may no longer Boot.
the Flash ROM and may no longer start up.
In this instance the computer must be returned to Castle for
re-programming.
If in doubt, you can always run the programmer a second time before
resetting the machine. If the contents of the Flash ROM are correct,
then the programmer will tell you so, without attempting any more
programming.
resetting the machine. If the contents of the Flash ROM are already
up to date then the programmer will tell you so, without attempting
any more programming.
Do NOT re-program the Flash ROM with an earlier version of
RISC OS than that with which the computer was supplied. Doing
so may result in serious loss of functionality requiring it to
be returned to Castle for re-programming.
Using the restore programmer.
Using the restore programmer
============================
An application, !Restorexxx (xxx is the previous rom version,
e.g. 510), is created in adfs::4.$. To restore your previous
ROM 'blind' boot your machine, and at the desktop i.e. at end
of boot, press F12. Then type !Restore513 -restorerom and press
return. Leave your machine for at least 5 minutes before doing
An application, !RestoreXXX is created in the root directory of
your harddisc (ADFS::4.$), where XXX is the previous ROM version. For
example 510 for RISC OS 5.10, make a note of your previous version from the
task switcher 'Info' box.
If after the upgrade the machine starts (denoted by the beep from the
speaker before the keyboard is active) but you are unable to see any
output on the monitor it is possible to restore your previous ROM
'blind'.
Wait for the computer to boot (keyboard active, harddisc inactive) then
press the F12 key.
Then type
!Restore510 -restorerom
and press return. Leave your machine for at least 5 minutes before doing
anything else. If the restore was successful then on rebooting
you'll be back where you started. (!Restore 512 if you had
RISC OS 5.12 before programming, etc)
you'll be back where you started.
JWB 22/4/09
Set FlashICPFile$Dir <Obey$Dir>
IfThere <FlashICPFile$Dir>.Update Then Run <FlashICPFile$Dir>.Update
Wimpslot -min 5000k
Run <FlashICPFile$Dir>.FlashICP -restorerom -norestore
UnSet FlashICPFile$Dir
| Copyright 2009 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Set FlashICPFile$Dir <Obey$Dir>
RMEnsure UtilityModule 5.01 Error You MUST have updated to RISC OS 5.01 first
Wimpslot -min 5000k
Run <FlashICPFile$Dir>.FlashICP -testbed
UnSet FlashICPFile$Dir
No preview for this file type
| If !Boot didn't run, assign some defaults
If "<Boot$Dir>" = "" Then Set Boot$Dir ADFS::4.$.!Boot
If "<BootResources$Dir>" = "" Then Set BootResources$Dir <Boot$Dir>.Resources
If "<System$Path>" = "" Then Run <BootResources$Dir>.!System
If "<Boot$ToBeLoaded>" = "" Then Set Boot$ToBeLoaded <Boot$Dir>.Choices.Boot.PreDesk
| Raise error if old QuickFiler installed
| Force update to old QuickFiler
SetEval QF$bad 0
IfThere Boot:Choices.Boot.PreDesk.QFiler Then SetEval QF$bad 1
IfThere Boot:Choices.Boot.Tasks.!QFiler Then SetEval QF$bad 1
IfThere Boot:Choices.Boot.PreDesk.QFiler.LoadQF Then SetEval QF$bad 0
If QF$bad Then Error Please run !InstallQF to remove QuickFiler from Boot, or get and Install QuickFiler v2.19, before proceeding with ROM install.
If QF$bad Then Error You must get and install QuickFiler 2.19 before proceeding with ROM install.
Unset QF$bad
RMEnsure Installer 0.11 RMLoad System:Modules.Installer
| Put the disc loaded sprites in the right place
IfThere <BootResources$Dir>.!+Resource Then SetEval Res$Copy 0 Else SetEval Res$Copy 1
If Res$Copy Then Rename <Boot$ToBeLoaded>.!+Resource <BootResources$Dir>.!+Resource
If Res$Copy Then Copy <FlashICPFile$Dir>.!+Resource <Boot$ToBeLoaded>.!+Resource ~c~vf
If Res$Copy Then X Wipe <Boot$Dir>.RO500Hook.Boot.PreDesk.!+Resource ~c~vrf
If Res$Copy Then Copy <FlashICPFile$Dir>.!+Resource <Boot$Dir>.RO500Hook.Boot.PreDesk.!+Resource ~c~vf
| Create skeleton hook directory (important when OS version rolls over by 0.10)
CDir <Boot$Dir>.RO510Hook
CDir <Boot$Dir>.RO510Hook.Res
CDir <Boot$Dir>.RO510Hook.Apps
RMEnsure Installer 0.11 RMLoad System:Modules.Installer
IfThere <Boot$Dir>.RO510Hook.Boot Then Else Copy <Boot$Dir>.RO500Hook.Boot <Boot$Dir>.RO510Hook.Boot ~v~cfr
X Copy <Boot$Dir>.RO500Hook.ResetCMOS <Boot$Dir>.RO510Hook.ResetCMOS ~c~vf
Install_LogDir <Boot$Dir>
Install_Merge <Boot$Dir>.RO510Hook.Boot.Desktop <FlashICPFile$Dir>.Desktop+ <Boot$Dir>.RO510Hook.Boot.Desktop
Install_Merge <Boot$Dir>.Choices.Boot.Desktop <FlashICPFile$Dir>.Desktop+ <Boot$Dir>.Choices.Boot.Desktop
\ No newline at end of file
Install_Merge <Boot$Dir>.Choices.Boot.Desktop <FlashICPFile$Dir>.Desktop+ <Boot$Dir>.Choices.Boot.Desktop