gic_v3_redistributor.cc (14010:0e1e887507c0) | gic_v3_redistributor.cc (14227:af80b8fab43b) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2019 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated 11 * unmodified and in its entirety in all distributions of the software, 12 * modified or unmodified, in source code or in binary form. 13 * |
|
2 * Copyright (c) 2018 Metempsy Technology Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; 9 * redistributions in binary form must reproduce the above copyright --- 715 unchanged lines hidden (view full) --- 725} 726 727void 728Gicv3Redistributor::sendSGI(uint32_t int_id, Gicv3::GroupId group, bool ns) 729{ 730 assert(int_id < Gicv3::SGI_MAX); 731 Gicv3::GroupId int_group = getIntGroup(int_id); 732 | 14 * Copyright (c) 2018 Metempsy Technology Consulting 15 * All rights reserved. 16 * 17 * Redistribution and use in source and binary forms, with or without 18 * modification, are permitted provided that the following conditions are 19 * met: redistributions of source code must retain the above copyright 20 * notice, this list of conditions and the following disclaimer; 21 * redistributions in binary form must reproduce the above copyright --- 715 unchanged lines hidden (view full) --- 737} 738 739void 740Gicv3Redistributor::sendSGI(uint32_t int_id, Gicv3::GroupId group, bool ns) 741{ 742 assert(int_id < Gicv3::SGI_MAX); 743 Gicv3::GroupId int_group = getIntGroup(int_id); 744 |
733 // asked for secure group 1 734 // configured as group 0 735 // send group 0 736 if (int_group == Gicv3::G0S && group == Gicv3::G1S) { 737 group = Gicv3::G0S; 738 } | 745 bool forward = false; |
739 | 746 |
740 if (group == Gicv3::G0S and int_group != Gicv3::G0S) { 741 return; 742 } 743 744 if (ns && distributor->DS == 0) { | 747 if (ns) { 748 // Non-Secure EL1 and EL2 access |
745 int nsaccess = irqNsacr[int_id]; | 749 int nsaccess = irqNsacr[int_id]; |
750 if (int_group == Gicv3::G0S) { |
|
746 | 751 |
747 if ((int_group == Gicv3::G0S && nsaccess < 1) || 748 (int_group == Gicv3::G1S && nsaccess < 2)) { 749 return; | 752 forward = distributor->DS || (nsaccess >= 1); 753 754 } else if (int_group == Gicv3::G1S) { 755 forward = ((group == Gicv3::G1S || group == Gicv3::G1NS ) && 756 nsaccess == 2); 757 } else { 758 // G1NS 759 forward = group == Gicv3::G1NS; |
750 } | 760 } |
761 } else { 762 // Secure EL1 and EL3 access 763 forward = (group == int_group) || 764 (group == Gicv3::G1S && int_group == Gicv3::G0S && 765 distributor->DS); |
|
751 } 752 | 766 } 767 |
768 if (!forward) return; 769 |
|
753 irqPending[int_id] = true; 754 DPRINTF(GIC, "Gicv3ReDistributor::sendSGI(): " 755 "int_id %d (SGI) pending bit set\n", int_id); 756 updateAndInformCPUInterface(); 757} 758 759Gicv3::IntStatus 760Gicv3Redistributor::intStatus(uint32_t int_id) const --- 316 unchanged lines hidden --- | 770 irqPending[int_id] = true; 771 DPRINTF(GIC, "Gicv3ReDistributor::sendSGI(): " 772 "int_id %d (SGI) pending bit set\n", int_id); 773 updateAndInformCPUInterface(); 774} 775 776Gicv3::IntStatus 777Gicv3Redistributor::intStatus(uint32_t int_id) const --- 316 unchanged lines hidden --- |