Changeset c45ffb669e96ed42d563831d13f3d113f7e18ebf

Show
Ignore:
Timestamp:
10/19/09 13:26:20 (2 years ago)
Author:
Erwan Velu <erwan.velu@…>
Children:
ac729becd4e99890a9fc4e6f543c0ae46fd92b05
Parents:
961ae24c5508a1de642c674609c379dd3202f9c7, 3d6f5132894acf54b1958ae190624fc0a774294f
git-committer:
Erwan Velu <erwan.velu@free.fr> / 2009-10-19T15:26:20Z+0200
Message:

Merge commit 'hpa/master'

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • com32/hdt/Makefile

    ra2ad37 r961ae2  
    3232MODULES_PCIMAP_FILE     ?= /lib/modules/$(KERNEL_VERSION)/modules.pcimap 
    3333PCI_IDS_FILE            ?= $(PWD)/floppy/pci.ids 
     34ISO_DIR                 ?= iso/isolinux 
    3435 
    3536all: $(MODULES) $(TESTFILES) 
     
    5051        MTOOLSRC=$(PWD)/floppy/mtools.conf $(MCOPY) floppy/hdt.cfg a:syslinux.cfg 
    5152 
     53hdt.iso: hdt.c32 $(topdir)/core/isolinux.bin floppy/hdt.cfg 
     54        rm -rf $(ISO_DIR) 
     55        rm -rf hdt.iso 
     56        mkdir -p $(ISO_DIR) 
     57        cp $(topdir)/core/isolinux.bin $(ISO_DIR) 
     58        cp floppy/hdt.cfg $(ISO_DIR)/isolinux.cfg 
     59        cp hdt.c32 $(ISO_DIR) 
     60        -[ ! -f $(PCI_IDS_FILE) ] && cp /usr/share/hwdata/pci.ids $(ISO_DIR) 
     61        -[ ! -f $(PCI_IDS_FILE) ] && cp /usr/share/pci.ids $(ISO_DIR) 
     62        -[ -f $(MODULES_ALIAS_FILE) ] && cp $(MODULES_ALIAS_FILE) $(ISO_DIR) 
     63        -[ -f $(MODULES_PCIMAP_FILE) ] && cp $(MODULES_PCIMAP_FILE) $(ISO_DIR) 
     64        -[ ! -f $(ISO_DIR)/pci.ids ] && printf "\nThe floppy/pci.ids file is missing and can be downloaded from http://pciids.sourceforge.net and put in\nthe ./com32/hdt/floppy directory of the extracted Syslinux source.\n\n" 
     65        mkisofs -o hdt.iso -b isolinux/isolinux.bin -c isolinux/boot.cat \ 
     66                -no-emul-boot -boot-load-size 4 -boot-info-table \ 
     67                iso/ 
     68 
    5269tidy dist: 
    5370        rm -f *.o *.lo *.a *.lst *.elf .*.d *.tmp 
     
    5774 
    5875spotless: clean 
    59         rm -f *.lss *.c32 *.com hdt.img 
     76        rm -f *.lss *.c32 *.com hdt.img hdt.iso 
    6077        rm -f *~ \#* 
    6178 
  • com32/mboot/map.c

    rfd0064 r3d6f51  
    128128            mbh_len = 12; 
    129129 
    130         if (i + mbh_len < len) 
     130        if (i + mbh_len > len) 
    131131            mbh_len = 0;        /* Invalid... */ 
    132132        else 
  • core/pxelinux.asm

    r15c6dc r1d8b22  
    234234 
    235235hcdhcp_magic    dd 0x2983c8ac           ; Magic number 
    236                 dd 5*4                  ; Size of this structure 
    237 hcdhcp_offset   dd 0                    ; Offset (entered by patcher) 
    238 hcdhcp_len      dd 0                    ; Length (entered by patcher) 
     236hcdhcp_len      dd 7*4                  ; Size of this structure 
    239237hcdhcp_flags    dd 0                    ; Reserved for the future 
     238                ; Parameters to be parsed before the ones from PXE 
     239bdhcp_offset    dd 0                    ; Offset (entered by patcher) 
     240bdhcp_len       dd 0                    ; Length (entered by patcher) 
     241                ; Parameters to be parsed *after* the ones from PXE 
     242adhcp_offset    dd 0                    ; Offset (entered by patcher) 
     243adhcp_len       dd 0                    ; Length (entered by patcher) 
    240244 
    241245_start1: 
     
    269273; Move the hardwired DHCP options (if present) to a safe place... 
    270274; 
    271 hcdhcp_copy: 
    272                 mov cx,[hcdhcp_len] 
    273                 mov ax,trackbufsize 
     275bdhcp_copy: 
     276                mov cx,[bdhcp_len] 
     277                mov ax,trackbufsize/2 
    274278                jcxz .none 
    275279                cmp cx,ax 
    276280                jbe .oksize 
    277281                mov cx,ax 
    278                 mov [hcdhcp_len],ax 
     282                mov [bdhcp_len],ax 
    279283.oksize: 
    280                 mov eax,[hcdhcp_offset] 
     284                mov eax,[bdhcp_offset] 
    281285                add eax,_start 
    282286                mov si,ax 
     
    286290                mov ds,ax 
    287291                mov di,trackbuf 
     292                add cx,3 
     293                shr cx,2 
     294                rep movsd 
     295                pop ds 
     296.none: 
     297 
     298adhcp_copy: 
     299                mov cx,[adhcp_len] 
     300                mov ax,trackbufsize/2 
     301                jcxz .none 
     302                cmp cx,ax 
     303                jbe .oksize 
     304                mov cx,ax 
     305                mov [adhcp_len],ax 
     306.oksize: 
     307                mov eax,[adhcp_offset] 
     308                add eax,_start 
     309                mov si,ax 
     310                and si,000Fh 
     311                shr eax,4 
     312                push ds 
     313                mov ds,ax 
     314                mov di,trackbuf+trackbufsize/2 
    288315                add cx,3 
    289316                shr cx,2 
     
    578605; an option field. 
    579606; 
    580                 mov cx,[hcdhcp_len] 
     607                mov cx,[bdhcp_len] 
    581608                mov si,trackbuf 
    582609                call parse_dhcp_options 
     
    635662                call parse_dhcp                 ; Parse DHCP packet 
    636663                call crlf 
     664 
     665; 
     666; Process any hardwired options the user may have specified.  This is 
     667; different than the actual packets in that there is no header, just 
     668; an option field.  This handles the "after" options 
     669; 
     670                mov cx,[adhcp_len] 
     671                mov si,trackbuf+trackbufsize/2 
     672                call parse_dhcp_options 
    637673 
    638674; 
     
    23002336; 
    23012337; Get a DHCP packet from the PXE stack into the trackbuf. 
     2338; Leaves the upper half of the trackbuf untouched. 
    23022339; 
    23032340; Input: 
     
    23202357                movzx ax,dl 
    23212358                stosw           ; Packet type 
    2322                 mov ax,trackbufsize 
     2359                mov ax,trackbufsize/2 
    23232360                stosw           ; Buffer size 
    23242361                mov ax,trackbuf