Changeset 1d8b222c5fa8996b5d46ae8224e3331f31f5fb5b for core/pxelinux.asm
- Timestamp:
- 10/05/09 22:06:06 (3 years ago)
- Children:
- fee688790af77e282a3d04c9fb061089ec16a502
- Parents:
- 00d897e58126a7f12990dda8b07266ab12e853b8
- git-committer:
- H. Peter Anvin <hpa@zytor.com> / 2009-10-05T15:06:06Z-0700
- Files:
-
- 1 modified
-
core/pxelinux.asm (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
core/pxelinux.asm
r15c6dc r1d8b22 234 234 235 235 hcdhcp_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) 236 hcdhcp_len dd 7*4 ; Size of this structure 239 237 hcdhcp_flags dd 0 ; Reserved for the future 238 ; Parameters to be parsed before the ones from PXE 239 bdhcp_offset dd 0 ; Offset (entered by patcher) 240 bdhcp_len dd 0 ; Length (entered by patcher) 241 ; Parameters to be parsed *after* the ones from PXE 242 adhcp_offset dd 0 ; Offset (entered by patcher) 243 adhcp_len dd 0 ; Length (entered by patcher) 240 244 241 245 _start1: … … 269 273 ; Move the hardwired DHCP options (if present) to a safe place... 270 274 ; 271 hcdhcp_copy:272 mov cx,[ hcdhcp_len]273 mov ax,trackbufsize 275 bdhcp_copy: 276 mov cx,[bdhcp_len] 277 mov ax,trackbufsize/2 274 278 jcxz .none 275 279 cmp cx,ax 276 280 jbe .oksize 277 281 mov cx,ax 278 mov [ hcdhcp_len],ax282 mov [bdhcp_len],ax 279 283 .oksize: 280 mov eax,[ hcdhcp_offset]284 mov eax,[bdhcp_offset] 281 285 add eax,_start 282 286 mov si,ax … … 286 290 mov ds,ax 287 291 mov di,trackbuf 292 add cx,3 293 shr cx,2 294 rep movsd 295 pop ds 296 .none: 297 298 adhcp_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 288 315 add cx,3 289 316 shr cx,2 … … 578 605 ; an option field. 579 606 ; 580 mov cx,[ hcdhcp_len]607 mov cx,[bdhcp_len] 581 608 mov si,trackbuf 582 609 call parse_dhcp_options … … 635 662 call parse_dhcp ; Parse DHCP packet 636 663 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 637 673 638 674 ; … … 2300 2336 ; 2301 2337 ; Get a DHCP packet from the PXE stack into the trackbuf. 2338 ; Leaves the upper half of the trackbuf untouched. 2302 2339 ; 2303 2340 ; Input: … … 2320 2357 movzx ax,dl 2321 2358 stosw ; Packet type 2322 mov ax,trackbufsize 2359 mov ax,trackbufsize/2 2323 2360 stosw ; Buffer size 2324 2361 mov ax,trackbuf
