Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Aug 2000 11:54:48 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/sys kernel.h
Message-ID:  <200008111854.LAA79449@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
peter       2000/08/11 11:54:48 PDT

  Modified files:
    sys/sys              kernel.h 
  Log:
  Oops, forgot this file.  Log message for completeness:
  Clean up some low level bootstrap code:
  
  - stop using the evil 'struct trapframe' argument for mi_startup()
    (formerly main()).  There are much better ways of doing it.
  - do not use prepare_usermode() - setregs() in execve() will do it
    all for us as long as the p_md.md_regs pointer is set.  (which is
    now done in machdep.c rather than init_main.c.  The Alpha port did it
    this way all along and is much cleaner).
  - collect all the magic %cr0 etc register settings into one place and
    have the AP's call that instead of using magic numbers (!!) that keep
    changing over and over again.
  - Make it safe to call kthread_create() earlier, including during the
    device probe sequence.  It doesn't need the callback mechanism that
    NetBSD's version uses.
  - kthreads created this way are root-less as they exist before the root
    filesystem is mounted.  init(1) is set up so that it aquires the root
    pointers prior to running.  If other kthreads want filesystem acccess
    we can make this code more generic.
  - set all threads start times once we have decided what time it is.
  - init uses a trampoline rather than the evil prepare_usermode() hack.
  - kern_descrip.c has a couple of tweaks to deal with forking when there
    is no rootdir or cwd etc.
  - adjust the early SYSINIT() sequence so that a few prereqisites are in
    place. eg: make sure the run queue is initialized before doing forks.
  
  With this, the USB code can easily create a kthread to do the device
  tree discovery.  (I have tested it, it works nicely).
  
  There are still some open issues before this is truely useful.
  - tsleep() does not like working before the clock is running.  It
    sort-of tries to spin wait, but it can do more useful things now.
  - stopping a kthread in kld code at unload time is "interesting" but
    we have a solution for that.
  
  The Alpha code needs no changes for this.  It already uses pretty much the
  same strategies, but a little cleaner.
  
  Revision  Changes    Path
  1.66      +8 -8      src/sys/sys/kernel.h



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008111854.LAA79449>