Subject: port-mac/2110: ROM vectors for Performa 550 and others
To: None <gnats-bugs@NetBSD.ORG>
From: Walter Ruetten <walter@ghpc8.ihf.rwth-aachen.de>
List: netbsd-bugs
Date: 02/22/1996 21:23:13
>Number: 2110
>Category: port-mac
>Synopsis: New ROM vectors for the Mac Performa 550
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Feb 22 15:50:02 1996
>Last-Modified:
>Originator: Walter Ruetten
>Organization:
>Release: 1.1
>Environment:
Mac Performa P550, NetBSD/mac68k
System: NetBSD islington.ihf.rwth-aachen.de 1.1A NetBSD 1.1A (ISLINGTON) #278: Tue Feb 20 19:39:14 MET 1996 walter@islington.ihf.rwth-aachen.de:/usr/src/sys/arch/mac68k.vi/compile/ISLINGTON mac68k
>Description:
- Performa 550 needs ToolBox traps 'FixMul' and 'FixDiv' during
ADB initialization.
>How-To-Repeat:
>Fix:
- Added required traps. FixMul and FixDiv get jump adresses to the ROMs.
File: macrom.h:
- struct romvec_s {} gets new entries for 'FixDiv' and 'FixMul'.
- Variable ExpandMem needed for ADB setup on P550.
- new variables for vertical blanking queue (needed for PowerBooks).
- Prototypes for Resource management and Trap management.
File machdep.c:
- Add entries for FixDiv and FixMul traps. These are verified only
for the P550, for the other machines these are wild guesses.
It might be better to insert 0 as jump address on those other
machines and wait until somone hits this trap :-)
- Fix some obviously wrong addresses for PB540.
- Add new ROM vectors for P550 (#11).
- Q950 uses romvecs[2] (IIvi type ROMs).
- PB150 uses romvecs[10] (like PB270c).
- P550 uses romvecs[11].
Diffs follow:
diff -c mac68k/mac68k/macrom.h mac68k.vi/mac68k/macrom.h
*** mac68k/mac68k/macrom.h Sat Oct 14 03:09:11 1995
--- mac68k.vi/mac68k/macrom.h Tue Feb 20 19:05:58 1996
***************
*** 71,76 ****
--- 71,82 ----
extern u_int32_t ADBReInit_JTBL; /* pointer to patch table */
extern void (*jClkNoMem)(); /* pointer to ClkNoMem */
extern u_char SysParam[20]; /* Place where PRam data gets stored */
+ extern caddr_t ExpandMem; /* pointer to Expanded Memory used by */
+ /* newer ADB routines (since LCIII) */
+ extern u_int16_t VBLQueue; /* Vertical blanking Queue, unused ? */
+ extern caddr_t VBLQueue_head; /* Vertical blanking Queue, head */
+ extern caddr_t VBLQueue_tail; /* Vertical blanking Queue, tail */
+
/* Types */
typedef caddr_t Ptr;
***************
*** 136,141 ****
--- 142,155 ----
short theID);
short ResError(
void);
+ void mrg_CountResources(
+ void);
+ void mrg_GetIndResource(
+ void);
+
+ /* Trap management */
+ int mrg_SetOSTrapAddress(
+ void);
/* Mac ROM Glue globals for BSD kernel */
***************
*** 181,186 ****
--- 195,202 ----
caddr_t jClkNoMem;
caddr_t ADBAlternateInit; /* more fundamental than ABDReInit */
caddr_t InitEgret; /* Set up Buffer for Egret routines */
+ caddr_t FixDiv;
+ caddr_t FixMul;
} romvec_t;
void mrg_setvectors(romvec_t *rom_vectors);
int mrg_romready(void);
diff -c mac68k/mac68k/machdep.c mac68k.vi/mac68k/machdep.c
*** mac68k/mac68k/machdep.c Sun Feb 11 13:23:52 1996
--- mac68k.vi/mac68k/machdep.c Tue Feb 20 20:50:45 1996
***************
*** 1499,1504 ****
--- 1499,1506 ----
(caddr_t) 0x4080ddd6, /* jClkNoMem */
0, /* ADBAlternateInit */
0, /* InitEgret */
+ 0, /* FixDiv */
+ 0, /* FixMul */
},
/*
* Vectors verified for PB 140, PB 170
***************
*** 1524,1529 ****
--- 1526,1533 ----
(caddr_t) 0x4080b1e4, /* jClkNoMem */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
(caddr_t) 0x408147c4, /* InitEgret */
+ (caddr_t) 0x4081c406, /* FixDiv, wild guess */
+ (caddr_t) 0x4081c312, /* FixMul, wild guess */
},
/*
* Vectors verified for IIsi, IIvx, IIvi
***************
*** 1548,1553 ****
--- 1552,1559 ----
(caddr_t) 0x4080b1e4, /* jClkNoMem */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
(caddr_t) 0x408147c4, /* InitEgret */
+ (caddr_t) 0x4081c406, /* FixDiv, wild guess */
+ (caddr_t) 0x4081c312, /* FixMul, wild guess */
},
/*
* Vectors verified for Mac Classic II and LC II
***************
*** 1573,1578 ****
--- 1579,1586 ----
(caddr_t) 0x40ab39b6, /* jClkNoMem */
(caddr_t) 0x40a0a818, /* ADBAlternateInit */
(caddr_t) 0x40a147c4, /* InitEgret */
+ (caddr_t) 0x40a1c406, /* FixDiv, wild guess */
+ (caddr_t) 0x40a1c312, /* FixMul, wild guess */
},
/*
* Vectors verified for IIci, Q700
***************
*** 1597,1602 ****
--- 1605,1612 ----
(caddr_t) 0x4080b1e4, /* jClkNoMem */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
(caddr_t) 0x408147c4, /* InitEgret */
+ (caddr_t) 0x4081c406, /* FixDiv, wild guess */
+ (caddr_t) 0x4081c312, /* FixMul, wild guess */
},
/*
* Vectors verified for Duo 230, PB 180, PB 165
***************
*** 1619,1627 ****
(caddr_t) 0x4080c5cc, /* InitUtil */
(caddr_t) 0x4080b186, /* ReadXPRam */
(caddr_t) 0x4080b190, /* WriteXPRam */
! (caddr_t) 0x0, /* jClkNoMem */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
! (caddr_t) 0x408147c4, /* InitEgret */
},
/*
* Quadra, Centris merged table (C650, 610, Q800?)
--- 1629,1639 ----
(caddr_t) 0x4080c5cc, /* InitUtil */
(caddr_t) 0x4080b186, /* ReadXPRam */
(caddr_t) 0x4080b190, /* WriteXPRam */
! (caddr_t) 0x408b39b2, /* jClkNoMem */ /* From PB180 */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
! (caddr_t) 0x40888400, /* InitPwrMgr */ /* From PB180 */
! (caddr_t) 0x4081c406, /* FixDiv, wild guess */
! (caddr_t) 0x4081c312, /* FixMul, wild guess */
},
/*
* Quadra, Centris merged table (C650, 610, Q800?)
***************
*** 1646,1651 ****
--- 1658,1665 ----
(caddr_t) 0x408b39b6, /* jClkNoMem */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
(caddr_t) 0x408147c4, /* InitEgret */
+ (caddr_t) 0x4081c406, /* FixDiv, wild guess */
+ (caddr_t) 0x4081c312, /* FixMul, wild guess */
},
/*
* Quadra 840AV (but ADBBase + 130 intr is unknown)
***************
*** 1671,1676 ****
--- 1685,1692 ----
(caddr_t) 0x0, /* jClkNoMem */
0, /* ADBAlternateInit */
0, /* InitEgret */
+ (caddr_t) 0x4081c406, /* FixDiv, wild guess */
+ (caddr_t) 0x4081c312, /* FixMul, wild guess */
},
/*
* PB 540 (but ADBBase + 130 intr and PMgrOp is unknown)
***************
*** 1688,1701 ****
(caddr_t) 0x4000a752, /* ADBReInit */
(caddr_t) 0x4000a3dc, /* ADBOp */
/* !?! */ 0, /* PmgrOp */
! (caddr_t) 0x4080c05c, /* WriteParam */
! (caddr_t) 0x4080c086, /* SetDateTime */
! (caddr_t) 0x4080c5cc, /* InitUtil */
! (caddr_t) 0x4080b186, /* ReadXPRam */
! (caddr_t) 0x4080b190, /* WriteXPRam */
(caddr_t) 0x0, /* jClkNoMem */
! (caddr_t) 0x4080a818, /* ADBAlternateInit */
! (caddr_t) 0x408147c4, /* InitEgret */
},
/*
* Q 605 (but guessing at ADBBase + 130, based on Q 650)
--- 1704,1719 ----
(caddr_t) 0x4000a752, /* ADBReInit */
(caddr_t) 0x4000a3dc, /* ADBOp */
/* !?! */ 0, /* PmgrOp */
! (caddr_t) 0x4000c05c, /* WriteParam */
! (caddr_t) 0x4000c086, /* SetDateTime */
! (caddr_t) 0x4000c5cc, /* InitUtil */
! (caddr_t) 0x4000b186, /* ReadXPRam */
! (caddr_t) 0x4000b190, /* WriteXPRam */
(caddr_t) 0x0, /* jClkNoMem */
! (caddr_t) 0x4000a818, /* ADBAlternateInit */
! (caddr_t) 0x400147c4, /* InitEgret */
! (caddr_t) 0x4001c406, /* FixDiv, wild guess */
! (caddr_t) 0x4001c312, /* FixMul, wild guess */
},
/*
* Q 605 (but guessing at ADBBase + 130, based on Q 650)
***************
*** 1720,1728 ****
(caddr_t) 0x0, /* jClkNoMem */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
(caddr_t) 0x408147c4, /* InitEgret */
},
/*
! * Vectors verified for Duo 270c
*/
{ /* 10 */
"Duo 270C ROMs",
--- 1738,1748 ----
(caddr_t) 0x0, /* jClkNoMem */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
(caddr_t) 0x408147c4, /* InitEgret */
+ (caddr_t) 0x4081c406, /* FixDiv, wild guess */
+ (caddr_t) 0x4081c312, /* FixMul, wild guess */
},
/*
! * Vectors verified for Duo 270c, PB150
*/
{ /* 10 */
"Duo 270C ROMs",
***************
*** 1741,1749 ****
(caddr_t) 0x4080c5cc, /* InitUtil */
(caddr_t) 0x4080b186, /* ReadXPRam */
(caddr_t) 0x4080b190, /* WriteXPRam */
! (caddr_t) 0x0, /* jClkNoMem */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
(caddr_t) 0x408147c4, /* InitEgret */
},
/* Please fill these in! -BG */
};
--- 1761,1797 ----
(caddr_t) 0x4080c5cc, /* InitUtil */
(caddr_t) 0x4080b186, /* ReadXPRam */
(caddr_t) 0x4080b190, /* WriteXPRam */
! (caddr_t) 0x408b3bf8, /* jClkNoMem */ /* from PB 150 */
! (caddr_t) 0x4080a818, /* ADBAlternateInit */
! (caddr_t) 0x408147c4, /* InitEgret */
! (caddr_t) 0x4081c406, /* FixDiv, wild guess */
! (caddr_t) 0x4081c312, /* FixMul, wild guess */
! },
! /*
! * Vectors verified for Performa/LC 550
! */
! { /* 11 */
! "P/LC 550 ROMs",
! (caddr_t) 0x408d16d6, /* ADB interrupt */
! (caddr_t) 0x0, /* PB ADB interrupt */
! (caddr_t) 0x408b2f84, /* ADBBase + 130 interrupt; whatzit? */
! (caddr_t) 0x4080a360, /* CountADBs */
! (caddr_t) 0x4080a37a, /* GetIndADB */ /* not verified */
! (caddr_t) 0x4080a3a6, /* GetADBInfo */
! (caddr_t) 0x4080a3ac, /* SetADBInfo */
! (caddr_t) 0x4080a752, /* ADBReInit */
! (caddr_t) 0x4080a3dc, /* ADBOp */
! (caddr_t) 0x0, /* PMgrOp */
! (caddr_t) 0x4080c05c, /* WriteParam */
! (caddr_t) 0x4080c086, /* SetDateTime */ /* not verified */
! (caddr_t) 0x4080c5cc, /* InitUtil */
! (caddr_t) 0x4080b186, /* ReadXPRam */
! (caddr_t) 0x4080b190, /* WriteXPRam */
! (caddr_t) 0x408b3c04, /* jClkNoMem */
(caddr_t) 0x4080a818, /* ADBAlternateInit */
(caddr_t) 0x408147c4, /* InitEgret */
+ (caddr_t) 0x4081c406, /* FixDiv for P550 */
+ (caddr_t) 0x4081c312, /* FixMul for P550 */
},
/* Please fill these in! -BG */
};
***************
*** 1767,1773 ****
/* The Centris/Quadra series. */
{MACH_MACQ700, "Quadra", " 700 ", MACH_CLASSQ, &romvecs[4]},
{MACH_MACQ900, "Quadra", " 900 ", MACH_CLASSQ, &romvecs[6]},
! {MACH_MACQ950, "Quadra", " 950 ", MACH_CLASSQ, &romvecs[6]},
{MACH_MACQ800, "Quadra", " 800 ", MACH_CLASSQ, &romvecs[6]},
{MACH_MACQ650, "Quadra", " 650 ", MACH_CLASSQ, &romvecs[6]},
{MACH_MACC650, "Centris", " 650 ", MACH_CLASSQ, &romvecs[6]},
--- 1815,1821 ----
/* The Centris/Quadra series. */
{MACH_MACQ700, "Quadra", " 700 ", MACH_CLASSQ, &romvecs[4]},
{MACH_MACQ900, "Quadra", " 900 ", MACH_CLASSQ, &romvecs[6]},
! {MACH_MACQ950, "Quadra", " 950 ", MACH_CLASSQ, &romvecs[2]},
{MACH_MACQ800, "Quadra", " 800 ", MACH_CLASSQ, &romvecs[6]},
{MACH_MACQ650, "Quadra", " 650 ", MACH_CLASSQ, &romvecs[6]},
{MACH_MACC650, "Centris", " 650 ", MACH_CLASSQ, &romvecs[6]},
***************
*** 1783,1788 ****
--- 1831,1837 ----
/* PB 100 has no MMU! */
{MACH_MACPB140, "PowerBook", " 140 ", MACH_CLASSPB, &romvecs[1]},
{MACH_MACPB145, "PowerBook", " 145 ", MACH_CLASSPB, &romvecs[1]},
+ {MACH_MACPB150, "PowerBook", " 150 ", MACH_CLASSPB, &romvecs[10]},
{MACH_MACPB160, "PowerBook", " 160 ", MACH_CLASSPB, &romvecs[5]},
{MACH_MACPB165, "PowerBook", " 165 ", MACH_CLASSPB, &romvecs[5]},
{MACH_MACPB165C, "PowerBook", " 165c ", MACH_CLASSPB, &romvecs[5]},
***************
*** 1799,1805 ****
/* The Performas... */
{MACH_MACP600, "Performa", " 600 ", MACH_CLASSIIvx, &romvecs[2]},
{MACH_MACP460, "Performa", " 460 ", MACH_CLASSLC, &romvecs[3]},
! {MACH_MACP550, "Performa", " 550 ", MACH_CLASSLC, &romvecs[3]},
/* The LCs... */
{MACH_MACLCII, "LC", " II ", MACH_CLASSLC, &romvecs[3]},
--- 1848,1854 ----
/* The Performas... */
{MACH_MACP600, "Performa", " 600 ", MACH_CLASSIIvx, &romvecs[2]},
{MACH_MACP460, "Performa", " 460 ", MACH_CLASSLC, &romvecs[3]},
! {MACH_MACP550, "Performa", " 550 ", MACH_CLASSLC, &romvecs[11]},
/* The LCs... */
{MACH_MACLCII, "LC", " II ", MACH_CLASSLC, &romvecs[3]},
>Audit-Trail:
>Unformatted: