Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Made changes in where/how the kernel is linked, and...



details:   https://anonhg.NetBSD.org/src/rev/e53b65d81cee
branches:  trunk
changeset: 534888:e53b65d81cee
user:      fredette <fredette%NetBSD.org@localhost>
date:      Mon Aug 05 20:58:35 2002 +0000

description:
Made changes in where/how the kernel is linked, and how the pmap
maps it with BTLB entries, to minimize the number of BTLB entries
needed.

Because the CPU type was often guessed incorrectly, the mapping of
HP board number to system name now includes information about the
expected CPU type.

diffstat:

 sys/arch/hp700/conf/Makefile.hp700 |    4 +-
 sys/arch/hp700/conf/ld.script      |    6 +-
 sys/arch/hp700/dev/cpu.c           |   54 +--
 sys/arch/hp700/dev/cpudevs         |  446 ++++++++++++++++++-----------------
 sys/arch/hp700/dev/cpudevs.h       |  162 +------------
 sys/arch/hp700/dev/cpudevs_data.h  |  367 +++++++++++++++++------------
 sys/arch/hp700/dev/devlist2h.awk   |   32 +-
 sys/arch/hp700/hp700/locore.S      |    6 +-
 sys/arch/hp700/hp700/machdep.c     |  456 ++++++++++++++++++++++++------------
 sys/arch/hp700/include/cpu.h       |   40 ++-
 sys/arch/hppa/hppa/machdep.h       |    9 +-
 sys/arch/hppa/hppa/pmap.c          |  422 ++++++++++++++++++++-------------
 sys/arch/hppa/include/vmparam.h    |   13 +-
 13 files changed, 1097 insertions(+), 920 deletions(-)

diffs (truncated from 2584 to 300 lines):

diff -r 62798d5e8ff5 -r e53b65d81cee sys/arch/hp700/conf/Makefile.hp700
--- a/sys/arch/hp700/conf/Makefile.hp700        Mon Aug 05 20:38:35 2002 +0000
+++ b/sys/arch/hp700/conf/Makefile.hp700        Mon Aug 05 20:58:35 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.hp700,v 1.1 2002/06/06 19:48:02 fredette Exp $
+# $NetBSD: Makefile.hp700,v 1.2 2002/08/05 20:58:35 fredette Exp $
 
 # Makefile for NetBSD
 #
@@ -85,7 +85,7 @@
 ## (5) link settings
 ##
 LINKFORMAT=    -T ${HP700}/conf/ld.script
-TEXTADDR?=     00080000
+TEXTADDR?=     00200000
 EXTRA_LINKFLAGS= -Map $@.map
 
 ##
diff -r 62798d5e8ff5 -r e53b65d81cee sys/arch/hp700/conf/ld.script
--- a/sys/arch/hp700/conf/ld.script     Mon Aug 05 20:38:35 2002 +0000
+++ b/sys/arch/hp700/conf/ld.script     Mon Aug 05 20:58:35 2002 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: ld.script,v 1.1 2002/06/06 19:48:02 fredette Exp $     */
+/*     $NetBSD: ld.script,v 1.2 2002/08/05 20:58:36 fredette Exp $     */
 
 /*     $OpenBSD: ld.script,v 1.7 1999/12/17 07:02:38 mickey Exp $      */
 
 OUTPUT_FORMAT("elf32-hppa")
 OUTPUT_ARCH(hppa)
-ENTRY($start)
+ENTRY(start)
 SECTIONS
 {
        /* Read-only sections, merged into text segment: */
@@ -24,8 +24,8 @@
                __unwind_end = .;
                . = ALIGN(4096);
        } = 0 /* 0x08000240 nop filled, does not work */
-       . = ALIGN(524288);
        etext = ABSOLUTE(.);
+       . = ALIGN(0x200000);
 
        .data  :
        {
diff -r 62798d5e8ff5 -r e53b65d81cee sys/arch/hp700/dev/cpu.c
--- a/sys/arch/hp700/dev/cpu.c  Mon Aug 05 20:38:35 2002 +0000
+++ b/sys/arch/hp700/dev/cpu.c  Mon Aug 05 20:58:35 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.1 2002/06/06 19:48:03 fredette Exp $ */
+/*     $NetBSD: cpu.c,v 1.2 2002/08/05 20:58:36 fredette Exp $ */
 
 /*     $OpenBSD: cpu.c,v 1.8 2000/08/15 20:38:24 mickey Exp $  */
 
@@ -87,47 +87,31 @@
        /* machdep.c */
        extern struct pdc_cache pdc_cache;
        extern struct pdc_btlb pdc_btlb;
+       extern struct pdc_model pdc_model;
        extern u_int cpu_ticksnum, cpu_ticksdenom;
 
-       struct pdc_model pdc_model PDC_ALIGNMENT;
-       struct pdc_cpuid pdc_cpuid PDC_ALIGNMENT;
-       u_int pdc_cversion[32] PDC_ALIGNMENT;
        register struct cpu_softc *sc = (struct cpu_softc *)self;
        register struct confargs *ca = aux;
-       const char *p = NULL;
+       char c;
+       const char lvls[4][4] = { "0", "1", "1.5", "2" };
        u_int mhz = 100 * cpu_ticksnum / cpu_ticksdenom;
-       int err;
 
-       bzero (&pdc_cpuid, sizeof(pdc_cpuid));
-       if (pdc_call((iodcio_t)pdc, 0, PDC_MODEL, PDC_MODEL_CPUID,
-                    &pdc_cpuid, sc->sc_dev.dv_unit, 0, 0, 0) >= 0) {
+       /* Print the CPU chip name, nickname, and rev. */
+       printf(": %s", hppa_cpu_info->hppa_cpu_info_chip_name);
+       if (hppa_cpu_info->hppa_cpu_info_chip_nickname != NULL)
+               printf(" (%s)", hppa_cpu_info->hppa_cpu_info_chip_nickname);
+       printf(" rev %d", (*hppa_cpu_info->desidhash)());
 
-               /* patch for old 8200 */
-               if (pdc_cpuid.version == HPPA_CPU_PCXUP &&
-                   pdc_cpuid.revision > 0x0d)
-                       pdc_cpuid.version = HPPA_CPU_PCXUP1;
-                       
-               p = hppa_mod_info(HPPA_TYPE_CPU, pdc_cpuid.version);
-       }
-       /* otherwise try to guess on component version numbers */
-       else if (pdc_call((iodcio_t)pdc, 0, PDC_MODEL, PDC_MODEL_COMP,
-                    &pdc_cversion, sc->sc_dev.dv_unit) >= 0) {
-               /* XXX p = hppa_mod_info(HPPA_TYPE_CPU,pdc_cversion[0]); */
-       }
-
-       printf (": %s rev %d, ", p? p : cpu_typename, (*cpu_desidhash)());
-
-       if ((err = pdc_call((iodcio_t)pdc, 0, PDC_MODEL, PDC_MODEL_INFO,
-                           &pdc_model)) < 0) {
-#ifdef DEBUG
-               printf("WARNING: PDC_MODEL failed (%d)\n", err);
-#endif
-       } else {
-               static const char lvls[4][4] = { "0", "1", "1.5", "2" };
-
-               printf("lev %s, cat %c, ",
-                      lvls[pdc_model.pa_lvl], "AB"[pdc_model.mc]);
-       }
+       /* Print the CPU type, spec, level, category, and speed. */
+       printf("\n%s: %s, PA-RISC %d.%d",
+               self->dv_xname,
+               hppa_cpu_info->hppa_cpu_info_chip_type,
+               HPPA_PA_SPEC_MAJOR(hppa_cpu_info->hppa_cpu_info_pa_spec),
+               HPPA_PA_SPEC_MINOR(hppa_cpu_info->hppa_cpu_info_pa_spec));
+       c = HPPA_PA_SPEC_LETTER(hppa_cpu_info->hppa_cpu_info_pa_spec);
+       if (c != '\0') printf("%c", c);
+       printf(", lev %s, cat %c, ",
+               lvls[pdc_model.pa_lvl], "AB"[pdc_model.mc]);
 
        printf ("%d", mhz / 100);
        if (mhz % 100 > 9)
diff -r 62798d5e8ff5 -r e53b65d81cee sys/arch/hp700/dev/cpudevs
--- a/sys/arch/hp700/dev/cpudevs        Mon Aug 05 20:38:35 2002 +0000
+++ b/sys/arch/hp700/dev/cpudevs        Mon Aug 05 20:58:35 2002 +0000
@@ -1,4 +1,4 @@
-$NetBSD: cpudevs,v 1.1 2002/06/06 19:48:03 fredette Exp $
+$NetBSD: cpudevs,v 1.2 2002/08/05 20:58:36 fredette Exp $
 
 $OpenBSD: cpudevs,v 1.18 2001/03/20 08:15:22 mickey Exp $
 
@@ -56,233 +56,251 @@
 type   fpu     0x82    FPU chips
 type   bus     0x83    Main Busses
 
-
-board  HP840           0x004   840/930 (Indigo)
-board  HP825           0x008   825/925 (FireFox)
-board  HP835           0x00a   83[45]/[69]35 (TopGun)
-board  HP845           0x00b   845/645 (Technical ShoGun)
-board  HP850           0x00C   850/950 (Cheetah)
-board  HP949           0x00f   949 (Commercial ShoGun)
-
-board  HP950S          0x080   950S (Cheetah)
-board  HP855           0x081   855/955 (Jaguar)
-board  HP860           0x082   860/960 (Cougar)
-board  HP870           0x083   865/870/980 (Panther)
+/* 
+ * NB: the device name for a board begins with an encoding of the
+ * type of CPU it contains.  This is decoded by hppa_init() to
+ * figure out what kind of CPU it is likely dealing with.
+ * 
+ * Key:
+ *   X  = PA7000 (PCX)
+ *   S  = PA7000 (PCX-S)
+ *   0T = PA7100 (PCX-T)
+ *   5T = PA7150 (PCX-T)
+ *   L  = PA7100LC (PCX-L)
+ *   T' = PA7200 (PCX-T')
+ *   L2 = PA7300LC (PCX-L2)
+ *   U  = PA8000 (PCX-U)
+ *   U+ = PA8200 (PCX-U+)
+ *   W  = PA8500 (PCX-W)
+ *   W+ = PA8600 (PCX-W+)
+ */
+board  x               0x004   X 840/930 (Indigo)
+board  x               0x008   X 825/925 (FireFox)
+board  x               0x00a   X 83[45]/[69]35 (TopGun)
+board  x               0x00b   X 845/645 (Technical ShoGun)
+board  x               0x00c   X 850/950 (Cheetah)
+board  x               0x00f   X 949 (Commercial ShoGun)
 
-board  HP810           0x100   810 (Burgundy)
-board  HP822           0x101   822/922 (SilverFox Low)
-board  HP832           0x102   832/932 (SilverFox High)
-board  HP808           0x103   808/815/920 (Lego, SilverLite)
-board  HP842           0x104   842/948 (SilverBullet Low)
-board  HP852           0x105   852/958 (SilverBullet High)
-board  HPOBOE          0x106   (Oboe)
+board  x               0x080   X 950S (Cheetah)
+board  x               0x081   X 855/955 (Jaguar)
+board  x               0x082   X 860/960 (Cougar)
+board  x               0x083   X 865/870/980 (Panther)
 
-board  HPDRAGON        0x180   (Dragon)
-board  HP890           0x181   890/990/992 (Chimera)
-board  HP891           0x182   891/T500 (TNT 100)
-board  HP892           0x183   892/T520 (TNT 120)
-board  HP893_T540      0x184   893/T540 (Jade 180 U)
-
-board  HPHXPROC        0x1ff   Hitachi X Processor
+board  x               0x100   X 810 (Burgundy)
+board  x               0x101   X 822/922 (SilverFox Low)
+board  x               0x102   X 832/932 (SilverFox High)
+board  x               0x103   X 808/815/920 (Lego, SilverLite)
+board  x               0x104   X 842/948 (SilverBullet Low)
+board  x               0x105   X 852/958 (SilverBullet High)
+board  x               0x106   X (Oboe)
 
-board  HP720           0x200   720 (Cobra)
-board  HP750_66        0x201   750/66 (Coral)
-board  HP730_66        0x202   730/66 (King Cobra)
-board  HP735_99        0x203   735/99 (Hardball)
-board  HP755_99        0x204   755/99 (Coral II)
-board  HP755_125       0x205   755/125 (Coral II)
-#board HP755_125E      0x205   755/125 (Snake Eagle, opt 91)
-board  HP735_130       0x206   735/130 (Snake Cheetah)
+board  x               0x180   X (Dragon)
+board  x               0x181   X 890/990/992 (Chimera)
+board  x               0x182   0T 891/T500 (TNT 100)
+board  x               0x183   0T 892/T520 (TNT 120)
+board  x               0x184   U 893/T540 (Jade 180 U)
+
+board  x               0x1ff   ? Hitachi X Processor
 
-board  HP817           0x280   817/827/957/957LX/FH20 (Nova Low)
-board  HP837           0x281   837/847/857/967/967LX/FGHI30 (Nova High)
-board  HP807           0x282   807/917/917LX/927/927LX/937/937LX/947/947LX/F10 (Nova8)
-board  HP867           0x283   867/877/977/GHI40 (Nova64)
-board  HP887T          0x284   887/897/987/GHI50 (TNova)
-#board HP              0x285   (TNova64)
-#board HP              0x286   (Hydra64 (Nova))
-board  HP887           0x287   887/897/GHI70 (Hydra96 (Nova))
-board  HP887T96        0x288   887/897/GHI60 (TNova96)
+board  x               0x200   S 720 (Cobra)
+board  x               0x201   S 750/66 (Coral)
+board  x               0x202   S 730/66 (King Cobra)
+board  x               0x203   0T 735/99 (Hardball)
+board  x               0x204   0T 755/99 (Coral II)
+board  HP755_125       0x205   0T 755/125 (Coral II)
+#board HP755_125       0x205   0T 755/125 (Snake Eagle, opt 91)
+board  x               0x206   0T 735/130 (Snake Cheetah)
 
-board  HP710           0x300   710/50 (Bushmaster)
-board  HP705           0x302   705/35 (Flounder)
+board  x               0x280   S 817/827/957/957LX/FH20 (Nova Low)
+board  x               0x281   S 837/847/857/967/967LX/FGHI30 (Nova High)
+board  x               0x282   S 807/917/917LX/927/927LX/937/937LX/947/947LX/F10 (Nova8)
+board  x               0x283   S 867/877/977/GHI40 (Nova64)
+board  x               0x284   0T 887/897/987/GHI50 (TNova)
+board  x               0x285   0T (TNova64)
+board  x               0x286   0T (Hydra64 (Nova))
+board  x               0x287   0T 887/897/GHI70 (Hydra96 (Nova))
+board  x               0x288   0T 887/897/GHI60 (TNova96)
 
-board  HP715_50        0x310   715/50 (Scorpio)
-board  HP715_33        0x311   715/33 (Scorpio Jr.)
-board  HP715S_50       0x312   715S/50 (Spider-50)
-board  HP715S_33       0x313   715S/33 (Spider-33)
-board  HP715T_50       0x314   715T/50 (Trailways-50)
-board  HP715T_33       0x315   715T/33 (Trailways-33)
-board  HP715_75        0x316   715/75 (Scorpio Sr.)
-board  HP715_99        0x317   715/99 (Scorpio 100)
-board  HP725_50        0x318   725/50 (Spectra)
-board  HP725_75        0x319   725/75 (Spectra)
+board  x               0x300   S 710/50 (Bushmaster)
+board  x               0x302   S 705/35 (Flounder)
 
-#board HP725_100       0x320   725/100 (Spectra)
-
-board  HP745i_50       0x401   745i/747i/50 (Pace)
-board  HP742i_50       0x402   742i/50 (Sidewinder)
-board  HP747i_100      0x403   745i/747i/100 (Fast Pace)
+board  x               0x310   0T 715/50 (Scorpio)
+board  x               0x311   0T 715/33 (Scorpio Jr.)
+board  x               0x312   0T 715S/50 (Spider-50)
+board  x               0x313   0T 715S/33 (Spider-33)
+board  x               0x314   0T 715T/50 (Trailways-50)
+board  x               0x315   0T 715T/33 (Trailways-33)
+board  x               0x316   0T 715/75 (Scorpio Sr.)
+board  x               0x317   0T 715/99 (Scorpio 100)
+board  x               0x318   0T 725/50 (Spectra)
+board  x               0x319   0T 725/75 (Spectra)
 
-board  HPE23           0x480   806/E23 (Orville)
-board  HPE25           0x481   E25 (Wilbur)
-board  HPE35           0x482   816/E35 (Wright Brothers 80)
-board  HPE45           0x483   826/E45 (Wright Brothers 96)
-board  HPD210          0x484   811/D210/D310 (UltraLight Proc L-100)
-board  HPD200          0x485   801/D200/D300 (UltraLight Proc L-75)
+board  x               0x320   0T 725/100 (Spectra)
+
+board  x               0x401   0T 745i/747i/50 (Pace)
+board  x               0x402   0T 742i/50 (Sidewinder)
+board  x               0x403   0T 745i/747i/100 (Fast Pace)
+
+board  x               0x480   L 806/E23 (Orville)
+board  x               0x481   L E25 (Wilbur)
+board  x               0x482   L 816/E35 (Wright Brothers 80)
+board  x               0x483   L 826/E45 (Wright Brothers 96)
+board  x               0x484   L 811/D210/D310 (UltraLight Proc L-100)
+board  x               0x485   L 801/D200/D300 (UltraLight Proc L-75)
 
-board  HP778_B132L     0x501   778/B132L (Merlin L2 132)
-board  HP778_B160L     0x502   778/B160L (Merlin L2 160)
-board  HP778_B132LP    0x503   778/B132L (Merlin L2+ 132)
-board  HP778_B180L     0x504   778/B180L (Merlin L2+ 180)
-board  HP779_C132L     0x505   779/C132L (Raven L2 132)
-board  HP779_C160L     0x506   779/C160L (Raven L2 160)
-board  HP779_C180L     0x507   779/C160L (Raven L2 180)
-board  HP779_C160L1    0x508   779/C160L (Raven L2 160)
-board  HP712_132L2     0x509   712/132 (L2 Upgrade)
-board  HP712_160L2     0x50a   712/160 (L2 Upgrade)



Home | Main Index | Thread Index | Old Index