From 5ce2f48c3be1e233cfe496b385a00ffe4d0d9413 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Tue, 11 Jan 2022 20:31:44 +0100 Subject: parisc: Allow 16 CPUs Move the HPA for MEMORY_HPA out of the address space of the 16th CPU, and fix the PDC_COPROC_CFG PDC function to report functional FPUs for all configured CPUs. The documentation specifies that cr10 can only report for 8 CPUs, but that seems outdated as both HP-UX 10 and HP-UX 11 accepts this change. Signed-off-by: Helge Deller --- src/parisc/hppa_hardware.h | 6 ++++-- src/parisc/parisc.c | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/parisc/hppa_hardware.h b/src/parisc/hppa_hardware.h index 658757c..5edf577 100644 --- a/src/parisc/hppa_hardware.h +++ b/src/parisc/hppa_hardware.h @@ -25,7 +25,7 @@ #define LASI_GFX_HPA 0xf8000000 #define ARTIST_FB_ADDR 0xf9000000 #define CPU_HPA 0xfffb0000 -#define MEMORY_HPA 0xfffbf000 +#define MEMORY_HPA 0xfffff000 #define PCI_HPA DINO_HPA /* PCI bus */ #define IDE_HPA 0xf9000000 /* Boot disc controller */ @@ -38,10 +38,12 @@ #define PORT_PCI_CMD (PCI_HPA + DINO_PCI_ADDR) #define PORT_PCI_DATA (PCI_HPA + DINO_CONFIG_DATA) +#define FW_CFG_IO_BASE 0xfffa0000 + #define PORT_SERIAL1 (DINO_UART_HPA + 0x800) #define PORT_SERIAL2 (LASI_UART_HPA + 0x800) -#define HPPA_MAX_CPUS 8 /* max. number of SMP CPUs */ +#define HPPA_MAX_CPUS 16 /* max. number of SMP CPUs */ #define CPU_CLOCK_MHZ 250 /* emulate a 250 MHz CPU */ #define CPU_HPA_CR_REG 7 /* store CPU HPA in cr7 (SeaBIOS internal) */ diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index faedd28..b54e4be 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -992,12 +992,14 @@ static int pdc_coproc(unsigned int *arg) { unsigned long option = ARG1; unsigned long *result = (unsigned long *)ARG2; - unsigned char mask; + unsigned long mask; switch (option) { case PDC_COPROC_CFG: memset(result, 0, 32 * sizeof(unsigned long)); - mask = ~((1 << (8-smp_cpus))-1); - /* set bit per cpu in ccr_functional and ccr_present: */ + /* Set one bit per cpu in ccr_functional and ccr_present. + Ignore that specification only mentions 8 bits for cr10 + and set all FPUs functional */ + mask = -1UL; mtctl(mask, 10); /* initialize cr10 */ result[0] = mask; result[1] = mask; -- cgit v1.1