Still possible to directly boot without loader?

John Baldwin jhb at freebsd.org
Thu Oct 26 19:42:48 UTC 2006


On Thursday 26 October 2006 15:18, Ruslan Ermilov wrote:
> On Thu, Oct 26, 2006 at 11:38:24AM -0400, John Baldwin wrote:
> > On Thursday 26 October 2006 10:42, Ruslan Ermilov wrote:
> > > On Thu, Oct 26, 2006 at 10:28:09AM -0400, John Baldwin wrote:
> > > > boot2 should do whatever loader does.
> > > > 
> > > But this would be a regression, since loader(8) does the following,
> > > in the ELF32 case:
> > > 
> > > : 0 edoofus:ttyp2:/sys/boot/i386/libi386 >grep -w entry elf32_freebsd.c
> > > :     vm_offset_t                 entry, bootinfop, modulep, kernend;
> > > :     entry = ehdr->e_entry & 0xffffff;
> > > :     printf("Start @ 0x%lx ...\n", entry);
> > > :     __exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop, modulep, kernend);
> > 
> > Ah, ok.  Make them both just mask the top 8 bits then. :)
> > 
> OK, I backed out your change to boot2.c.

Sorry, I meant that both boot2 and loader should follow your proposal of masking 28 bits.
Just masking the top 4 bits is probably sufficient.

-- 
John Baldwin


More information about the freebsd-stable mailing list