parisc: Add PDC_PAT_CPU function

Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c
index 87200bd..729afc7 100644
--- a/src/parisc/parisc.c
+++ b/src/parisc/parisc.c
@@ -1290,6 +1290,10 @@
         DO(PDC_PCI_INDEX)
         DO(PDC_RELOCATE)
         DO(PDC_INITIATOR)
+        DO(PDC_PAT_CELL)
+        DO(PDC_PAT_CHASSIS_LOG)
+        DO(PDC_PAT_CPU)
+        DO(PDC_PAT_PD)
         DO(PDC_LINK)
 #undef DO
         return "UNKNOWN!";
@@ -2083,9 +2087,11 @@
 
     switch (option) {
         case PDC_PAT_CELL_GET_NUMBER:
-            cell_info->cell_num = 0;
-            cell_info->cell_loc = 0;
+            // cell_info->cell_num = cell_info->cell_loc = 0;
+            memset(cell_info, 0, 32*sizeof(long long));
             return PDC_OK;
+        case PDC_PAT_CELL_GET_INFO:
+            return PDC_BAD_OPTION; /* optional on single-cell machines */
         default:
             break;
     }
@@ -2093,6 +2099,34 @@
     return PDC_BAD_OPTION;
 }
 
+static int pdc_pat_cpu(unsigned int *arg)
+{
+    unsigned long option = ARG1;
+    unsigned long *result = (unsigned long *)ARG2;
+    unsigned long hpa;
+
+    switch (option) {
+        case PDC_PAT_CPU_GET_NUMBER:
+            hpa = ARG3;
+            result[0] = index_of_CPU_HPA(hpa);
+            result[1] = hpa;    /* location */
+            result[2] = 0;      /* num siblings */
+            return PDC_OK;
+        case PDC_PAT_CPU_GET_HPA:
+            if ((unsigned long)ARG3 >= smp_cpus)
+                return PDC_INVALID_ARG;
+            hpa = CPU_HPA_IDX(ARG3);
+            result[0] = hpa;
+            result[1] = hpa;    /* location */
+            result[2] = 0;      /* num siblings */
+            return PDC_OK;
+        default:
+            break;
+    }
+    dprintf(0, "\n\nSeaBIOS: Unimplemented PDC_PAT_CPU OPTION %lu called with ARG2=%x ARG3=%x ARG4=%x\n", option, ARG2, ARG3, ARG4);
+    return PDC_BAD_OPTION;
+}
+
 static int pdc_pat_pd(unsigned int *arg)
 {
     unsigned long option = ARG1;
@@ -2254,6 +2288,9 @@
             dprintf(0, "\n\nSeaBIOS: PDC_PAT_CHASSIS_LOG OPTION %lu called with ARG2=%x ARG3=%x ARG4=%x\n", option, ARG2, ARG3, ARG4);
             return PDC_BAD_PROC;
 
+        case PDC_PAT_CPU:
+            return pdc_pat_cpu(arg);
+
         case PDC_PAT_PD:
             return pdc_pat_pd(arg);
     }