On 24 March 2016 at 21:30, Leo Duran <leo.du...@amd.com> wrote:
> From: Leendert van Doorn <leend...@paramecium.org>
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Leo Duran <leo.du...@amd.com>

This patch needs to be merged with the patch that changes the type of
the PCD, or we will potentially break bisect.

$ git grep -l -E 'PcdGet32[(\s]*PcdCpuVectorBaseAddress'
ArmPkg/ArmPkg.dec
ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c
BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.S
BeagleBoardPkg/Sec/Arm/ModuleEntryPoint.asm
EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c

Ideally, BeagleBoardPkg should be updated in the same patch, but since
FixedPcdGet32() actually resolves to an immediate value, it is
unlikely to cause any trouble.
But PcdGet32() (without the fix) resolves to a symbol reference, so
your two patches involving PcdCpuVectorBaseAddress should be folded
into one. I can take care of that though

Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org>


> ---
>  EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c 
> b/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c
> index 61c6184..2b353f0 100644
> --- a/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c
> +++ b/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c
> @@ -481,7 +481,7 @@ InFiqCrack (
>    IN UINT32 PC
>    )
>  {
> -  UINT32 VectorBase = PcdGet32 (PcdCpuVectorBaseAddress);
> +  UINT64 VectorBase = PcdGet64 (PcdCpuVectorBaseAddress);
>    UINT32 Length     = (UINTN)ExceptionHandlersEnd - 
> (UINTN)ExceptionHandlersStart;
>
>    if ((PC >= VectorBase) && (PC <= (VectorBase + Length))) {
> @@ -626,7 +626,7 @@ InitializeDebugAgent (
>    UINTN                Offset;
>    UINTN                Length;
>    BOOLEAN              IrqEnabled;
> -  UINT32               *VectorBase;
> +  UINT64               *VectorBase;
>
>
>    //
> @@ -644,7 +644,7 @@ InitializeDebugAgent (
>    //
>    // Reserve space for the exception handlers
>    //
> -  VectorBase = (UINT32 *)(UINTN)PcdGet32 (PcdCpuVectorBaseAddress);
> +  VectorBase = (UINT64 *)(UINTN)PcdGet64 (PcdCpuVectorBaseAddress);
>
>
>    // Copy our assembly code into the page that contains the exception 
> vectors.
> @@ -657,7 +657,7 @@ InitializeDebugAgent (
>    *(UINTN *) (((UINT8 *)VectorBase) + Offset) = 
> (UINTN)AsmCommonExceptionEntry;
>
>    // Flush Caches since we updated executable stuff
> -  InvalidateInstructionCacheRange ((VOID 
> *)PcdGet32(PcdCpuVectorBaseAddress), Length);
> +  InvalidateInstructionCacheRange ((VOID 
> *)PcdGet64(PcdCpuVectorBaseAddress), Length);
>
>    // setup a timer so gdb can break in via ctrl-c
>    DebugAgentTimerIntialize ();
> --
> 1.9.1
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to