diff options
author | Helge Deller <deller@gmx.de> | 2019-08-16 04:11:45 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2019-08-16 04:11:45 +0200 |
commit | a9b7813e723e764a4da797149e2828d875df4023 (patch) | |
tree | 7fcb2fd34dd0597c2747fc1825c573de5b670d49 | |
parent | c8625df48fa0be4b791c20e7825cde60aaa747a7 (diff) | |
download | seabios-hppa-a9b7813e723e764a4da797149e2828d875df4023.zip seabios-hppa-a9b7813e723e764a4da797149e2828d875df4023.tar.gz seabios-hppa-a9b7813e723e764a4da797149e2828d875df4023.tar.bz2 |
Fix mod_pgs (number of pages) for graphic cards
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | src/parisc/parisc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index e038ddc..33a17cb 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -271,6 +271,12 @@ int HPA_is_storage_device(unsigned long hpa) return (hpa == DINO_SCSI_HPA) || (hpa == IDE_HPA) || (hpa == LASI_SCSI_HPA); } +#define GFX_NUM_PAGES 0x2000 +int HPA_is_graphics_device(unsigned long hpa) +{ + return (hpa == LASI_GFX_HPA) || (hpa == 0xf4000000) || + (hpa == 0xf8000000) || (hpa == 0xfa000000); +} static unsigned long keep_list[] = { PARISC_KEEP_LIST }; @@ -1234,7 +1240,7 @@ static int pdc_system_map(unsigned int *arg) // *pdc_mod_info = *parisc_devices[hpa_index].mod_info; -> can be dropped. memset(result, 0, 32*sizeof(long)); result[0] = hpa; // .mod_addr for PDC_IODC - result[1] = 1; // .mod_pgs number of pages (FIXME: only graphics has more, e.g. 0x2000) + result[1] = HPA_is_graphics_device(hpa) ? GFX_NUM_PAGES : 1; result[2] = parisc_devices[hpa_index].num_addr; // additional addresses return PDC_OK; @@ -1251,7 +1257,7 @@ static int pdc_system_map(unsigned int *arg) if (ARG4 >= parisc_devices[hpa_index].num_addr) return PDC_INVALID_ARG; result[0] = parisc_devices[hpa_index].add_addr[ARG4]; - result[1] = 1; // .mod_pgs number of pages (FIXME: only graphics has more, e.g. 0x2000) + result[1] = HPA_is_graphics_device(hpa) ? GFX_NUM_PAGES : 1; return PDC_OK; case PDC_TRANSLATE_PATH: |