eal/x86: fix 32-bit write-combined stores
PATCH 1/1 eal/x86: fix 32-bit write-combined stores
The "movdiri" instruction is given as a series of bytes in rte_io.h so that it works on compilers/assemblers which are unaware of the instruction. The REX prefix (0x40) on this instruction is invalid for 32-bit code, causing issues. Thankfully, the prefix is unnecessary in 64-bit code, since the data size used is 32-bits.
--- lib/eal/x86/include/rte_io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/eal/x86/include/rte_io.h +1 -1
@@ -24,7 +24,7 @@ __rte_x86_movdiri(uint32_t value, volatile void *addr) { asmvolatile (/* MOVDIRI */ -".byte 0x40, 0x0f, 0x38, 0xf9, 0x02" +".byte 0x0f, 0x38, 0xf9, 0x02" : :"a" (value),"d" (addr)); }
--
2.43.0
Quoted 6 lines · Bruce Richardson
The "movdiri" instruction is given as a series of bytes in
rte_io.hso that it works on compilers/assemblers which are unaware of the instruction. The REX prefix (0x40) on this instruction is invalid for 32-bit code, causing issues. Thankfully, the prefix is unnecessary in 64-bit code, since the data size used is 32-bits.
Quoted 6 lines
Signed-off-by Bruce Richardson <[email protected]>---
Quoted 6 lines · Bruce Richardson
The "movdiri" instruction is given as a series of bytes in
rte_io.hso that it works on compilers/assemblers which are unaware of the instruction. The REX prefix (0x40) on this instruction is invalid for 32-bit code, causing issues. Thankfully, the prefix is unnecessary in 64-bit code, since the data size used is 32-bits.
Quoted 6 lines
Signed-off-by Bruce Richardson <[email protected]>---
Quoted 11 lines · Bruce Richardson
The "movdiri" instruction is given as a series of bytes in
rte_io.hso that it works on compilers/assemblers which are unaware of the instruction. The REX prefix (0x40) on this instruction is invalid for 32-bit code, causing issues. Thankfully, the prefix is unnecessary in 64-bit code, since the data size used is 32-bits.Fixes 8a00dfc738fe ("eal: add write combining store")Signed-off-by Bruce Richardson <[email protected]>
Thanks for the fix, and reviews.
Applied.
Signature · 1 line
David Marchand