Hi Geert,

08.05.2021 9:45, Geert Stappers:
[...]
What I've done is using prot_to_real implementation in current iPXE, I tried
to mimic it as much as possible in respective place in Etherboot.

"in Etherboot", so not in iPXE.

Yes. And it is for a reason. Etherboot has been serving me for years as a workhorse, on a daily basis, on a lot of computers. And iPXE has not yet (and honestly I was not even aware of its existence until some few days ago) and testing it failed somewhat, due to a number of (non-fatal) problems discussed earlier.

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, but I think I'll fork a github repo to make it easier searchable and browsable. (I could also create a PR though it is unlikely going to be applied to a discontinued tree anyway)

Same request in other words:
Relief yourself from any quality demand and share you iPXE i80486 version.[1]

As you might remember I reported that my attempts to run iPXE on real hardware failed more or less, although I've got an impression that with some effort it should be possible. Meanwhile, if you are willing to take the burden of preparing and submitting some 486-compatability patches upstream, you can use replies from Michael and Martin earlier in this thread as a source, and I'll appreciate that. My understanding is that iPXE does not suffer the peculiar problem I've just fixed in etherboot (in the attached diff), but simply employs some 586+ features in a couple of places. Probably I'll plan to test it eventually, as time permits, however funny thing is, I can not see any hardware target/compatability statement neither at ipxe.org nor in the source tree, which is a bit discouraging.


Thank you,

Regards,
Nikolai
--- 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

_______________________________________________
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel

Reply via email to