Subversion Repositories HelenOS

Rev

Rev 2713 | Rev 3802 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2713 Rev 2725
Line 180... Line 180...
180
	
180
	
181
	cmpl $MULTIBOOT_LOADER_MAGIC, %eax			# compare GRUB signature
181
	cmpl $MULTIBOOT_LOADER_MAGIC, %eax			# compare GRUB signature
182
	je valid_boot
182
	je valid_boot
183
		
183
		
184
		xorl %ecx, %ecx					# no memory size or map available
184
		xorl %ecx, %ecx					# no memory size or map available
185
		movl %ecx, e801memorysize
-
 
186
		movl %ecx, e820counter
185
		movl %ecx, e820counter
187
		
186
		
188
		jmp invalid_boot
187
		jmp invalid_boot
189
		
188
		
190
	valid_boot:
189
	valid_boot:
191
		
190
		
192
		movl (%ebx), %eax				# ebx = physical address of struct multiboot_info
191
		movl (%ebx), %eax				# ebx = physical address of struct multiboot_info
193
		
192
		
194
		bt $0, %eax					# mbi->flags[0] (mem_lower, mem_upper valid)
-
 
195
		jc mem_valid
-
 
196
			
-
 
197
			xorl %ecx, %ecx
-
 
198
			jmp mem_invalid
-
 
199
			
-
 
200
		mem_valid:
-
 
201
		movl 4(%ebx), %ecx				# mbi->mem_lower
-
 
202
		addl 8(%ebx), %ecx				# mbi->mem_upper
-
 
203
		
-
 
204
		mem_invalid:
-
 
205
		movl %ecx, e801memorysize
-
 
206
		
-
 
207
		bt $3, %eax					# mbi->flags[3] (mods_count, mods_addr valid)
193
		bt $3, %eax					# mbi->flags[3] (mods_count, mods_addr valid)
208
		jc mods_valid
194
		jc mods_valid
209
			
195
			
210
			xorq %rcx, %rcx
196
			xorq %rcx, %rcx
211
			movq %rcx, init
197
			movq %rcx, init