gic_v3_redistributor.cc (13928:7809a562b8cd) | gic_v3_redistributor.cc (14010:0e1e887507c0) |
---|---|
1/* 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; --- 801 unchanged lines hidden (view full) --- 810 811 const uint32_t largest_lpi_id = 1 << (lpiIDBits + 1); 812 const uint32_t number_lpis = largest_lpi_id - SMALLEST_LPI_ID + 1; 813 814 uint8_t lpi_pending_table[largest_lpi_id / 8]; 815 uint8_t lpi_config_table[number_lpis]; 816 817 memProxy->readBlob(lpiPendingTablePtr, | 1/* 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; --- 801 unchanged lines hidden (view full) --- 810 811 const uint32_t largest_lpi_id = 1 << (lpiIDBits + 1); 812 const uint32_t number_lpis = largest_lpi_id - SMALLEST_LPI_ID + 1; 813 814 uint8_t lpi_pending_table[largest_lpi_id / 8]; 815 uint8_t lpi_config_table[number_lpis]; 816 817 memProxy->readBlob(lpiPendingTablePtr, |
818 (uint8_t *) lpi_pending_table, | 818 lpi_pending_table, |
819 sizeof(lpi_pending_table)); 820 821 memProxy->readBlob(lpiConfigurationTablePtr, | 819 sizeof(lpi_pending_table)); 820 821 memProxy->readBlob(lpiConfigurationTablePtr, |
822 (uint8_t*) lpi_config_table, | 822 lpi_config_table, |
823 sizeof(lpi_config_table)); 824 825 for (int lpi_id = SMALLEST_LPI_ID; lpi_id < largest_lpi_id; 826 lpi_id++) { 827 uint32_t lpi_pending_entry_byte = lpi_id / 8; 828 uint8_t lpi_pending_entry_bit_position = lpi_id % 8; 829 bool lpi_is_pending = lpi_pending_table[lpi_pending_entry_byte] & 830 1 << lpi_pending_entry_bit_position; --- 33 unchanged lines hidden (view full) --- 864 865uint8_t 866Gicv3Redistributor::readEntryLPI(uint32_t lpi_id) 867{ 868 Addr lpi_pending_entry_ptr = lpiPendingTablePtr + (lpi_id / 8); 869 870 uint8_t lpi_pending_entry; 871 memProxy->readBlob(lpi_pending_entry_ptr, | 823 sizeof(lpi_config_table)); 824 825 for (int lpi_id = SMALLEST_LPI_ID; lpi_id < largest_lpi_id; 826 lpi_id++) { 827 uint32_t lpi_pending_entry_byte = lpi_id / 8; 828 uint8_t lpi_pending_entry_bit_position = lpi_id % 8; 829 bool lpi_is_pending = lpi_pending_table[lpi_pending_entry_byte] & 830 1 << lpi_pending_entry_bit_position; --- 33 unchanged lines hidden (view full) --- 864 865uint8_t 866Gicv3Redistributor::readEntryLPI(uint32_t lpi_id) 867{ 868 Addr lpi_pending_entry_ptr = lpiPendingTablePtr + (lpi_id / 8); 869 870 uint8_t lpi_pending_entry; 871 memProxy->readBlob(lpi_pending_entry_ptr, |
872 (uint8_t*) &lpi_pending_entry, | 872 &lpi_pending_entry, |
873 sizeof(lpi_pending_entry)); 874 875 return lpi_pending_entry; 876} 877 878void 879Gicv3Redistributor::writeEntryLPI(uint32_t lpi_id, uint8_t lpi_pending_entry) 880{ 881 Addr lpi_pending_entry_ptr = lpiPendingTablePtr + (lpi_id / 8); 882 883 memProxy->writeBlob(lpi_pending_entry_ptr, | 873 sizeof(lpi_pending_entry)); 874 875 return lpi_pending_entry; 876} 877 878void 879Gicv3Redistributor::writeEntryLPI(uint32_t lpi_id, uint8_t lpi_pending_entry) 880{ 881 Addr lpi_pending_entry_ptr = lpiPendingTablePtr + (lpi_id / 8); 882 883 memProxy->writeBlob(lpi_pending_entry_ptr, |
884 (uint8_t*) &lpi_pending_entry, | 884 &lpi_pending_entry, |
885 sizeof(lpi_pending_entry)); 886} 887 888bool 889Gicv3Redistributor::isPendingLPI(uint32_t lpi_id) 890{ 891 // Fetch the LPI pending entry from memory 892 uint8_t lpi_pending_entry = readEntryLPI(lpi_id); --- 184 unchanged lines hidden --- | 885 sizeof(lpi_pending_entry)); 886} 887 888bool 889Gicv3Redistributor::isPendingLPI(uint32_t lpi_id) 890{ 891 // Fetch the LPI pending entry from memory 892 uint8_t lpi_pending_entry = readEntryLPI(lpi_id); --- 184 unchanged lines hidden --- |