Simplify boot loader by removing some JOS'isms
This commit is contained in:
		
							parent
							
								
									faad047ab2
								
							
						
					
					
						commit
						4c274cef74
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -34,7 +34,7 @@ bootmain(void) | ||||||
|   ph = (struct proghdr*)((uchar*)elf + elf->phoff); |   ph = (struct proghdr*)((uchar*)elf + elf->phoff); | ||||||
|   eph = ph + elf->phnum; |   eph = ph + elf->phnum; | ||||||
|   for(; ph < eph; ph++) { |   for(; ph < eph; ph++) { | ||||||
|     va = (uchar*)(ph->va & 0xFFFFFF); |     va = (uchar*)ph->va; | ||||||
|     readseg(va, ph->filesz, ph->offset); |     readseg(va, ph->filesz, ph->offset); | ||||||
|     if(ph->memsz > ph->filesz) |     if(ph->memsz > ph->filesz) | ||||||
|       stosb(va + ph->filesz, 0, ph->memsz - ph->filesz); |       stosb(va + ph->filesz, 0, ph->memsz - ph->filesz); | ||||||
|  | @ -42,7 +42,7 @@ bootmain(void) | ||||||
| 
 | 
 | ||||||
|   // Call the entry point from the ELF header.
 |   // Call the entry point from the ELF header.
 | ||||||
|   // Does not return!
 |   // Does not return!
 | ||||||
|   entry = (void(*)(void))(elf->entry & 0xFFFFFF); |   entry = (void(*)(void))(elf->entry); | ||||||
|   entry(); |   entry(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Austin Clements
						Austin Clements