aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-10-29 14:35:41 +0100
committerHelge Deller <deller@gmx.de>2023-10-31 08:26:22 +0100
commit08402d3d1b5af9a13b056d609836f06a0697a70c (patch)
tree990726e73edc0ddf548d02c93087edb9e48d81b9
parentd5f4b1a8913db228932ed85cad8b72585e74cc2f (diff)
downloadseabios-hppa-08402d3d1b5af9a13b056d609836f06a0697a70c.zip
seabios-hppa-08402d3d1b5af9a13b056d609836f06a0697a70c.tar.gz
seabios-hppa-08402d3d1b5af9a13b056d609836f06a0697a70c.tar.bz2
parisc: Add Astro/Elroy constants for debugging
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--src/parisc/c3700.h24
-rw-r--r--src/parisc/hppa_hardware.h9
-rw-r--r--src/parisc/parisc.c11
3 files changed, 29 insertions, 15 deletions
diff --git a/src/parisc/c3700.h b/src/parisc/c3700.h
index 5d898e6..3833c2f 100644
--- a/src/parisc/c3700.h
+++ b/src/parisc/c3700.h
@@ -25,7 +25,7 @@
#define HPA_fed00000_DESCRIPTION "Astro BC Runway Port"
static struct pdc_system_map_mod_info mod_info_hpa_fed00000 = {
- .mod_addr = 0xfed00000,
+ .mod_addr = ASTRO_HPA,
.mod_pgs = 0x8,
.add_addrs = 0x0,
};
@@ -54,7 +54,7 @@ static struct pdc_iodc iodc_data_hpa_fed00000 = {
#define HPA_fed30000_DESCRIPTION "Elroy PCI Bridge"
static struct pdc_system_map_mod_info mod_info_hpa_fed30000 = {
- .mod_addr = 0xfed30000,
+ .mod_addr = ELROY0_HPA,
.mod_pgs = 0x2,
.add_addrs = 0x0,
};
@@ -83,7 +83,7 @@ static struct pdc_iodc iodc_data_hpa_fed30000 = {
#define HPA_fed32000_DESCRIPTION "Elroy PCI Bridge"
static struct pdc_system_map_mod_info mod_info_hpa_fed32000 = {
- .mod_addr = 0xfed32000,
+ .mod_addr = ELROY2_HPA,
.mod_pgs = 0x2,
.add_addrs = 0x0,
};
@@ -112,7 +112,7 @@ static struct pdc_iodc iodc_data_hpa_fed32000 = {
#define HPA_fed38000_DESCRIPTION "Elroy PCI Bridge"
static struct pdc_system_map_mod_info mod_info_hpa_fed38000 = {
- .mod_addr = 0xfed38000,
+ .mod_addr = ELROY8_HPA,
.mod_pgs = 0x2,
.add_addrs = 0x0,
};
@@ -141,7 +141,7 @@ static struct pdc_iodc iodc_data_hpa_fed38000 = {
#define HPA_fed3c000_DESCRIPTION "Elroy PCI Bridge"
static struct pdc_system_map_mod_info mod_info_hpa_fed3c000 = {
- .mod_addr = 0xfed3c000,
+ .mod_addr = ELROYc_HPA,
.mod_pgs = 0x2,
.add_addrs = 0x0,
};
@@ -205,7 +205,7 @@ static struct pdc_iodc iodc_data_hpa_fffa0000 = {
#define HPA_fed10200_DESCRIPTION "Memory"
static struct pdc_system_map_mod_info mod_info_hpa_fed10200 = {
- .mod_addr = 0xfed10200,
+ .mod_addr = ASTRO_MEMORY_HPA,
.mod_pgs = 0x8,
.add_addrs = 0x0,
};
@@ -234,37 +234,37 @@ static struct pdc_iodc iodc_data_hpa_fed10200 = {
#define PARISC_DEVICE_LIST \
- { .hpa = 0xfed00000,\
+ { .hpa = ASTRO_HPA,\
.iodc = &iodc_data_hpa_fed00000,\
.mod_info = &mod_info_hpa_fed00000,\
.mod_path = &mod_path_hpa_fed00000,\
.num_addr = HPA_fed00000_num_addr,\
.add_addr = { HPA_fed00000_add_addr } },\
- { .hpa = 0xfed30000,\
+ { .hpa = ELROY0_HPA,\
.iodc = &iodc_data_hpa_fed30000,\
.mod_info = &mod_info_hpa_fed30000,\
.mod_path = &mod_path_hpa_fed30000,\
.num_addr = HPA_fed30000_num_addr,\
.add_addr = { HPA_fed30000_add_addr } },\
- { .hpa = 0xfed32000,\
+ { .hpa = ELROY2_HPA,\
.iodc = &iodc_data_hpa_fed32000,\
.mod_info = &mod_info_hpa_fed32000,\
.mod_path = &mod_path_hpa_fed32000,\
.num_addr = HPA_fed32000_num_addr,\
.add_addr = { HPA_fed32000_add_addr } },\
- { .hpa = 0xfed38000,\
+ { .hpa = ELROY8_HPA,\
.iodc = &iodc_data_hpa_fed38000,\
.mod_info = &mod_info_hpa_fed38000,\
.mod_path = &mod_path_hpa_fed38000,\
.num_addr = HPA_fed38000_num_addr,\
.add_addr = { HPA_fed38000_add_addr } },\
- { .hpa = 0xfed3c000,\
+ { .hpa = ELROYc_HPA,\
.iodc = &iodc_data_hpa_fed3c000,\
.mod_info = &mod_info_hpa_fed3c000,\
.mod_path = &mod_path_hpa_fed3c000,\
.num_addr = HPA_fed3c000_num_addr,\
.add_addr = { HPA_fed3c000_add_addr } },\
- { .hpa = 0xfed10200,\
+ { .hpa = ASTRO_MEMORY_HPA,\
.iodc = &iodc_data_hpa_fed10200,\
.mod_info = &mod_info_hpa_fed10200,\
.mod_path = &mod_path_hpa_fed10200,\
diff --git a/src/parisc/hppa_hardware.h b/src/parisc/hppa_hardware.h
index 5015cf3..63c7a81 100644
--- a/src/parisc/hppa_hardware.h
+++ b/src/parisc/hppa_hardware.h
@@ -30,6 +30,13 @@
#define CPU_HPA 0xfffb0000
#define MEMORY_HPA 0xfffff000 // 0xfffa0000
+#define ASTRO_HPA 0xfed00000
+#define ELROY0_HPA 0xfed30000
+#define ELROY2_HPA 0xfed32000
+#define ELROY8_HPA 0xfed38000
+#define ELROYc_HPA 0xfed3c000
+#define ASTRO_MEMORY_HPA 0xfed10200
+
#define SCSI_HPA 0xf1040000 /* emulated SCSI, needs to be in f region */
/* offsets to DINO HPA: */
@@ -57,7 +64,7 @@
/* ASTRO Memory and I/O regions */
#define ASTRO_BASE_HPA 0xfffed00000
-#define ELROY0_BASE_HPA 0xfffed30000
+#define ELROY0_BASE_HPA 0xfffed30000 /* ELROY0_HPA */
#define LMMIO_DIST_BASE_ADDR 0xf4000000UL
#define LMMIO_DIST_BASE_SIZE 0x4000000UL
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c
index c0a180a..40e954f 100644
--- a/src/parisc/parisc.c
+++ b/src/parisc/parisc.c
@@ -351,6 +351,12 @@ static const char *hpa_name(unsigned long hpa)
DO(LASI_PS2KBD_HPA)
DO(LASI_PS2MOU_HPA)
DO(LASI_GFX_HPA)
+ DO(ASTRO_HPA)
+ DO(ASTRO_MEMORY_HPA)
+ DO(ELROY0_HPA)
+ DO(ELROY2_HPA)
+ DO(ELROY8_HPA)
+ DO(ELROYc_HPA)
#undef DO
/* could be one of the SMP CPUs */
@@ -685,6 +691,7 @@ static int keep_add_generic_devices(void)
while (dev->hpa) {
switch (dev->iodc->type) {
case 0x0041: /* Memory. Save HPA in PAGE0 entry. */
+ /* MEMORY_HPA or ASTRO_MEMORY_HPA */
PAGE0->imm_hpa = dev->hpa;
/* fallthrough */
case 0x0007: /* GSC+ Port bridge */
@@ -743,7 +750,7 @@ static void remove_parisc_devices(unsigned int num_cpus)
/* Fix monarch CPU */
BUG_ON(!cpu_dev);
cpu_dev->mod_info->mod_addr = CPU_HPA;
- cpu_dev->mod_path->path.mod = (CPU_HPA - DINO_HPA) / 0x1000;
+ cpu_dev->mod_path->path.mod = (CPU_HPA - pci_hpa) / 0x1000;
/* Generate other CPU devices */
for (i = 1; i < num_cpus; i++) {
@@ -757,7 +764,7 @@ static void remove_parisc_devices(unsigned int num_cpus)
parisc_devices[t].mod_info = &modinfo[i];
modpath[i] = *cpu_dev->mod_path;
- modpath[i].path.mod = (hpa - DINO_HPA) / 0x1000;
+ modpath[i].path.mod = (hpa - pci_hpa) / 0x1000;
parisc_devices[t].mod_path = &modpath[i];
t++;