ppc/pnv: Add a HIOMAP erase command
commitc02f9892af1f166634e1b4fd722044151acb5e88
authorCédric Le Goater <clg@kaod.org>
Thu, 20 Aug 2020 16:46:38 +0000 (20 18:46 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 8 Sep 2020 00:08:42 +0000 (8 10:08 +1000)
tree616ccbfdea3565388de79fc079eaa24af89d98eb
parent4f311a70893800f33b57852ca4453823271c022b
ppc/pnv: Add a HIOMAP erase command

The OPAL test suite runs a read-erase-write test on the PNOR :

  https://github.com/open-power/op-test/blob/master/testcases/OpTestPNOR.py

which revealed that the IPMI HIOMAP handlers didn't support
HIOMAP_C_ERASE. Implement the sector erase command by writing 0xFF in
the PNOR memory region.

Cc: Corey Minyard <cminyard@mvista.com>
Reported-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20200820164638.2515681-1-clg@kaod.org>
Acked-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/pnv_bmc.c
include/hw/ipmi/ipmi.h