[ipxe-devel] 486 with a Realtek 8139, patch
Geert Stappers
stappers at stappers.nl
Sun May 9 19:56:25 UTC 2021
On Sun, May 09, 2021 at 03:37:18AM +0300, Nikolai Zhubr wrote:
> 08.05.2021 9:45, Geert Stappers:
> > ...
> > Any chance in dumping somewhere
> > a rough / rude version of the made changes?
>
> No worries, it is basically a 5-liner, and I don't hide my bugfixes. Please
> see a diff file attached,
> --- src/arch/i386/core/realmode_asm.S 2010-09-05 23:47:29.000000000 +0300
> +++ src/arch/i386/core/realmode_asm.S 2021-05-09 01:25:42.042733352 +0300
> @@ -301,9 +301,11 @@
> movl %eax, %ebx
> shrl $4, %ebx
> pushw %bx
> - leal 3f(%ebp), %ebx
> + movw %bx, (p2r_ljmp_rm+3)(%ebp)
> + leal (p2r_ljmp_rm+5)(%ebp), %ebx
> subl %eax, %ebx
> pushw %bx
> + movw %bx, (p2r_ljmp_rm+1)(%ebp)
> /* Continuation address */
> pushl $(p2r_rmcs - p2r_gdt)
> leal 2f(%ebp), %ebx
> @@ -348,12 +350,21 @@
> /* Make intersegment jmp to flush the processor pipeline
> * and reload %cs:%eip (to clear upper 16 bits of %eip).
> */
> - lret
> -3:
>
> +p2r_ljmp_rm:
> + ljmp $0, $9f /* EA oo oo ss ss */
> +9:
> /* Load real-mode segment value to %ss. %sp already OK */
> shrl $4, %eax
> movw %ax, %ss
> + movzwl %sp, %esp
> + movw %ax, %ds
> + movw %ax, %es
> + movw %ax, %fs
> + movw %ax, %gs
> +
> + popw %bx
> + popw %bx
>
> /* Restore registers */
> popl %eax
>
I wasn't able to apply that patch.
Screenshot:
| ... output of `patch < /path/to/saved/email` ...
||--- src/arch/i386/core/realmode_asm.S 2010-09-05 23:47:29.000000000 +0300
||+++ src/arch/i386/core/realmode_asm.S 2021-05-09 01:25:42.042733352 +0300
|--------------------------
|File to patch: src/arch/i386/core/realmode_asm.S
|src/arch/i386/core/realmode_asm.S: No such file or directory
|Skip this patch? [y]
|Skipping patch.
|2 out of 2 hunks ignored
|$ ls src/arch/i386/core/
|gdbidt.S nulltrap.c setjmp.S
|$
Where originates the 2010 realmode_asm.S from?
Groeten
Geert Stappers
--
Silence is hard to parse
More information about the ipxe-devel
mailing list