Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset cbf528f in mainline


Ignore:
Timestamp:
2018-11-13T15:15:05Z (3 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
159c1525
Parents:
705ca2b
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-13 15:09:15)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-13 15:15:05)
Message:

Fix rsdp search

Forgot that sizeof(string) includes the NUL byte.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/acpi/acpi.c

    r705ca2b rcbf528f  
    171171}
    172172
     173typedef uint64_t _a64_t __attribute__((may_alias));
     174
    173175static uint8_t *search_rsdp(uint8_t *base, size_t len)
    174176{
     177        uint64_t signature = *(_a64_t *) RSDP_SIGNATURE;
     178
    175179        for (size_t i = 0; i < len; i += 16) {
    176                 if (memcmp(&base[i], RSDP_SIGNATURE, sizeof(RSDP_SIGNATURE)) == 0 &&
    177                     rsdp_check(&base[i]))
     180                if (*((_a64_t *) &base[i]) == signature && rsdp_check(&base[i]))
    178181                        return &base[i];
    179182        }
Note: See TracChangeset for help on using the changeset viewer.