File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,30 @@ static struct prm_handler_info *find_prm_handler(const guid_t *guid)
214
214
#define UPDATE_LOCK_ALREADY_HELD 4
215
215
#define UPDATE_UNLOCK_WITHOUT_LOCK 5
216
216
217
+ int acpi_call_prm_handler (guid_t handler_guid , void * param_buffer )
218
+ {
219
+ struct prm_handler_info * handler = find_prm_handler (& handler_guid );
220
+ struct prm_module_info * module = find_prm_module (& handler_guid );
221
+ struct prm_context_buffer context ;
222
+ efi_status_t status ;
223
+
224
+ if (!module || !handler )
225
+ return - ENODEV ;
226
+
227
+ memset (& context , 0 , sizeof (context ));
228
+ ACPI_COPY_NAMESEG (context .signature , "PRMC" );
229
+ context .identifier = handler -> guid ;
230
+ context .static_data_buffer = handler -> static_data_buffer_addr ;
231
+ context .mmio_ranges = module -> mmio_info ;
232
+
233
+ status = efi_call_acpi_prm_handler (handler -> handler_addr ,
234
+ (u64 )param_buffer ,
235
+ & context );
236
+
237
+ return efi_status_to_err (status );
238
+ }
239
+ EXPORT_SYMBOL_GPL (acpi_call_prm_handler );
240
+
217
241
/*
218
242
* This is the PlatformRtMechanism opregion space handler.
219
243
* @function: indicates the read/write. In fact as the PlatformRtMechanism
Original file line number Diff line number Diff line change 2
2
3
3
#ifdef CONFIG_ACPI_PRMT
4
4
void init_prmt (void );
5
+ int acpi_call_prm_handler (guid_t handler_guid , void * param_buffer );
5
6
#else
6
7
static inline void init_prmt (void ) { }
8
+ static inline int acpi_call_prm_handler (guid_t handler_guid , void * param_buffer )
9
+ {
10
+ return - EOPNOTSUPP ;
11
+ }
7
12
#endif
You can’t perform that action at this time.
0 commit comments