From b39b38ecd0f0fdec3130c626f0a33967b07b7f2c Mon Sep 17 00:00:00 2001 From: Yoshihiro Takahashi Date: Sat, 22 Apr 2000 15:19:22 +0000 Subject: [PATCH] - PC-98 uses IRQ2 too. - Fixed the range of DMA channels on PC-98. Submitted by: "T.Yamaoka" --- sys/amd64/amd64/legacy.c | 14 +++++++++++++- sys/amd64/amd64/nexus.c | 14 +++++++++++++- sys/i386/i386/legacy.c | 14 +++++++++++++- sys/i386/i386/nexus.c | 14 +++++++++++++- 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/legacy.c b/sys/amd64/amd64/legacy.c index 5fdda2be3689..c1b7ea33fb38 100644 --- a/sys/amd64/amd64/legacy.c +++ b/sys/amd64/amd64/legacy.c @@ -147,10 +147,17 @@ nexus_probe(device_t dev) panic("nexus_probe irq_rman"); #else irq_rman.rm_end = 15; +#ifdef PC98 + if (rman_init(&irq_rman) + || rman_manage_region(&irq_rman, + irq_rman.rm_start, irq_rman.rm_end)) + panic("nexus_probe irq_rman"); +#else if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, irq_rman.rm_start, 1) || rman_manage_region(&irq_rman, 3, irq_rman.rm_end)) panic("nexus_probe irq_rman"); +#endif /* PC98 */ #endif /* @@ -159,12 +166,17 @@ nexus_probe(device_t dev) * multiple bridges. (eg: laptops with docking stations) */ drq_rman.rm_start = 0; +#ifdef PC98 + drq_rman.rm_end = 3; +#else drq_rman.rm_end = 7; +#endif drq_rman.rm_type = RMAN_ARRAY; drq_rman.rm_descr = "DMA request lines"; /* XXX drq 0 not available on some machines */ if (rman_init(&drq_rman) - || rman_manage_region(&drq_rman, 0, 7)) + || rman_manage_region(&drq_rman, + drq_rman.rm_start, drq_rman.rm_end)) panic("nexus_probe drq_rman"); /* diff --git a/sys/amd64/amd64/nexus.c b/sys/amd64/amd64/nexus.c index 5fdda2be3689..c1b7ea33fb38 100644 --- a/sys/amd64/amd64/nexus.c +++ b/sys/amd64/amd64/nexus.c @@ -147,10 +147,17 @@ nexus_probe(device_t dev) panic("nexus_probe irq_rman"); #else irq_rman.rm_end = 15; +#ifdef PC98 + if (rman_init(&irq_rman) + || rman_manage_region(&irq_rman, + irq_rman.rm_start, irq_rman.rm_end)) + panic("nexus_probe irq_rman"); +#else if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, irq_rman.rm_start, 1) || rman_manage_region(&irq_rman, 3, irq_rman.rm_end)) panic("nexus_probe irq_rman"); +#endif /* PC98 */ #endif /* @@ -159,12 +166,17 @@ nexus_probe(device_t dev) * multiple bridges. (eg: laptops with docking stations) */ drq_rman.rm_start = 0; +#ifdef PC98 + drq_rman.rm_end = 3; +#else drq_rman.rm_end = 7; +#endif drq_rman.rm_type = RMAN_ARRAY; drq_rman.rm_descr = "DMA request lines"; /* XXX drq 0 not available on some machines */ if (rman_init(&drq_rman) - || rman_manage_region(&drq_rman, 0, 7)) + || rman_manage_region(&drq_rman, + drq_rman.rm_start, drq_rman.rm_end)) panic("nexus_probe drq_rman"); /* diff --git a/sys/i386/i386/legacy.c b/sys/i386/i386/legacy.c index 5fdda2be3689..c1b7ea33fb38 100644 --- a/sys/i386/i386/legacy.c +++ b/sys/i386/i386/legacy.c @@ -147,10 +147,17 @@ nexus_probe(device_t dev) panic("nexus_probe irq_rman"); #else irq_rman.rm_end = 15; +#ifdef PC98 + if (rman_init(&irq_rman) + || rman_manage_region(&irq_rman, + irq_rman.rm_start, irq_rman.rm_end)) + panic("nexus_probe irq_rman"); +#else if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, irq_rman.rm_start, 1) || rman_manage_region(&irq_rman, 3, irq_rman.rm_end)) panic("nexus_probe irq_rman"); +#endif /* PC98 */ #endif /* @@ -159,12 +166,17 @@ nexus_probe(device_t dev) * multiple bridges. (eg: laptops with docking stations) */ drq_rman.rm_start = 0; +#ifdef PC98 + drq_rman.rm_end = 3; +#else drq_rman.rm_end = 7; +#endif drq_rman.rm_type = RMAN_ARRAY; drq_rman.rm_descr = "DMA request lines"; /* XXX drq 0 not available on some machines */ if (rman_init(&drq_rman) - || rman_manage_region(&drq_rman, 0, 7)) + || rman_manage_region(&drq_rman, + drq_rman.rm_start, drq_rman.rm_end)) panic("nexus_probe drq_rman"); /* diff --git a/sys/i386/i386/nexus.c b/sys/i386/i386/nexus.c index 5fdda2be3689..c1b7ea33fb38 100644 --- a/sys/i386/i386/nexus.c +++ b/sys/i386/i386/nexus.c @@ -147,10 +147,17 @@ nexus_probe(device_t dev) panic("nexus_probe irq_rman"); #else irq_rman.rm_end = 15; +#ifdef PC98 + if (rman_init(&irq_rman) + || rman_manage_region(&irq_rman, + irq_rman.rm_start, irq_rman.rm_end)) + panic("nexus_probe irq_rman"); +#else if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, irq_rman.rm_start, 1) || rman_manage_region(&irq_rman, 3, irq_rman.rm_end)) panic("nexus_probe irq_rman"); +#endif /* PC98 */ #endif /* @@ -159,12 +166,17 @@ nexus_probe(device_t dev) * multiple bridges. (eg: laptops with docking stations) */ drq_rman.rm_start = 0; +#ifdef PC98 + drq_rman.rm_end = 3; +#else drq_rman.rm_end = 7; +#endif drq_rman.rm_type = RMAN_ARRAY; drq_rman.rm_descr = "DMA request lines"; /* XXX drq 0 not available on some machines */ if (rman_init(&drq_rman) - || rman_manage_region(&drq_rman, 0, 7)) + || rman_manage_region(&drq_rman, + drq_rman.rm_start, drq_rman.rm_end)) panic("nexus_probe drq_rman"); /*