Re: [PATCH v2 09/21] arm: socfpga: Define SMC function identifiers for PSCI SiP services
On 2/20/20 2:42 AM, Ang, Chee Hong wrote: >> On 2/19/20 1:25 PM, chee.hong@intel.com wrote: >> [...] >>> +++ b/include/linux/intel-smc.h >>> @@ -0,0 +1,374 @@ >>> +/* SPDX-License-Identifier: GPL-2.0 */ >>> +/* >>> + * Copyright (C) 2017-2018, Intel Corporation >> >> 2020 ? > This file is new in U-Boot but it already exists in Linux kernel and adapted > from there. > Should I change it to 2020 ? Then it's 2017-2020 . [...]
RE: [PATCH v2 09/21] arm: socfpga: Define SMC function identifiers for PSCI SiP services
> On 2/19/20 1:25 PM, chee.hong@intel.com wrote: > [...] > > +++ b/include/linux/intel-smc.h > > @@ -0,0 +1,374 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +/* > > + * Copyright (C) 2017-2018, Intel Corporation > > 2020 ? This file is new in U-Boot but it already exists in Linux kernel and adapted from there. Should I change it to 2020 ? > > [...] > > > + */ > > +#define INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION > 0x > > +#define INTEL_SIP_SMC_STATUS_OK0x0 > > +#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY 0x1 > > +#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_REJECTED 0x2 > > +#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR 0x4 > > +#define INTEL_SIP_SMC_REG_ERROR0x5 > > +#define INTEL_SIP_SMC_RSU_ERROR0x7 > > Indent with tabs OK. > > [...] > > > +/* > > + * Request INTEL_SIP_SMC_MBOX_SEND_CMD > > + * > > + * Sync call used by service driver at EL1 to send mailbox command to SDM > > + * > > + * Call register usage: > > + * a0 INTEL_SIP_SMC_MBOX_SEND_CMD > > + * a1 Mailbox command > > + * a2 64bit physical address pointer to command's arguments > > + * a3 Length of the argument > > + * a4 Urgent command enable = 1 / disable = 0 > > + * a5 64bit physical address pointer to a buffer for receiving responses > > + * a6 Length of the buffer > > + * > > + * Return status > > + * a0 INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_RSU_ERROR. > > + * a1 Status of mailbox response > > + * a2 64bit physical address pointer to a buffer for receiving responses > > + * a3 Received length in the buffer > > + */ > > +#define INTEL_SIP_SMC_FUNCID_MBOX_SEND_CMD 30 > > +#define INTEL_SIP_SMC_MBOX_SEND_CMD \ > > + > INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_MBOX_SEN > D_CMD) > > Is this macro a function call or a value ? It adds some value on top of ' INTEL_SIP_SMC_FUNCID_MBOX_SEND_CMD ' through some bitwise operation to produce a final value. So it's a value.
Re: [PATCH v2 09/21] arm: socfpga: Define SMC function identifiers for PSCI SiP services
On 2/19/20 1:25 PM, chee.hong@intel.com wrote: [...] > +++ b/include/linux/intel-smc.h > @@ -0,0 +1,374 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (C) 2017-2018, Intel Corporation 2020 ? [...] > + */ > +#define INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION0x > +#define INTEL_SIP_SMC_STATUS_OK 0x0 > +#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY0x1 > +#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_REJECTED 0x2 > +#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR 0x4 > +#define INTEL_SIP_SMC_REG_ERROR 0x5 > +#define INTEL_SIP_SMC_RSU_ERROR 0x7 Indent with tabs [...] > +/* > + * Request INTEL_SIP_SMC_MBOX_SEND_CMD > + * > + * Sync call used by service driver at EL1 to send mailbox command to SDM > + * > + * Call register usage: > + * a0 INTEL_SIP_SMC_MBOX_SEND_CMD > + * a1 Mailbox command > + * a2 64bit physical address pointer to command's arguments > + * a3 Length of the argument > + * a4 Urgent command enable = 1 / disable = 0 > + * a5 64bit physical address pointer to a buffer for receiving responses > + * a6 Length of the buffer > + * > + * Return status > + * a0 INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_RSU_ERROR. > + * a1 Status of mailbox response > + * a2 64bit physical address pointer to a buffer for receiving responses > + * a3 Received length in the buffer > + */ > +#define INTEL_SIP_SMC_FUNCID_MBOX_SEND_CMD 30 > +#define INTEL_SIP_SMC_MBOX_SEND_CMD \ > + INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_MBOX_SEND_CMD) Is this macro a function call or a value ?