forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
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
....@@ -112,10 +119,11 @@
112119
113120 static __initdata struct vec5_fw_feature
114121 vec5_fw_features_table[] = {
115
- {FW_FEATURE_TYPE1_AFFINITY, OV5_TYPE1_AFFINITY},
122
+ {FW_FEATURE_FORM1_AFFINITY, OV5_FORM1_AFFINITY},
116123 {FW_FEATURE_PRRN, OV5_PRRN},
117124 {FW_FEATURE_DRMEM_V2, OV5_DRMEM_V2},
118125 {FW_FEATURE_DRC_INFO, OV5_DRC_INFO},
126
+ {FW_FEATURE_FORM2_AFFINITY, OV5_FORM2_AFFINITY},
119127 };
120128
121129 static void __init fw_vec5_feature_init(const char *vec5, unsigned long len)