From patchwork Thu Mar 24 20:30:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Duran, Leo" X-Patchwork-Id: 64422 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp881878lbc; Thu, 24 Mar 2016 13:31:31 -0700 (PDT) X-Received: by 10.98.13.216 with SMTP id 85mr15395287pfn.143.1458851488010; Thu, 24 Mar 2016 13:31:28 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id f86si14339567pfd.122.2016.03.24.13.31.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Mar 2016 13:31:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@amdcloud.onmicrosoft.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DF31F1A1EF2; Thu, 24 Mar 2016 13:31:50 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0605.outbound.protection.outlook.com [IPv6:2a01:111:f400:fc09::605]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9E5A11A1ECB for ; Thu, 24 Mar 2016 13:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=TIUVzy/ZZVRyCJrMpfhX+0H+yKHhPnldDsbubb3RYBQ=; b=s7E40tOvgE+8STddqfpy7eQftORmK8p07r+QgrNBSdfgy8x+s1Hah82WGxRCHuqcCDeA4ZMkoXw9DQzT9N/9aGPqJq3qb47e5O4DbWG3pjBhwpRdPKMFl50/SbAAmtyyMA/O7i4DRKfaaB8KdbF8ewctZh8NlCix6ekQRcIqIeE= Authentication-Results: lists.01.org; dkim=none (message not signed) header.d=none; lists.01.org; dmarc=none action=none header.from=amd.com; Received: from leduran-Precision-WorkStation-T5400.vendor.access.domain (165.204.77.2) by BLUPR12MB0516.namprd12.prod.outlook.com (10.162.92.18) with Microsoft SMTP Server (TLS) id 15.1.434.16; Thu, 24 Mar 2016 20:31:21 +0000 From: Leo Duran To: Date: Thu, 24 Mar 2016 15:30:07 -0500 Message-ID: <1458851413-26577-3-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458851413-26577-1-git-send-email-leo.duran@amd.com> References: <1458851413-26577-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.2] X-ClientProxiedBy: SN1PR07CA0021.namprd07.prod.outlook.com (25.162.170.159) To BLUPR12MB0516.namprd12.prod.outlook.com (25.162.92.18) X-MS-Office365-Filtering-Correlation-Id: b8db00e8-5575-4934-310d-08d354234348 X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0516; 2:Gb1GAsEMWXpAH5FIoCtzyEd9/H6B3ipkzs8oIO00SjCFm1RJH7YVwr9YhC5FTeVWNlkpUnHwyusrNrU8RD5hFqs425Ec3aSGNuGvvI0aP3odu/vgDylUHDwTGhIAgR0BNeOu77trgysiZ1K9jaKtbzWdRTzKSloU2e/VrqPTKvzbPQ4ro5/4rQqLHUJeEtDP; 3:GXWnQVFcSEdzJvhlNqyGjQFoWmGnSv/H7PMiNXpB1f47yXP9PGYZyaxJVU6q9IPLwjR8CyJHPB9FnGl33WEOZWR9kExCL7PkCwjlNsFd6CjDCIFDtfNThB16XSXRy/nu; 25:9sVSXbfJgna+IUWaHmYz0veh9TjGYmb7D3p7z8mpMSi2nqEX5IYqyKvyw6uY87kxLgPOYeE1tC5jmTT31p7D0Zsu3VPiLoYxBMa5451eRZy7cMGlLntFMkrEtMRGlR60DW0mGIBVj5PcMxNucyE5npm15S0KuEsRuubQB54wYHW8kPzHs2TY6YufbFl98f9NrBziMIszarel6dtphPUzDN3kVejE1ahIt71qjhQlAficXX96m6D3IPY4tVmIf1V9fkFxpxpxsc8JQt49IbbDcWyX7/2Q9okEeemVloT8J74qZ3oLmkoddjANpx5mYJRXCvz1ARSGovKqFI4Gq1md7Z/KozQBO+4PtcQxUnipbyGQK7Tm996GlFDmXlAdAoVGu6IkCfi91pd6AFY+plpdNz0wVgBhVo10ANdw06x+Xr0Z1kKpeFZfl8nRK5EEmetWZaqra1xi/imEhhQOWg1iDhBlhZcY/+WMUenb4PhScpyIrLMK6a80E4q2jTBZJKjVxO1sq8sMDNWE9P6b3HssJvOPvnJrJ5zgOzefPtLcz6HdjLRTBymI0N+H87i5I2jg X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR12MB0516; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0516; 20:38SWMQqsOUOX1JQ8rPV5JShNIdHJ3cydKR7Xp/X9A0q7yjTiZXjPz5EueSbUeeq2Qzd2QLvc23fwA3Tcqj9LB9pIXwq5n8YsRth06395fd8r4zF2UgO32dk8kBGr2h72+HEQR0FW0wLclG4ye6SlN6vgmrUBeMn+tXUvEGgPpq9CiI3uwzLPovAByijvdsYrvT6qFoBzT6lSGl7plpPE9RtMy5oECW8O9HAAVJXRNTvFLC8vbQSxwwMRxvjiq0OifHwT5X6dfePKzo10M6692+mYxItPEZOEMwz0n9nisEuP3bhVFxrEVjVhqe189TWpR34DfrpaRL7SzsoJtUWn9/LpiQoKvEUi0+bsxzno2HzfQI5A84rULN0qN4x0tC/2ubA99qwGXd512kHMa3tAvLGQmtAqqN7X4kIQZl0utGfFAADC8YCgEpwILtDcpN6U5vy2wPOVEzZut6BMU8J+Jn6cbQ12RIZiBqz5hEXrB8/YaXuPkVVvKq5tKwY4lrtx; 4:6qNxcj5hlnUscngXn0FwQPti8/xlNLmE/+ITa32UmscS4XP9wVVUEWB9uqvMD6X6QlmJ7ksxTj+eJx4wdWTkqvYCKYIX+JmUojhhp1Dvp3I7t9CSh9MhkhKIekxwZxm1W51Xg+XOXXqf4XwEkrViljuqMFogpdti/AUlMG/hblZhHXtQQDCrmRNpublLa0YOLNHX+fl6aEYl3oMBv17naDYprQD8rPRWj49DnN0T4FtOeEvOdPeYfejHX/rewkCgCmjzYjoI69T/C7pHzSe2dDrE+v3244tnTsvy/A/Ob43D06ZNJTfTT517apMMF5AV5v5V7n0Hj4UpoKzQm51b4EdMu/DCsNClOtsLVhdX4e16kBaSAicE9rlyTfvxD7gi X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BLUPR12MB0516; BCL:0; PCL:0; RULEID:; SRVR:BLUPR12MB0516; X-Forefront-PRVS: 0891BC3F3D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(229853001)(2950100001)(2351001)(586003)(86362001)(2906002)(3846002)(77096005)(6116002)(19580395003)(47776003)(19580405001)(5008740100001)(33646002)(5003940100001)(66066001)(1096002)(5004730100002)(4326007)(76176999)(50986999)(15650500001)(189998001)(36756003)(42186005)(110136002)(50466002)(48376002)(81166005)(50226001)(92566002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0516; H:leduran-Precision-WorkStation-T5400.vendor.access.domain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0516; 23:PUeiy9JiO7pUyHK/xhLHcvv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+zpvYUJTa6g==; 24:YSp6pezdETvTtwk71+tDQWRDZKEDjtElwRjclX9e4Sud5IM/eKFboGKcVIQTRrX+VNQIN5DtVP1fXmrSgVt5CjNXhsuOr4iDj9Q0NNthjnI=; 20:N/7et6cI9x+uXt8HmbHqUavXM/JszIDbT06p08/oajo1VShNGVbMrPVwnH4HRkrBD9Q+Fy5sMnR618CQwaNp4lTVqnxq6KsqA8oBjqLICm7tJODga9rldRfqV3Sx4bvoqzfwF+49voltuQ6Q0jgR5sW/CMYBjPbX7EVtyGUYZk5JPKEXJd+Cl5kVol09ssAwY2KV1gW/G313b91a5N/f5NRNbx5FfxLG+UD7gv2jHOjRDvWTtlW0KhNEm1jbyx5K X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2016 20:31:21.5796 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0516 Subject: [edk2] [PATCH] ArmPlatformPkg: fixups for 64-bit mailbox pointers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Leo Duran , leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran --- ArmPlatformPkg/PrePeiCore/MainMPCore.c | 10 ++++++++-- ArmPlatformPkg/PrePi/MainMPCore.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) -- 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPlatformPkg/PrePeiCore/MainMPCore.c b/ArmPlatformPkg/PrePeiCore/MainMPCore.c index fa544c7..8309f62 100644 --- a/ArmPlatformPkg/PrePeiCore/MainMPCore.c +++ b/ArmPlatformPkg/PrePeiCore/MainMPCore.c @@ -80,13 +80,19 @@ SecondaryMain ( ASSERT (Index != ArmCoreCount); // Clear Secondary cores MailBox - MmioWrite32 (ArmCoreInfoTable[Index].MailboxClearAddress, ArmCoreInfoTable[Index].MailboxClearValue); + if (sizeof(UINTN) == sizeof(UINT64)) + MmioWrite64 (ArmCoreInfoTable[Index].MailboxClearAddress, ArmCoreInfoTable[Index].MailboxClearValue); + else + MmioWrite32 (ArmCoreInfoTable[Index].MailboxClearAddress, ArmCoreInfoTable[Index].MailboxClearValue); do { ArmCallWFI (); // Read the Mailbox - SecondaryEntryAddr = MmioRead32 (ArmCoreInfoTable[Index].MailboxGetAddress); + if (sizeof(UINTN) == sizeof(UINT64)) + SecondaryEntryAddr = MmioRead64 (ArmCoreInfoTable[Index].MailboxGetAddress); + else + SecondaryEntryAddr = MmioRead32 (ArmCoreInfoTable[Index].MailboxGetAddress); // Acknowledge the interrupt and send End of Interrupt signal. AcknowledgeInterrupt = ArmGicAcknowledgeInterrupt (PcdGet32 (PcdGicInterruptInterfaceBase), &InterruptId); diff --git a/ArmPlatformPkg/PrePi/MainMPCore.c b/ArmPlatformPkg/PrePi/MainMPCore.c index 603f4bb..d7e2352 100644 --- a/ArmPlatformPkg/PrePi/MainMPCore.c +++ b/ArmPlatformPkg/PrePi/MainMPCore.c @@ -79,13 +79,19 @@ SecondaryMain ( ASSERT (Index != ArmCoreCount); // Clear Secondary cores MailBox - MmioWrite32 (ArmCoreInfoTable[Index].MailboxClearAddress, ArmCoreInfoTable[Index].MailboxClearValue); + if (sizeof(UINTN) == sizeof(UINT64)) + MmioWrite64 (ArmCoreInfoTable[Index].MailboxClearAddress, ArmCoreInfoTable[Index].MailboxClearValue); + else + MmioWrite32 (ArmCoreInfoTable[Index].MailboxClearAddress, ArmCoreInfoTable[Index].MailboxClearValue); do { ArmCallWFI (); // Read the Mailbox - SecondaryEntryAddr = MmioRead32 (ArmCoreInfoTable[Index].MailboxGetAddress); + if (sizeof(UINTN) == sizeof(UINT64)) + SecondaryEntryAddr = MmioRead64 (ArmCoreInfoTable[Index].MailboxGetAddress); + else + SecondaryEntryAddr = MmioRead32 (ArmCoreInfoTable[Index].MailboxGetAddress); // Acknowledge the interrupt and send End of Interrupt signal. AcknowledgeInterrupt = ArmGicAcknowledgeInterrupt (PcdGet32 (PcdGicInterruptInterfaceBase), &InterruptId);