Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand/pxeboot Revert previous code move to acc...



details:   https://anonhg.NetBSD.org/src/rev/0bd8ea292c19
branches:  trunk
changeset: 790776:0bd8ea292c19
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 20 19:47:28 2013 +0000

description:
Revert previous code move to accommodate relocation that does not fit.
Move pxe_command_buf declaration next to the code so
that it fits on the 16 bit relocation. It is in the text segment, but
it does not matter since it is mapped read-write.

diffstat:

 sys/arch/i386/stand/pxeboot/pxe.c      |   4 ++--
 sys/arch/i386/stand/pxeboot/pxe_call.S |  13 ++++++++++---
 2 files changed, 12 insertions(+), 5 deletions(-)

diffs (51 lines):

diff -r a15dc07b8689 -r 0bd8ea292c19 sys/arch/i386/stand/pxeboot/pxe.c
--- a/sys/arch/i386/stand/pxeboot/pxe.c Sun Oct 20 17:36:36 2013 +0000
+++ b/sys/arch/i386/stand/pxeboot/pxe.c Sun Oct 20 19:47:28 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pxe.c,v 1.17 2009/12/13 23:01:42 jakllsch Exp $        */
+/*     $NetBSD: pxe.c,v 1.18 2013/10/20 19:47:28 christos Exp $        */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -107,7 +107,7 @@
 void   pxecall_bangpxe(uint16_t);      /* pxe_call.S */
 void   pxecall_pxenv(uint16_t);        /* pxe_call.S */
 
-char pxe_command_buf[256];
+extern char pxe_command_buf[256];
 
 BOOTPLAYER bootplayer;
 
diff -r a15dc07b8689 -r 0bd8ea292c19 sys/arch/i386/stand/pxeboot/pxe_call.S
--- a/sys/arch/i386/stand/pxeboot/pxe_call.S    Sun Oct 20 17:36:36 2013 +0000
+++ b/sys/arch/i386/stand/pxeboot/pxe_call.S    Sun Oct 20 19:47:28 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pxe_call.S,v 1.4 2013/10/20 00:16:16 christos Exp $    */
+/*     $NetBSD: pxe_call.S,v 1.5 2013/10/20 19:47:28 christos Exp $    */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -88,10 +88,10 @@
        movl    8(%ebp), %ebx
 
        call    _C_LABEL(prot_to_real)          # enter real mode
-       /* prot_to_real() has already set %es to BOOTSEG */
-       lea     _C_LABEL(pxe_command_buf), %edi
        .code16
 
+       /* prot_to_real() has already set %es to BOOTSEG */
+       lea     _C_LABEL(pxe_command_buf), %di
 
        /* The encoding is: 0x9a offlo offhi seglo seghi */
        lcall   $0, $0xffff
@@ -109,3 +109,10 @@
        popl    %ebx
        popl    %ebp
        ret
+
+       .globl _C_LABEL(pxe_command_buf)
+       .align 32
+       .type   _C_LABEL(pxe_command_buf), @object
+       .size   _C_LABEL(pxe_command_buf), 256
+_C_LABEL(pxe_command_buf):
+       .zero   256



Home | Main Index | Thread Index | Old Index