Bugzilla – Attachment 61349 Details for
Bug 140119
gfxboot could be more big-endian-friendly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
make syslinux detect byte-swapped cpio archives
syslinux-gfxboot-cpio-swab.diff (text/plain), 1.42 KB, created by
Colin Watson
on 2005-12-19 11:00:06 UTC
(
hide
)
Description:
make syslinux detect byte-swapped cpio archives
Filename:
MIME Type:
Creator:
Colin Watson
Created:
2005-12-19 11:00:06 UTC
Size:
1.42 KB
patch
obsolete
>diff -u syslinux-3.11/gfxboot.inc syslinux-3.11/gfxboot.inc >--- syslinux-3.11/gfxboot.inc >+++ syslinux-3.11/gfxboot.inc >@@ -286,6 +286,7 @@ > ; != 0 -> graphics active > gfx_ok db 0 > gfx_cwritestr_old db 0c3h ; 'ret' >+gfx_cpio_swab db 0 > > gfx_mem_start_seg dw 0 > gfx_mem_end_seg dw 0 >@@ -920,15 +921,26 @@ > > lin2segofs edi,es,bx > cmp word [es:bx],71c7h >+ jz find_file_30 ; normal cpio record >+ cmp word [es:bx],0c771h ; maybe byte-swapped? > jnz find_file_90 ; no cpio record >+ mov byte [gfx_cpio_swab],1 > >- movzx esi,word [es:bx+20] ; file name size >+find_file_30: >+ mov ax,[es:bx+20] ; file name size >+ call cpio_swab >+ movzx esi,ax > > inc si > and si,~1 ; align > >- mov ecx,[es:bx+22] ; data size >- rol ecx,16 ; get word order right >+ mov ax,[es:bx+22] ; data size, MSW >+ call cpio_swab >+ mov cx,ax >+ shl ecx,16 >+ mov ax,[es:bx+24] ; data size, LSW >+ call cpio_swab >+ mov cx,ax > > inc ecx > and ecx,byte ~1 ; align >@@ -950,6 +962,23 @@ > > ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > ; >+; byte-swap cpio data if appropriate >+; >+; ax: word to swap >+; >+; return: ax: swapped if [gfx_cpio_swab], otherwise same as input >+; >+cpio_swab: >+ cmp byte [gfx_cpio_swab],0 >+ jz cpio_swab_90 >+ xchg ah,al >+ >+cpio_swab_90: >+ ret >+ >+ >+; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >+; > ; es:bx file start > ; > ; return: eax: offset to code entry
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 140119
: 61349 |
61350
|
61351