arm-trusted-firmware/bl31
Antonio Nino Diaz 4abd7fa71f Redefine SMC_UNK as -1 instead of 0xFFFFFFFF
According to the SMC Calling Convention (ARM DEN0028B):

    The Unknown SMC Function Identifier is a sign-extended value of
    (-1) that is returned in R0, W0 or X0 register.

The value wasn't sign-extended because it was defined as a 32-bit
unsigned value (0xFFFFFFFF).

SMC_PREEMPT has been redefined as -2 for the same reason.

NOTE: This might be a compatibility break for some AArch64 platforms
that don't follow the previous version of the SMCCC (ARM DEN0028A)
correctly. That document specifies that only the bottom 32 bits of the
returned value must be checked. If a platform relies on the top 32 bits
of the result being 0 (so that SMC_UNK is 0x00000000FFFFFFFF), it will
have to fix its code to comply with the SMCCC.

Change-Id: I7f7b109f6b30c114fe570aa0ead3c335383cb54d
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-02-15 15:04:34 +00:00
..
aarch64 Redefine SMC_UNK as -1 instead of 0xFFFFFFFF 2018-02-15 15:04:34 +00:00
bl31.ld.S Replace magic numbers in linkerscripts by PAGE_SIZE 2017-11-29 12:09:52 +00:00
bl31.mk Implement support for SMCCC v1.1 2018-01-29 09:58:57 +00:00
bl31_context_mgmt.c Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
bl31_main.c BL31: Introduce Exception Handling Framework 2017-11-13 07:49:30 +00:00
ehf.c BL31: Program Priority Mask for SMC handling 2017-11-13 07:49:30 +00:00
interrupt_mgmt.c Use SPDX license identifiers 2017-05-03 09:39:28 +01:00