From 0602e40cced78cbff179be626682d40546879c4a Mon Sep 17 00:00:00 2001 From: mintsuki Date: Sat, 22 May 2021 10:13:06 +0200 Subject: [PATCH] stivale2: Actually pass tag pointers in linked list in the higher half if requested --- stage23/protos/stivale2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stage23/protos/stivale2.c b/stage23/protos/stivale2.c index 3ffda050..1d372820 100644 --- a/stage23/protos/stivale2.c +++ b/stage23/protos/stivale2.c @@ -49,10 +49,10 @@ static void *get_tag(struct stivale2_header *s, uint64_t id) { } } -static void append_tag(struct stivale2_struct *s, struct stivale2_tag *tag) { - tag->next = s->tags; - s->tags = (uint64_t)(size_t)tag; -} +#define append_tag(S, TAG) ({ \ + (TAG)->next = (S)->tags; \ + (S)->tags = REPORTED_ADDR((uint64_t)(uintptr_t)TAG); \ +}) #if defined (bios) extern symbol stivale2_term_write_entry;