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

Changeset 6aeb60f in mainline


Ignore:
Timestamp:
2019-05-16T22:26:49Z (22 months ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
aeeaf0f
Parents:
a548528
git-author:
Jakub Jermar <jakub@…> (2019-05-16 22:08:53)
git-committer:
Jakub Jermar <jakub@…> (2019-05-16 22:26:49)
Message:

Fix pos to be an offset of entry

pos needs to also include the first 8 bytes of multiboot2_tag_t so that
it represents an offset from the beginning of the tag and points to
entry.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/multiboot/multiboot2.c

    ra548528 r6aeb60f  
    6565        multiboot2_memmap_entry_t *entry = (multiboot2_memmap_entry_t *)
    6666            ((uintptr_t) memmap + sizeof(*memmap));
    67         uint32_t pos = sizeof(*memmap);
     67        uint32_t pos = offsetof(multiboot2_tag_t, memmap) + sizeof(*memmap);
    6868
    6969        while ((pos < length) && (e820counter < MEMMAP_E820_MAX_RECORDS)) {
Note: See TracChangeset for help on using the changeset viewer.