parisc: Add Page Deallocation Table (PDT) support

The firmare in most parisc machines maintains a Page Deallocation Table (PDT)
which holds a list of physical memory addresses where hardware detected memory
errors (single bit and double bit errors).

This patch adds the missing PDC firmware calls and the logic to read the PDT
from firmware, report all current PDT entries and exclude the reported bad
memory from being used by Linux.

Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Helge Deller
2017-05-11 22:24:15 +02:00
parent c8c3735997
commit c9c2877d08
9 changed files with 317 additions and 16 deletions

View File

@@ -131,12 +131,12 @@
#define PDC_TLB_SETUP 1 /* set up miss handling */
#define PDC_MEM 20 /* Manage memory */
#define PDC_MEM_MEMINFO 0
#define PDC_MEM_ADD_PAGE 1
#define PDC_MEM_CLEAR_PDT 2
#define PDC_MEM_READ_PDT 3
#define PDC_MEM_RESET_CLEAR 4
#define PDC_MEM_GOODMEM 5
#define PDC_MEM_MEMINFO 0 /* Return PDT info */
#define PDC_MEM_ADD_PAGE 1 /* Add page to PDT */
#define PDC_MEM_CLEAR_PDT 2 /* Clear PDT */
#define PDC_MEM_READ_PDT 3 /* Read PDT entry */
#define PDC_MEM_RESET_CLEAR 4 /* Reset PDT clear flag */
#define PDC_MEM_GOODMEM 5 /* Set good_mem value */
#define PDC_MEM_TABLE 128 /* Non contig mem map (sprockets) */
#define PDC_MEM_RETURN_ADDRESS_TABLE PDC_MEM_TABLE
#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES_SIZE 131