mirror of
https://github.com/ipxe/ipxe
synced 2025-12-11 05:51:37 +03:00
[i386] Change semantics of __from_data16 and __from_text16
__from_data16 and __from_text16 now take a pointer to a
.data16/.text16 variable, and return the real-mode offset within the
appropriate segment. This matches the use case for every occurrence
of these macros, and prevents potential future bugs such as that fixed
in commit d51d80f. (The bug arose essentially because "&pointer" is
still syntactically valid.)
This commit is contained in:
@@ -147,7 +147,7 @@ static int meme820 ( struct memory_map *memmap ) {
|
||||
"=b" ( next ), "=D" ( discard_D ),
|
||||
"=c" ( discard_c ), "=d" ( discard_d )
|
||||
: "a" ( 0xe820 ), "b" ( next ),
|
||||
"D" ( &__from_data16 ( e820buf ) ),
|
||||
"D" ( __from_data16 ( &e820buf ) ),
|
||||
"c" ( sizeof ( e820buf ) ),
|
||||
"d" ( SMAP )
|
||||
: "memory" );
|
||||
|
||||
Reference in New Issue
Block a user