<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/bios_emulator, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>bios_emulator: Add parens to xorl macro</title>
<updated>2025-07-29T19:14:47+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-07-23T10:34:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0fdcca86d87b3b723cdfc9901f02f14adba9df60'/>
<id>0fdcca86d87b3b723cdfc9901f02f14adba9df60</id>
<content type='text'>
The xorl macro lacked surrounding parens which meant that it could have
unexpected results when used in expressions. Fix this by adding the
surrounding parens to make its use predictable.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The xorl macro lacked surrounding parens which meant that it could have
unexpected results when used in expressions. Fix this by adding the
surrounding parens to make its use predictable.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bios_emulator: Fix buffer overflow</title>
<updated>2025-07-29T19:14:46+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-07-23T10:34:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4b8aba93bdba168f284036cd7f8cb0e988bf3f92'/>
<id>4b8aba93bdba168f284036cd7f8cb0e988bf3f92</id>
<content type='text'>
Using strcpy to copy a 4 character string into a 4 byte field in a
structure will overflow that field as it writes the terminating \0 into
the following field. Correct this by using memcpy instead.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using strcpy to copy a 4 character string into a 4 byte field in a
structure will overflow that field as it writes the terminating \0 into
the following field. Correct this by using memcpy instead.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bios_emulator: fix incorrect printing of address in "jump near immediate"</title>
<updated>2024-12-15T17:39:23+00:00</updated>
<author>
<name>Yuri Zaporozhets</name>
<email>yuriz@qrv-systems.net</email>
</author>
<published>2024-12-01T22:28:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ae12873de7e57c40f527e913ddcc4be067a70ab1'/>
<id>ae12873de7e57c40f527e913ddcc4be067a70ab1</id>
<content type='text'>
In the x86emuOp_jump_call_near_IMM() function the target address is
printed incorrectly when jumping backwards. For example instead of
"jmp 0xe8bc" the string "jmp ffffe8bc" is printed. That's because
of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the x86emuOp_jump_call_near_IMM() function the target address is
printed incorrectly when jumping backwards. For example instead of
"jmp 0xe8bc" the string "jmp ffffe8bc" is printed. That's because
of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bios_emulator: fix incorrect printing of address in "call near immediate"</title>
<updated>2024-12-15T17:39:21+00:00</updated>
<author>
<name>Yuri Zaporozhets</name>
<email>yuriz@qrv-systems.net</email>
</author>
<published>2024-11-30T20:56:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5fb5180a1616b714a289ae4c8ff447e5ee0bddb0'/>
<id>5fb5180a1616b714a289ae4c8ff447e5ee0bddb0</id>
<content type='text'>
In the x86emuOp_call_near_IMM() function the address of CALL is
printed incorrectly when jumping backwards. For example, the correct
disassemble of the bytes below would be:

0000E8DE  E8DBFF            call 0xe8bc

(verified by ndisasm). But instead the address is printed as "ffffe8bc".
That's because of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the x86emuOp_call_near_IMM() function the address of CALL is
printed incorrectly when jumping backwards. For example, the correct
disassemble of the bytes below would be:

0000E8DE  E8DBFF            call 0xe8bc

(verified by ndisasm). But instead the address is printed as "ffffe8bc".
That's because of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bios_emulator: fix garbled printing of disassembled SET* instructions</title>
<updated>2024-12-15T17:39:18+00:00</updated>
<author>
<name>Yuri Zaporozhets</name>
<email>yuriz@qrv-systems.net</email>
</author>
<published>2024-11-26T23:29:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=82a59b45d3fc720831eaacd5b76c796c00912832'/>
<id>82a59b45d3fc720831eaacd5b76c796c00912832</id>
<content type='text'>
When DEBUG_DECODE_F is enabled in bios_emulator, the printing of
SET{O,NO,B,NB,Z,NZ,BE,NBE,S,NS,P,TP,L,NL,LE,NLE} instructions
is not followed by newline and is, therefore, immediately followed
by the printed address of a new instruction. This garbles the output
and makes it very difficult to read.

This patch adds missing DECODE_PRINTF("\n") calls to print newlines.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When DEBUG_DECODE_F is enabled in bios_emulator, the printing of
SET{O,NO,B,NB,Z,NZ,BE,NBE,S,NS,P,TP,L,NL,LE,NLE} instructions
is not followed by newline and is, therefore, immediately followed
by the printed address of a new instruction. This garbles the output
and makes it very difficult to read.

This patch adds missing DECODE_PRINTF("\n") calls to print newlines.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bios_emulator: fix garbled printing of disassembled BSF instruction</title>
<updated>2024-12-15T17:39:16+00:00</updated>
<author>
<name>Yuri Zaporozhets</name>
<email>yuriz@qrv-systems.net</email>
</author>
<published>2024-11-26T21:59:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=15c1b2f974508c3d7a107b0bd8b43d69c9ae5305'/>
<id>15c1b2f974508c3d7a107b0bd8b43d69c9ae5305</id>
<content type='text'>
When DEBUG_DECODE_F is enabled in bios_emulator, the printing of BSF
instructions is garbled because the '\n' symbol is used instead of
the correct '\t'. Fix that.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When DEBUG_DECODE_F is enabled in bios_emulator, the printing of BSF
instructions is garbled because the '\n' symbol is used instead of
the correct '\t'. Fix that.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bios_emulator: add missing includes to debug.c</title>
<updated>2024-11-17T02:54:16+00:00</updated>
<author>
<name>Yuri Zaporozhets</name>
<email>yuriz@qrv-systems.net</email>
</author>
<published>2024-11-08T13:13:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7f150502103b8e0e18864358d7ca2568db9bf174'/>
<id>7f150502103b8e0e18864358d7ca2568db9bf174</id>
<content type='text'>
When compiling with X86EMU_DEBUG, the compiler complains that debug.c misses
two include files. Fix that.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When compiling with X86EMU_DEBUG, the compiler complains that debug.c misses
two include files. Fix that.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bios_emulator: for non-x86, print warnings if PM_{inp, outp}* access is attempted</title>
<updated>2024-11-17T02:54:16+00:00</updated>
<author>
<name>Yuri Zaporozhets</name>
<email>yuriz@qrv-systems.net</email>
</author>
<published>2024-11-05T21:30:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=18115aae5321dd559ef25e0097ea27f632aab1cc'/>
<id>18115aae5321dd559ef25e0097ea27f632aab1cc</id>
<content type='text'>
Currently the PM_{inp,outp}* macros are completely broken on non-x86 architectures,
because they will essentially access random memory locations if called (and produce
a lot of rightful compilation warnings too). For now, replace those macros with
warnings (until the code is fixed), so the user at least knows that the emulator
attempted to access some x86 I/O port.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the PM_{inp,outp}* macros are completely broken on non-x86 architectures,
because they will essentially access random memory locations if called (and produce
a lot of rightful compilation warnings too). For now, replace those macros with
warnings (until the code is fixed), so the user at least knows that the emulator
attempted to access some x86 I/O port.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bios_emulator: fix first argument of pci_{read,write}_config_* function calls</title>
<updated>2024-11-05T00:01:58+00:00</updated>
<author>
<name>Yuri Zaporozhets</name>
<email>yuriz@vodafonemail.de</email>
</author>
<published>2024-10-30T19:38:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=56accc56b9aab87ef4809ccc588e1257969cd271'/>
<id>56accc56b9aab87ef4809ccc588e1257969cd271</id>
<content type='text'>
When compiling for riscv64, a bunch of warning is produced for the file
drivers/bios_emulator/besys.c. This patch fixes a portion of those warnings,
caused by incorrect first argument to pci_{read,write}_config_* functions.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When compiling for riscv64, a bunch of warning is produced for the file
drivers/bios_emulator/besys.c. This patch fixes a portion of those warnings,
caused by incorrect first argument to pci_{read,write}_config_* functions.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bios_emulator: define the comment symbol for RISC-V assembler too</title>
<updated>2024-11-04T22:41:38+00:00</updated>
<author>
<name>Yuri Zaporozhets</name>
<email>yuriz@vodafonemail.de</email>
</author>
<published>2024-10-30T13:00:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d84e3d2630f9db9484ee8609e5d5e992fc5c5260'/>
<id>d84e3d2630f9db9484ee8609e5d5e992fc5c5260</id>
<content type='text'>
The bios_emulator driver cannot be compiled for RISC-V because the x86emu.h
header file doesn't define the comment symbol ("#") for the assembler.
With this patch, use the same symbol as for e.g. x86.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bios_emulator driver cannot be compiled for RISC-V because the x86emu.h
header file doesn't define the comment symbol ("#") for the assembler.
With this patch, use the same symbol as for e.g. x86.

Signed-off-by: Yuri Zaporozhets &lt;yuriz@qrv-systems.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
