forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/powerpc/platforms/pseries/firmware.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * pSeries firmware setup code.
34 *
....@@ -14,11 +15,6 @@
1415 * Copyright (C) 2005 Stephen Rothwell, IBM Corporation
1516 *
1617 * Copyright 2006 IBM Corporation.
17
- *
18
- * This program is free software; you can redistribute it and/or
19
- * modify it under the terms of the GNU General Public License
20
- * as published by the Free Software Foundation; either version
21
- * 2 of the License, or (at your option) any later version.
2218 */
2319
2420
....@@ -26,6 +22,7 @@
2622 #include <asm/firmware.h>
2723 #include <asm/prom.h>
2824 #include <asm/udbg.h>
25
+#include <asm/svm.h>
2926
3027 #include "pseries.h"
3128
....@@ -59,12 +56,16 @@
5956 {FW_FEATURE_LLAN, "hcall-lLAN"},
6057 {FW_FEATURE_BULK_REMOVE, "hcall-bulk"},
6158 {FW_FEATURE_XDABR, "hcall-xdabr"},
62
- {FW_FEATURE_MULTITCE, "hcall-multi-tce"},
59
+ {FW_FEATURE_PUT_TCE_IND | FW_FEATURE_STUFF_TCE,
60
+ "hcall-multi-tce"},
6361 {FW_FEATURE_SPLPAR, "hcall-splpar"},
6462 {FW_FEATURE_VPHN, "hcall-vphn"},
6563 {FW_FEATURE_SET_MODE, "hcall-set-mode"},
6664 {FW_FEATURE_BEST_ENERGY, "hcall-best-energy-1*"},
6765 {FW_FEATURE_HPT_RESIZE, "hcall-hpt-resize"},
66
+ {FW_FEATURE_BLOCK_REMOVE, "hcall-block-remove"},
67
+ {FW_FEATURE_PAPR_SCM, "hcall-scm"},
68
+ {FW_FEATURE_RPT_INVALIDATE, "hcall-rpt-invalidate"},
6869 };
6970
7071 /* Build up the firmware features bitmask using the contents of
....@@ -102,6 +103,12 @@
102103 }
103104 }
104105
106
+ if (is_secure_guest() &&
107
+ (powerpc_firmware_features & FW_FEATURE_PUT_TCE_IND)) {
108
+ powerpc_firmware_features &= ~FW_FEATURE_PUT_TCE_IND;
109
+ pr_debug("SVM: disabling PUT_TCE_IND firmware feature\n");
110
+ }
111
+
105112 pr_debug(" <- fw_hypertas_feature_init()\n");
106113 }
107114