Commit 5eeb31dc authored by Jaco Hofmann's avatar Jaco Hofmann
Browse files

Fix off-by-one error for pba readout

parent 36a93632
......@@ -78,11 +78,14 @@ protected:
platform_read_ctl(tapasco.platform_device(), base_addr, sizeof(intr.interrupts[i].vector_control), &intr.interrupts[i].vector_control, PLATFORM_CTL_FLAGS_RAW);
base_addr += 4;
}
base_addr = 0x508000;
for(int i = 0; i < 1 + (total_interrupts / 64) + ((total_interrupts % 64) != 0); ++i) {
int pba_vecs = (total_interrupts / 64) + ((total_interrupts % 64) != 0);
for(int i = 0; i < pba_vecs; ++i) {
platform_read_ctl(tapasco.platform_device(), base_addr, sizeof(intr.pba[i]), &intr.pba[i], PLATFORM_CTL_FLAGS_RAW);
base_addr += 8;
}
base_addr = 0x508100;
platform_read_ctl(tapasco.platform_device(), base_addr, sizeof(intr.core_id), &intr.core_id, PLATFORM_CTL_FLAGS_RAW);
base_addr += 4;
......@@ -173,4 +176,4 @@ private:
Tapasco &tapasco;
};
#endif
#endif
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment