-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-arm: Handle translation aborts and add IRQ support to the SMMU (#920
) At the moment the SMMU is not handling translation errors gracefully the way it is described by the SMMUv3 spec: whenever a translation fault arises, simulation aborts as a whole. With this PR we add minimal support for translation fault handling, which means: 1) Not aborting simulation, but rather: 2) Writing an event entry to the SMMU_EVENTQ (event queue) 3) Signaling the PE an error arose and there is an event entry to be consumed. The signaling is achieved with the addition of the eventq SPI. Using an MSI is also possible though it is currently disabled by the SMMU_IDR0.MSI being set to zero. The PR is addressing issues reported by https://github.com/orgs/gem5/discussions/898
- Loading branch information
Showing
9 changed files
with
389 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) 2024 Arm Limited | ||
* All rights reserved | ||
* | ||
* The license below extends only to copyright in the software and shall | ||
* not be construed as granting a license to any other intellectual | ||
* property including but not limited to intellectual property relating | ||
* to a hardware implementation of the functionality of the software | ||
* licensed hereunder. You may use the software subject to the license | ||
* terms below provided that you ensure that this notice is replicated | ||
* unmodified and in its entirety in all distributions of the software, | ||
* modified or unmodified, in source code or in binary form. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are | ||
* met: redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer; | ||
* redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution; | ||
* neither the name of the copyright holders nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#include "dev/arm/smmu_v3_defs.hh" | ||
|
||
namespace gem5 | ||
{ | ||
|
||
std::string | ||
SMMUEvent::print() const | ||
{ | ||
return csprintf("type=%#x sid=%#x ssid=%#x va=%#08x\n", | ||
data.dw0.eventType, data.dw0.streamId, data.dw0.substreamId, | ||
data.dw2.inputAddr); | ||
} | ||
|
||
} // namespace gem5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.