Annotation of /tags/mkinitrd-6_5_0/isolinux/cmdline.inc
Parent Directory | Revision Log
Revision 1345 -
(hide annotations)
(download)
Fri Jun 3 21:22:00 2011 UTC (13 years, 3 months ago) by niro
File size: 1778 byte(s)
Fri Jun 3 21:22:00 2011 UTC (13 years, 3 months ago) by niro
File size: 1778 byte(s)
tagged 'mkinitrd-6_5_0'
1 | niro | 532 | ;; ----------------------------------------------------------------------- |
2 | ;; | ||
3 | niro | 1133 | ;; Copyright 2003-2009 H. Peter Anvin - All Rights Reserved |
4 | ;; Copyright 2009 Intel Corporation; author: H. Peter Anvin | ||
5 | ;; | ||
6 | niro | 532 | ;; This program is free software; you can redistribute it and/or modify |
7 | ;; it under the terms of the GNU General Public License as published by | ||
8 | ;; the Free Software Foundation, Inc., 53 Temple Place Ste 330, | ||
9 | ;; Boston MA 02111-1307, USA; either version 2 of the License, or | ||
10 | ;; (at your option) any later version; incorporated herein by reference. | ||
11 | ;; | ||
12 | ;; ----------------------------------------------------------------------- | ||
13 | |||
14 | ;; | ||
15 | ;; cmdline.inc | ||
16 | ;; | ||
17 | ;; Common routine to assemble [null-terminated] command line into | ||
18 | ;; real_mode_seg:cmd_line_here. | ||
19 | ;; Not used by plain kernel due to BOOT_IMAGE= etc. | ||
20 | ;; | ||
21 | |||
22 | ; | ||
23 | ; Assumes DS == CS | ||
24 | niro | 1133 | ; |
25 | niro | 532 | make_plain_cmdline: |
26 | push es | ||
27 | ; ui.inc has already copied any APPEND options | ||
28 | mov ax,real_mode_seg | ||
29 | mov es,ax | ||
30 | |||
31 | niro | 1133 | mov di,[CmdLinePtr] |
32 | call do_ip_append | ||
33 | |||
34 | niro | 532 | mov si,[CmdOptPtr] |
35 | niro | 1133 | |
36 | niro | 532 | call strcpy |
37 | |||
38 | dec di | ||
39 | mov [CmdLinePtr],di | ||
40 | |||
41 | pop es | ||
42 | ret | ||
43 | |||
44 | niro | 1133 | ; |
45 | ; Actual IPAppend strings... | ||
46 | ; | ||
47 | %if IS_PXELINUX | ||
48 | section .data | ||
49 | alignz 2 | ||
50 | IPAppends dw IPOption | ||
51 | dw BOOTIFStr | ||
52 | numIPAppends equ ($-IPAppends)/2 | ||
53 | %else | ||
54 | IPAppends equ 0 | ||
55 | numIPAppends equ 0 | ||
56 | %endif | ||
57 | niro | 532 | |
58 | niro | 1133 | ; |
59 | ; Handle "ipappend" strings, if applicable | ||
60 | ; | ||
61 | ; Assumes DS == CS; pushes output to ES:DI | ||
62 | ; | ||
63 | section .text | ||
64 | |||
65 | do_ip_append: | ||
66 | %ifndef DEPEND | ||
67 | %if numIPAppends > 0 | ||
68 | push cx | ||
69 | push bx | ||
70 | push si | ||
71 | |||
72 | mov bx,IPAppends | ||
73 | mov cx,[IPAppend] | ||
74 | and cx,(1 << numIPAppends)-1 | ||
75 | .loop: | ||
76 | jcxz .done | ||
77 | mov si,[bx] | ||
78 | inc bx | ||
79 | inc bx | ||
80 | test cl,1 | ||
81 | jz .not_this | ||
82 | |||
83 | call strcpy | ||
84 | mov byte [es:di-1],' ' ; Replace final null with space | ||
85 | .not_this: | ||
86 | shr cx,1 | ||
87 | jmp .loop | ||
88 | .done: | ||
89 | pop si | ||
90 | pop bx | ||
91 | pop cx | ||
92 | %endif | ||
93 | %endif | ||
94 | ret |