Subversion Repositories HelenOS

Rev

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

Rev 2302 Rev 2725
Line 107... Line 107...
107
	movl grub_eax, %eax
107
	movl grub_eax, %eax
108
	movl grub_ebx, %ebx
108
	movl grub_ebx, %ebx
109
	cmpl $MULTIBOOT_LOADER_MAGIC, %eax				# compare GRUB signature
109
	cmpl $MULTIBOOT_LOADER_MAGIC, %eax				# compare GRUB signature
110
	je valid_boot
110
	je valid_boot
111
		
111
		
112
		xorl %ecx, %ecx							# no memory size or map available
112
		xorl %ecx, %ecx							# no memory map available
113
		movl %ecx, e801memorysize
-
 
114
		movl %ecx, e820counter
113
		movl %ecx, e820counter
115
		
114
		
116
		jmp invalid_boot
115
		jmp invalid_boot
117
		
116
		
118
	valid_boot:
117
	valid_boot:
119
		
118
		
120
		movl (%ebx), %eax						# ebx = physical address of struct multiboot_info
119
		movl (%ebx), %eax						# ebx = physical address of struct multiboot_info
121
		
120
		
122
		bt $0, %eax								# mbi->flags[0] (mem_lower, mem_upper valid)
-
 
123
		jc mem_valid
-
 
124
			
-
 
125
			xorl %ecx, %ecx
-
 
126
			jmp mem_invalid
-
 
127
			
-
 
128
		mem_valid:
-
 
129
		movl 4(%ebx), %ecx						# mbi->mem_lower
-
 
130
		addl 8(%ebx), %ecx						# mbi->mem_upper
-
 
131
		
-
 
132
		mem_invalid:
-
 
133
		movl %ecx, e801memorysize
-
 
134
		
-
 
135
		bt $3, %eax								# mbi->flags[3] (mods_count, mods_addr valid)
121
		bt $3, %eax								# mbi->flags[3] (mods_count, mods_addr valid)
136
		jc mods_valid
122
		jc mods_valid
137
			
123
			
138
			xorl %ecx, %ecx
124
			xorl %ecx, %ecx
139
			movl %ecx, init
125
			movl %ecx, init