diff options
author | Helge Deller <deller@gmx.de> | 2023-10-22 14:31:39 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-10-31 08:26:22 +0100 |
commit | 806a5870ee7ec9f76e8d1c371ae856c9239b0aa8 (patch) | |
tree | ddd3298ca1a6eebf096a9423f63d79c7fab6d99a | |
parent | a0fa533554e95e633003dab4e475199ea7a120c0 (diff) | |
download | seabios-hppa-806a5870ee7ec9f76e8d1c371ae856c9239b0aa8.zip seabios-hppa-806a5870ee7ec9f76e8d1c371ae856c9239b0aa8.tar.gz seabios-hppa-806a5870ee7ec9f76e8d1c371ae856c9239b0aa8.tar.bz2 |
parisc: Implement PDC_PAT_PD_GET_ADDR_MAP
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | src/parisc/parisc.c | 16 | ||||
-rw-r--r-- | src/parisc/pdcpat.h | 4 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index 10cf5ac..ab7ff62 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -2045,8 +2045,24 @@ static int pdc_pat_pd(unsigned int *arg) { unsigned long option = ARG1; unsigned long *result = (unsigned long *)ARG2; + struct pdc_pat_pd_addr_map_entry *mem_table = (void *)ARG3; + unsigned long count = ARG4; + unsigned long offset = ARG5; switch (option) { + case PDC_PAT_PD_GET_ADDR_MAP: + if (count < sizeof(*mem_table) || offset != 0) + return PDC_INVALID_ARG; + memset(mem_table, 0, sizeof(*mem_table)); + mem_table->entry_type = PAT_MEMORY_DESCRIPTOR; + mem_table->memory_type = PAT_MEMTYPE_MEMORY; + mem_table->memory_usage = PAT_MEMUSE_GENERAL; /* ?? */ + mem_table->paddr = 0; /* note: 64bit! */ + mem_table->pages = ram_size / 4096; /* Length in 4K pages */ + mem_table->cell_map = 0; + result[0] = sizeof(*mem_table); + return PDC_OK; + case PDC_PAT_PD_GET_PDC_INTERF_REV: result[0] = 5; // legacy_rev result[1] = 6; // pat_rev diff --git a/src/parisc/pdcpat.h b/src/parisc/pdcpat.h index 57eb122..1c1a62e 100644 --- a/src/parisc/pdcpat.h +++ b/src/parisc/pdcpat.h @@ -280,10 +280,10 @@ struct pdc_pat_pd_addr_map_entry { unsigned char reserve1[5]; unsigned char memory_type; unsigned char memory_usage; - unsigned long paddr; + unsigned long long paddr; /* note: 64bit! */ unsigned int pages; /* Length in 4K pages */ unsigned int reserve2; - unsigned long cell_map; + unsigned long long cell_map; /* note: 64bit! */ }; /******************************************************************** |