mirror of
https://github.com/SciresM/hactool
synced 2024-11-29 07:20:26 +00:00
npdm: fix display of address/size for mmio
This commit is contained in:
parent
32c26a12ad
commit
09e01d5dd7
1 changed files with 2 additions and 2 deletions
4
npdm.c
4
npdm.c
|
@ -304,7 +304,7 @@ void kac_print(const uint32_t *descriptors, uint32_t num_descriptors) {
|
||||||
break;
|
break;
|
||||||
case 6: /* Map IO/Normal. */
|
case 6: /* Map IO/Normal. */
|
||||||
cur_mmio = calloc(1, sizeof(kac_mmio_t));
|
cur_mmio = calloc(1, sizeof(kac_mmio_t));
|
||||||
cur_mmio->address = (desc & 0xFFFFFF) << 12;
|
cur_mmio->address = (uint64_t)(desc & 0xFFFFFF) << 12;
|
||||||
cur_mmio->is_ro = desc >> 24;
|
cur_mmio->is_ro = desc >> 24;
|
||||||
if (i == num_descriptors - 1) {
|
if (i == num_descriptors - 1) {
|
||||||
fprintf(stderr, "Error: Invalid Kernel Access Control Descriptors!\n");
|
fprintf(stderr, "Error: Invalid Kernel Access Control Descriptors!\n");
|
||||||
|
@ -316,7 +316,7 @@ void kac_print(const uint32_t *descriptors, uint32_t num_descriptors) {
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
desc >>= 7;
|
desc >>= 7;
|
||||||
cur_mmio->size = (desc & 0xFFFFFF) << 12;
|
cur_mmio->size = (uint64_t)(desc & 0xFFFFFF) << 12;
|
||||||
cur_mmio->is_norm = desc >> 24;
|
cur_mmio->is_norm = desc >> 24;
|
||||||
kac_add_mmio(&kac, cur_mmio);
|
kac_add_mmio(&kac, cur_mmio);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue