Commit e05681e4 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Made use of "PoduleReadOnly" and "AddressRange" loader error messages, added to messages file.

Network and ExtROM internal loaders now return full message strings
rather than the "Bad" token!
Presence of absence of ExtROMs/EASI/NIC/IOC and MEMC podule support is
deduced at runtime,and the logical addresses requested from the Kernel
by OS_Memory.EASI,ExtROMs and NIC remain assembly time options though
just to reduce the size of the module a bit.
An assortment of internal variables have been altered to have 0 or -1 as
their unused value rather than &80000000 as this may be a candidate for
genuine loader addresses in future.
First pass at removing IOMD specific assumptions in the module.

Version 1.59. Tagged as 'Podule-1_59'
parent 8d43802c
Fake Podule Headers
-------------------
To keep production costs down the podule ROM is sometimes omitted from the final product,where an interface is built-in to the main motherboard (and hence always present).
In such cases the podule manager can be made to provide a fake podule header, and this is used for STB MPEG hardware and also for the EtherI interface on a Customer F Ethernet NC.
There are two ways to include the fake ROM header:
1. Set FakePodule0 in the machine header file
2. Set FakePodule in the components file (passed in via the MakeFile)
If FakePodule is passed in from the MakeFile it overrides FakePodule0 in the machine file.
The first approach is normally used, but the second approach is used for the Customer F 5 Ethernet NC where we use the same machine type as the Customer F 4 modem NC.
(The Customer F 5 Ethernet NC is very closely based on the Customer F 4 modem NC.
We don't want to introduce a new machine type as that would lead to other complications and make it more difficult to develop the Ethernet and Modem versions in tandem.)
PMSkirrow
......@@ -17,14 +17,15 @@ BadPod:Bad expansion card identifier
InLdr:Unknown error in loader
NoLdr:No loader to call
NoPod:No installed expansion card
NotAcrn:Expansion card is not Acorn conformant
NotAcrn:Expansion card is non-conformant
NotExt:Expansion card identity is not extended
BadRead:Unknown bit set in ReadInfo
BdSpeed:Unknown value for speed setting
SpeedNo:Requested speed setting not available for this expansion card
ECNoSpd:This expansion card does not support speed setting
NotEASI:This expansion card has no EASI space
BadAddr:Address out of range for Network expansion card loader
AddressRange:Address out of range for expansion card
PoduleReadOnly:Read only device
ECNoNet:This expansion card may not use the Ethernet address
NDallas:This computer is unable to provide a valid Ethernet address
NoPods:There are no Expansion cards or Extension ROMs|M|J
......
No preview for this file type
;
; This file is automatically maintained by srccommit, do not edit manually.
; Last processed by srccommit version: 1.68.
;
GBLS Module_MajorVersion
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
GBLS Module_ApplicationDate2
GBLS Module_ApplicationDate4
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.58"
Module_Version SETA 158
Module_MajorVersion SETS "1.59"
Module_Version SETA 159
Module_MinorVersion SETS ""
Module_Date SETS "06 Jun 2001"
Module_ApplicationDate2 SETS "06-Jun-01"
Module_ApplicationDate4 SETS "06-Jun-2001"
Module_Date SETS "26 Oct 2002"
Module_ApplicationDate SETS "26-Oct-02"
Module_ComponentName SETS "Podule"
Module_ComponentPath SETS "RiscOS/Sources/HWSupport/Podule"
Module_FullVersion SETS "1.58"
Module_HelpVersion SETS "1.58 (06 Jun 2001)"
Module_FullVersion SETS "1.59"
Module_HelpVersion SETS "1.59 (26 Oct 2002)"
END
/* (1.58)
/* (1.59)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
*
*/
#define Module_MajorVersion_CMHG 1.58
#define Module_MajorVersion_CMHG 1.59
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 Jun 2001
#define Module_Date_CMHG 26 Oct 2002
#define Module_MajorVersion "1.58"
#define Module_Version 158
#define Module_MajorVersion "1.59"
#define Module_Version 159
#define Module_MinorVersion ""
#define Module_Date "06 Jun 2001"
#define Module_Date "26 Oct 2002"
#define Module_ApplicationDate2 "06-Jun-01"
#define Module_ApplicationDate4 "06-Jun-2001"
#define Module_ApplicationDate "26-Oct-02"
#define Module_ComponentName "Podule"
#define Module_ComponentPath "RiscOS/Sources/HWSupport/Podule"
#define Module_FullVersion "1.58"
#define Module_HelpVersion "1.58 (06 Jun 2001)"
#define Module_FullVersion "1.59"
#define Module_HelpVersion "1.59 (26 Oct 2002)"
#define Module_LibraryVersionInfo "1:59"
......@@ -62,6 +62,7 @@
* NetPodSupport and ExtROMSupport.
* 02-Jun-97 KJB Converted from assembler header file
* Added constants for access speeds
* 08-Aug-02 RPS New access speed contants for Tungsten added
*/
......@@ -149,6 +150,10 @@
#define Podule_Speed_TypeB 2
#define Podule_Speed_TypeC 3
#define Podule_Speed_TypeD 4
#define Podule_Speed_TypeE 5
#define Podule_Speed_TypeF 6
#define Podule_Speed_TypeG 7
#define Podule_Speed_TypeH 8
/*
* Operating system identity bytes for load chunks
......
......@@ -64,6 +64,7 @@ OldOpt SETA {OPT}
; NetPodSupport and ExtROMSupport.
; 02-Jun-97 KJB Created C version of this file - ensure it stays in step
; Added constants for access speeds
; 08-Aug-02 RPS New access speed contants for Tungsten added
SWIClass SETS PoduleSWI_Name
^ PoduleSWI_Base
......@@ -164,6 +165,10 @@ Podule_Speed_TypeA * 1
Podule_Speed_TypeB * 2
Podule_Speed_TypeC * 3
Podule_Speed_TypeD * 4
Podule_Speed_TypeE * 5
Podule_Speed_TypeF * 6
Podule_Speed_TypeG * 7
Podule_Speed_TypeH * 8
; Operating system identity bytes for load chunks
^ 2_10000000 ; OS=0, RISCOS
......
......@@ -12,7 +12,9 @@
; See the License for the specific language governing permissions and
; limitations under the License.
;
SUBT => &.Arthur.Podule.Commands
TTL The Podule manager.
SUBT Star commands => Podule.s.Commands
CommandTable
......@@ -75,14 +77,14 @@ DoStarPodules Entry "r7-r8", 8 ; Stack frame for text c
next_podule_loop
TEQ r7, #1
ADRNE r4, Token_ExtROM ; or ExtROM as appropriate
[ {TRUE} ; get ReadInfo Description for extension ROMs just like podules
[ {TRUE} ; get ReadInfo Description for extension ROMs just like podules
ADREQ r4, Token_PodStd ; Set MsgTrans token for PodStd
|
ADRNE r5, null_string
BNE got_podule_message
ADR r4, Token_PodStd ; Set MsgTrans token for PodStd
]
[ NetworkPodule
[ NetworkPodule
TEQ r6, #NumberOfPodules
ADREQ r4, Token_PodNet
]
......@@ -243,7 +245,7 @@ DoStarPoduleLoad ROUT
MOV r0, r5 ; Offset
ADD r3, wp, r3
LDR r5, [ r3, #PoduleNode_LoaderOffset ] ; offset in workspace of loader
TEQ r5, #NIL ; TMD 16-Oct-91: test for NIL before adding wp
CMP r5, #-1 ; TMD 16-Oct-91: test for no loader before adding wp
ADREQ Error, ErrorBlock_NoLdr
BLEQ copy_error_zero ; Sets the V bit
BVS CloseExit
......@@ -366,7 +368,7 @@ DoStarPoduleSave
MOV r0, r5 ; The size
ADD r3, wp, r3 ; Convert to address of podule node
LDR r5, [ r3, #PoduleNode_LoaderOffset ] ; offset in workspace of loader
TEQ r5, #NIL ; TMD 16-Oct-91: test for NIL BEFORE adding on wp
CMP r5, #-1 ; TMD 16-Oct-91: test for no loader before adding wp
ADREQ Error, ErrorBlock_NoLdr
BLEQ copy_error_zero ; Always sets the V bit
BVS CloseExit
......
......@@ -12,7 +12,9 @@
; See the License for the specific language governing permissions and
; limitations under the License.
;
SUBT => &.Arthur.Podule.Errors
TTL The Podule manager.
SUBT Error messages => Podule.s.Errors
OPT OptPage
MakeInternatErrorBlock BadPod
......@@ -31,6 +33,8 @@
MakeInternatErrorBlock ECNoNet
MakeInternatErrorBlock NDallas
MakeInternatErrorBlock Ldr26
MakeInternatErrorBlock PoduleReadOnly
MakeInternatErrorBlock AddressRange
MakeErrorBlock ModuleBadSWI
......
......@@ -12,14 +12,15 @@
; See the License for the specific language governing permissions and
; limitations under the License.
;
; => GetAll
TTL The Podule manager for Arthur.
TTL The Podule manager.
SUBT Get all sources => Podule.s.GetAll
GET Hdr:ListOpts
GET Hdr:Macros
GET Hdr:System
GET Hdr:Machine.<Machine>
$GetIO
$GetIO
GET Hdr:CMOS
GET Hdr:ModHand
GET Hdr:Debug
......@@ -51,15 +52,14 @@ GetHelpTexts SETS "GET HelpTexts"
GetHelpTexts SETS "GET HelpTokens.s"
]
AREA Podule_code, CODE, READONLY
AREA Podule_code, CODE, READONLY
GET Module.s
GET Interface.s
GET Commands.s
GET Errors.s
GET ROMExtend.s
GET s.Module
GET s.Interface
GET s.Commands
GET s.Errors
GET s.ROMExtend
$GetHelpTexts
GET MsgCode.s
GET s.MsgCode
END
This diff is collapsed.
This diff is collapsed.
......@@ -13,8 +13,8 @@
; limitations under the License.
;
; OSS Message file handling code.
TTL The Podule manager.
SUBT Message handling code => Podule.s.MsgCode
; OSS Size of temporary block for when we do a lookup with subsitution.
......@@ -200,20 +200,147 @@ close_message_file
STRVS r0, [ sp, #0 ]
Pull "r0, pc"
LookupLoader26bitError
SoftloadErrorMssg
; in: r0=pointer to message token
; r2=pointer to target block
; wp=pointer to workspace
; out: all registers preserved (except r0 if the message file is duff)
Entry "r0-r7"
BL open_message_file ; Ensure file is open
STRVS r0, [ sp, #0 ]
EXIT VS ; Return the error
ADRL r0, ErrorBlock_Ldr26
ADR r1, message_file_block
ADR r2, Loader26bitError
MOV r3, #?Loader26bitError
MOV r3, #InfoBufLength
[ DebugInit
DREG r0,"Error block at &"
DREG r1,"MessageTrans block at &"
DREG r2,"Target buffer &"
]
MOV r4, #0
MOV r5, #0
MOV r6, #0
MOV r7, #0
SWI XMessageTrans_ErrorLookup
[ DebugInit
DREG r0,"R0 now points to &" ; Quick look for a token not found error
]
CLRV
EXIT
EasyLookup ROUT
; In: R1 Pointer to token
; In: R4 Single parameter to substitute
; Out: R2 Pointer to looked up message in an error buffer
; Out: R3 Length including terminator
Push "r0, r1, r3, r5, r6, r7, lr"
BL open_message_file
[ DebugMssgs
BVC %71
ADD r14, r0, #4
DSTRING r14, "Error from open_message_file: "
71
]
ADRVC r0, message_file_block ; Message file handle
MOV r2, #0 ; No buffer, expand in place
MOV r3, #0
MOV r5, #0 ; No %1
MOV r6, #0 ; No %2
MOV r7, #0 ; No %3
[ DebugMssgs :LOR: DebugCommands
BVS ExitEasyLookup
DREG r0, "R0 = &", cc
Push r14
LDR r14, [ r0, #0 ]
DREG r14, ", &", cc
LDR r14, [ r0, #4 ]
DREG r14, ", &", cc
LDR r14, [ r0, #8 ]
DREG r14, ", &", cc
LDR r14, [ r0, #12 ]
DREG r14, ", &"
Pull r14
DREG r1, "R1 = &", cc
DSTRING r1, " token is: "
DREG r2, "R2 = &"
DREG r3, "R3 = &"
DREG r4, "R4 = &", cc
DSTRING r4, " %0 is: "
DREG r5, "R5 = &", cc
DSTRING r5, " %1 is: "
DREG r6, "R6 = &", cc
DSTRING r6, " %2 is: "
DREG r7, "R7 = &", cc
DSTRING r7, " %3 is: "
DREG r8, "R8 = &"
DREG r9, "R9 = &"
DREG r10, "R10 = &"
DREG r11, "R11 = &"
DREG r12, "R12 = &"
DREG r13, "R13 = &"
DREG r14, "R14 = &"
DREG r15, "R15 = &"
]
SWIVC XMessageTrans_Lookup
[ DebugMssgs
BVC %76
ADD r14, r0, #4
DSTRING r14, "Error from XMessageTrans_Lookup: "
76
]
BVS ExitEasyLookup
ADD r3, r3, #1 ; Allow for the terminator
STR r3, [ sp, #8 ] ; Poke into the return frame
LDR r0, [ sp, #4 ] ; Get the token pointer
DEC r0, 4 ; Pretend it is an error pointer
ADR r1, message_file_block ; Message file handle
MOV r2, #0 ; No buffer, expand into a buffer
MOV r3, #0
[ False ; DebugMssgs
DREG r0, "R0 = &"
DREG r1, "R1 = &"
DREG r2, "R2 = &"
DREG r3, "R3 = &"
DREG r4, "R4 = &"
DREG r5, "R5 = &"
DREG r6, "R6 = &"
DREG r7, "R7 = &"
DREG wp, "WP = &"
DREG sp, "SP = &"
]
SWI XMessageTrans_ErrorLookup
[ DebugModule
ADD r14, r0, #4
DSTRING r14, "Error from XMessageTrans_ErrorLookup: "
]
CLRV
ADD r2, r0, #4 ; Skip over the error number
ExitEasyLookup
[ DebugMssgs :LOR: DebugCommands
Push "r0, r1"
ADR r0, message_file_block ; Message file handle
DREG r0, "R0 = &", cc
LDR r1, [ r0, #0 ]
DREG r1, ", &", cc
LDR r1, [ r0, #4 ]
DREG r1, ", &", cc
LDR r1, [ r0, #8 ]
DREG r1, ", &", cc
LDR r1, [ r0, #12 ]
DREG r1, ", &"
Pull "r0, r1"
]
STRVS r0, [ sp, #0 ]
Pull "r0, r1, r3, r5, r6, r7, pc"
ROUT
LTORG
[ :LNOT: ReleaseVersion
InsertDebugRoutines
]
END
......@@ -12,9 +12,16 @@
; See the License for the specific language governing permissions and
; limitations under the License.
;
; > ROMExtend
TTL The Podule manager.
SUBT Extension ROM support => Podule.s.ROMExtend
[ ExtensionROMs
; You must ask where the ROMs are,but this didn't seem worth updating
! 0, "StartOfROM and EndOfROM need defining at run time"
! 0, "Extension ROM support is very out of step"
; OSS *** NOTE. Throughout the entire of the code in this file, r12 points
; at the private word instead of pointing at the workspace held in the
; private word. Thus calling copy_error_one() could be awkward. Fortunately
......@@ -836,10 +843,10 @@ AddROMNode Entry "R0-R4, R9-R11"
STR r0, [ r11, #PoduleNode_IDByte ] ; Does IntValue, FIQasIntValue and FIQValue
LDR r0, [ sp ] ; Restore stacked ROM start address
STR r0, [ r11, #PoduleNode_ROMAddress ]
STR r0, [ r11, #PoduleNode_BaseAddress ] ; store in base address as well
STR r0, [ r11, #PoduleNode_BaseAddress ] ; store in base address as well
STR r0, [ r11, #PoduleNode_CombinedAddress ] ; and combined address
STR r1, [ r11, #PoduleNode_Checksum ]
MOV r0, #NIL ; No loader at the moment
MOV r0, #-1 ; No loader at the moment
STR r0, [ r11, #PoduleNode_LoaderOffset ]
MOV r0, #maxint
STR r0, [ r11, #PoduleNode_PoduleLimit ]
......
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