History

EDAC/altera, firmware/intel: Add Stratix10 ECC DBE SMC call

Reserve ECC Double Bit Error SMC call to alert U-Boot that a DBE has occurred. Move the call from local EDAC header file to a common header. [ bp: Merge the two patches. ] Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Richard Gong <richard.gong@intel.com> Reviewed-by: Alan Tull <atull@kernel.org> # firmware Cc: Greg KH <greg@kroah.com> Cc: James Morse <james.morse@arm.com> Cc: linux-edac <linux-edac@vger.kernel.org> Cc: mchehab@kernel.org Link: https://lkml.kernel.org/r/1553870639-23895-1-git-send-email-thor.thayer@linux.intel.com

Thor Thayer committed 7 years ago

Commit fad9fab1 parent 788586e3 files · +20 −83Browse files

Unified · Split

3 files
  1. drivers/edac/altera_edac.c +1 −0
  2. drivers/edac/altera_edac.h +0 −83
  3. include/linux/firmware/intel/stratix10-smc.h +19 −0
drivers/edac/altera_edac.c+1−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
9#include <linux/ctype.h>9#include <linux/ctype.h>
10#include <linux/delay.h>10#include <linux/delay.h>
11#include <linux/edac.h>11#include <linux/edac.h>
12#include <linux/firmware/intel/stratix10-smc.h>
12#include <linux/genalloc.h>13#include <linux/genalloc.h>
13#include <linux/interrupt.h>14#include <linux/interrupt.h>
14#include <linux/irqchip/chained_irq.h>15#include <linux/irqchip/chained_irq.h>
drivers/edac/altera_edac.h+0−83
@@ -372,87 +372,4 @@ struct altr_arria10_edac { · 371 unmodified lines
372 struct notifier_block panic_notifier;372 struct notifier_block panic_notifier;
373};373};
374 374
375/*
376 * Functions specified by ARM SMC Calling convention:
377 *
378 * FAST call executes atomic operations, returns when the requested operation
379 * has completed.
380 * STD call starts a operation which can be preempted by a non-secure
381 * interrupt. The call can return before the requested operation has
382 * completed.
383 *
384 * a0..a7 is used as register names in the descriptions below, on arm32
385 * that translates to r0..r7 and on arm64 to w0..w7.
386 */
387
388#define INTEL_SIP_SMC_STD_CALL_VAL(func_num) \
389 ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL, ARM_SMCCC_SMC_64, \
390 ARM_SMCCC_OWNER_SIP, (func_num))
391
392#define INTEL_SIP_SMC_FAST_CALL_VAL(func_num) \
393 ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, ARM_SMCCC_SMC_64, \
394 ARM_SMCCC_OWNER_SIP, (func_num))
395
396#define INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION 0xFFFFFFFF
397#define INTEL_SIP_SMC_STATUS_OK 0x0
398#define INTEL_SIP_SMC_REG_ERROR 0x5
399
400/*
401 * Request INTEL_SIP_SMC_REG_READ
402 *
403 * Read a protected register using SMCCC
404 *
405 * Call register usage:
406 * a0: INTEL_SIP_SMC_REG_READ.
407 * a1: register address.
408 * a2-7: not used.
409 *
410 * Return status:
411 * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_REG_ERROR, or
412 * INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION
413 * a1: Value in the register
414 * a2-3: not used.
415 */
416#define INTEL_SIP_SMC_FUNCID_REG_READ 7
417#define INTEL_SIP_SMC_REG_READ \
418 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_READ)
419
420/*
421 * Request INTEL_SIP_SMC_REG_WRITE
422 *
423 * Write a protected register using SMCCC
424 *
425 * Call register usage:
426 * a0: INTEL_SIP_SMC_REG_WRITE.
427 * a1: register address
428 * a2: value to program into register.
429 * a3-7: not used.
430 *
431 * Return status:
432 * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_REG_ERROR, or
433 * INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION
434 * a1-3: not used.
435 */
436#define INTEL_SIP_SMC_FUNCID_REG_WRITE 8
437#define INTEL_SIP_SMC_REG_WRITE \
438 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_WRITE)
439
440/*
441 * Request INTEL_SIP_SMC_ECC_DBE
442 *
443 * Sync call used by service driver at EL1 alert EL3 that a Double Bit
444 * ECC error has occurred.
445 *
446 * Call register usage:
447 * a0 INTEL_SIP_SMC_ECC_DBE
448 * a1 SysManager Double Bit Error value
449 * a2-7 not used
450 *
451 * Return status
452 * a0 INTEL_SIP_SMC_STATUS_OK
453 */
454#define INTEL_SIP_SMC_FUNCID_ECC_DBE 13
455#define INTEL_SIP_SMC_ECC_DBE \
456 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_ECC_DBE)
457
458#endif /* #ifndef _ALTERA_EDAC_H */375#endif /* #ifndef _ALTERA_EDAC_H */
include/linux/firmware/intel/stratix10-smc.h+19−0
@@ -309,4 +309,23 @@ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE) · 308 unmodified lines
309#define INTEL_SIP_SMC_FUNCID_RSU_UPDATE 12309#define INTEL_SIP_SMC_FUNCID_RSU_UPDATE 12
310#define INTEL_SIP_SMC_RSU_UPDATE \310#define INTEL_SIP_SMC_RSU_UPDATE \
311 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_UPDATE)311 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_UPDATE)
312
313/*
314 * Request INTEL_SIP_SMC_ECC_DBE
315 *
316 * Sync call used by service driver at EL1 to alert EL3 that a Double
317 * Bit ECC error has occurred.
318 *
319 * Call register usage:
320 * a0 INTEL_SIP_SMC_ECC_DBE
321 * a1 SysManager Double Bit Error value
322 * a2-7 not used
323 *
324 * Return status
325 * a0 INTEL_SIP_SMC_STATUS_OK
326 */
327#define INTEL_SIP_SMC_FUNCID_ECC_DBE 13
328#define INTEL_SIP_SMC_ECC_DBE \
329 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_ECC_DBE)
330
312#endif331#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t