conf.kern 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. #
  2. # Machine-independent kernel config definitions.
  3. #
  4. # The idea is that the files, options, and facilities in the system
  5. # are declared by conf.kern and the various files it includes. Then a
  6. # kernel config (such as ASST1, or GENERIC, or TEST, or whatever) is
  7. # used to select options and facilities for a particular kernel build.
  8. #
  9. # To add new files to the system, you need to edit this file (or
  10. # others like it) and rerun the config script.
  11. #
  12. # Note: when running the config script, be sure to be in the
  13. # right directory (the same one this file is in) and run it as
  14. # "./config", not just "config" - in the latter case you will
  15. # probably get the host system's kernel config utility, which
  16. # will likely make a mess and produce mysterious error messages.
  17. #
  18. # The documentation for the syntax of these files follows.
  19. #
  20. ############################################################
  21. #
  22. # Kernel config file syntax:
  23. #
  24. # The syntax for including the system definition is:
  25. #
  26. # include conf.kern
  27. #
  28. # This should come first. This is because the system must be
  29. # defined before you can do much else useful.
  30. #
  31. # You can also include other files using the same syntax.
  32. #
  33. #
  34. # The syntax for turning on a kernel compile option is:
  35. #
  36. # options optname
  37. #
  38. # A previous "defoption" must have been seen first. See below
  39. # for more information.
  40. #
  41. # The act of compiling with debug info is (has to be) handled
  42. # specially, and is just "debug" without the "options".
  43. #
  44. #
  45. # The syntax for turning on a device driver is:
  46. #
  47. # device foo%
  48. # device foo% at bar%
  49. #
  50. # where the % is either a number or a star, which is treated as
  51. # a wildcard. The first line enables a device foo that is not
  52. # supposed to be "attached" to anything. The second line enables
  53. # a device foo that is attached to a device bar. For more
  54. # information about what this means, see below.
  55. #
  56. #
  57. ############################################################
  58. #
  59. # Kernel definition file syntax:
  60. #
  61. # Note: All source file names are relative to the top directory of the
  62. # kernel source, that is, src/kern.
  63. #
  64. # The syntax for adding a regular source file is:
  65. #
  66. # [machine M | platform P] file sourcefile.c
  67. #
  68. # Such a file is always included automatically in every kernel
  69. # built for machine M, or platform P, or all kernels.
  70. #
  71. #
  72. # The syntax for defining optional source files is:
  73. #
  74. # defoption optname
  75. # [machine M | platform P] optfile optname sourcefile.c
  76. # [machine M | platform P] optofffile optname sourcefile.c
  77. #
  78. # "defoption" declares the name of a kernel option. These are
  79. # then turned on by including "options optname" in a
  80. # kernel config.
  81. #
  82. # Source files added with optfile are compiled in if the option
  83. # specified is enabled. Source files added with optofffile are
  84. # compiled in if the option specified is not enabled.
  85. #
  86. # Additionally, a file "opt-optname.h" is created in the compile
  87. # directory, which defines a C preprocessor symbol OPT_OPTNAME.
  88. # This symbol is #defined to either 0 or 1 in the logical way.
  89. # Thus, you can have small bits of code that are enabled or
  90. # disabled by particular options by writing constructs like
  91. #
  92. # #include "opt-foo.h"
  93. # #if OPT_FOO
  94. # code();
  95. # #else
  96. # other_code();
  97. # #endif
  98. #
  99. # *** Be sure to use #if and not #ifdef - you want the value
  100. # of the symbol.
  101. # *** Be sure to remember to include the header file for the
  102. # option - if you don't, cpp will silently assume it is 0,
  103. # which can be quite frustrating.
  104. #
  105. # The defoption must be seen before any optional file
  106. # declarations that use it.
  107. #
  108. #
  109. # The syntax for defining device drivers is:
  110. #
  111. # defdevice devname sourcefile.c
  112. # defattach devname% otherdevname% sourcefile.c
  113. # pseudoattach devname%
  114. #
  115. # Declare a device driver and its "attachment(s)". (The device
  116. # driver can then be selectively included or not included in any
  117. # particular kernel by using the "device" statement in the
  118. # kernel config file.)
  119. #
  120. # The specified source files are only compiled if the device
  121. # is enabled.
  122. #
  123. # The % is either a specific number N, meaning "only the Nth
  124. # such device can be attached this way", or a star (*), meaning
  125. # "any such device can be attached this way".
  126. #
  127. # In OS/161, device drivers are conceptually organized into
  128. # trees. This mimics the organization of real hardware, where
  129. # several expansion cards are plugged into one bus and there
  130. # might be several devices on each expansion card and so forth.
  131. #
  132. # There can be any number of these trees. However, devices at
  133. # the root of each tree must be able to probe and "find"
  134. # themselves completely on their own. This generally means that
  135. # they are either all software with no hardware, or they are the
  136. # system main bus which is located in a machine-dependent way.
  137. #
  138. # Software-only devices are known as "pseudo-devices". These
  139. # are "attached" with the pseudoattach directive; functions
  140. # of the form
  141. #
  142. # pseudoattach_devname
  143. #
  144. # are called from autoconf.c to create instances as requested.
  145. # These calls are made from the function pseudoconfig(), which
  146. # should be called from dev/init.c after hardware device
  147. # initialization completes. The pseudoattach functions should
  148. # perform all setup and initialization necessary. (No
  149. # config_devname function will be called.)
  150. #
  151. # Devices with attachments are automatically probed and
  152. # configured from code in autoconf.c. This file is generated
  153. # by the config script. It contains functions called
  154. # "autoconf_devname", for each device. These functions call
  155. # other functions, which are supplied by device drivers,
  156. # which have the following hardwired names:
  157. #
  158. # attach_devname1_to_devname2
  159. #
  160. # A "devname2" device has been found and configured;
  161. # this function attempts to probe the devname2 for
  162. # a "devname1" device. Returns NULL if nothing was
  163. # found.
  164. #
  165. # config_devname
  166. #
  167. # A "devname" device has been found. This function
  168. # can then perform initialization that's shared
  169. # among all the possible things it can be attached
  170. # to.
  171. #
  172. # The idea is that there can be multiple attachments for
  173. # the same device to different underlying devices. In the
  174. # real world this can be used to great effect when you have,
  175. # for instance, the same ethernet chipset used on both PCI
  176. # and ISA cards - the chipset behaves the same way in both
  177. # cases, but the probe and attach logic is very different.
  178. #
  179. # The attach_foo_to_bar functions are put in the files
  180. # specified with defattach; the config_foo function (and
  181. # generally the rest of the driver for the foo device) is
  182. # put in the file specified with defdevice.
  183. #
  184. # One selects particular attachments when including the device
  185. # in the kernel. A top-level device with no attachments should
  186. # be included with this syntax:
  187. #
  188. # device bar
  189. #
  190. # A pseudo-device should be included with this syntax:
  191. #
  192. # device bar0
  193. #
  194. # To make use of device foo, which can be found attached to
  195. # device bar, one of the following syntaxes is used:
  196. #
  197. # device foo* at bar*
  198. # device foo* at bar0
  199. # device foo0 at bar*
  200. # device foo0 at bar0
  201. #
  202. # depending on to what extent you want to configure only a
  203. # specific device number.
  204. #
  205. # It sometimes matters what order things are handled in; probes
  206. # occur more or less in the order things appear in the config,
  207. # as constrained by the tree structure of the available devices.
  208. #
  209. # Note that OS/161 does not make extensive use of this
  210. # functionality, and the device driver architecture outlined
  211. # here is overkill for such a limited environment as System/161.
  212. # However, it's similar to the way real systems are organized.
  213. #
  214. #
  215. # The syntax for including other config/definition files is:
  216. #
  217. # include filename
  218. #
  219. # The filename is relative to the top of the kernel source tree.
  220. #
  221. # Thus,
  222. # include conf/conf.foo includes src/kern/conf/conf.foo
  223. #
  224. #
  225. ############################################################
  226. ########################################
  227. # #
  228. # Generic machine-independent devices. #
  229. # #
  230. ########################################
  231. #
  232. # These are abstract system services we expect the system hardware to
  233. # provide: beeping, system console I/O, and time of day clock.
  234. #
  235. # These come before the archinclude so that the hardware device
  236. # definitions, which are included from there, can define attachments
  237. # for them.
  238. #
  239. defdevice beep dev/generic/beep.c
  240. defdevice con dev/generic/console.c
  241. defdevice rtclock dev/generic/rtclock.c
  242. defdevice random dev/generic/random.c
  243. ########################################
  244. # #
  245. # Machine-dependent stuff #
  246. # #
  247. ########################################
  248. #
  249. # Get the definitions for each machine and platform supported. The
  250. # ones used will be selected by make at compile time based on the
  251. # contents of the top-level defs.mk file.
  252. #
  253. # This will declare a bunch of machine-dependent source files and also
  254. # declare all the hardware devices (since what sorts of hardware we
  255. # expect to find is machine-dependent.)
  256. #
  257. include arch/mips/conf/conf.arch
  258. include arch/sys161/conf/conf.arch
  259. ########################################
  260. # #
  261. # Support code #
  262. # #
  263. ########################################
  264. #
  265. # Kernel utility code
  266. #
  267. file lib/array.c
  268. file lib/bitmap.c
  269. file lib/bswap.c
  270. file lib/kgets.c
  271. file lib/kprintf.c
  272. file lib/misc.c
  273. file lib/uio.c
  274. # UW Mod
  275. file lib/queue.c
  276. file lib/list.c
  277. defoption noasserts
  278. #
  279. # Standard C functions
  280. #
  281. # For most of these, we take the source files from our libc. Note
  282. # that those files have to have been hacked a bit to support this.
  283. #
  284. file ../common/libc/printf/__printf.c
  285. file ../common/libc/printf/snprintf.c
  286. file ../common/libc/stdlib/atoi.c
  287. file ../common/libc/string/bzero.c
  288. file ../common/libc/string/memcpy.c
  289. file ../common/libc/string/memmove.c
  290. file ../common/libc/string/strcat.c
  291. file ../common/libc/string/strchr.c
  292. file ../common/libc/string/strcmp.c
  293. file ../common/libc/string/strcpy.c
  294. file ../common/libc/string/strlen.c
  295. file ../common/libc/string/strrchr.c
  296. file ../common/libc/string/strtok_r.c
  297. ########################################
  298. # #
  299. # Core kernel source files #
  300. # #
  301. ########################################
  302. #
  303. # Thread system
  304. #
  305. file thread/clock.c
  306. # UW Mod
  307. # file thread/proc.c
  308. file proc/proc.c
  309. file thread/spl.c
  310. file thread/spinlock.c
  311. file thread/synch.c
  312. file thread/thread.c
  313. file thread/threadlist.c
  314. #
  315. # Virtual memory system
  316. # (you will probably want to add stuff here while doing the VM assignment)
  317. #
  318. file vm/kmalloc.c
  319. file vm/uw-vmstats.c
  320. # UW Mod - no longer used
  321. #defoption vm
  322. #optfile vm vm/vm.c
  323. # optofffile dumbvm vm/addrspace.c
  324. #
  325. # Network
  326. # (nothing here yet)
  327. #
  328. defoption net
  329. #optfile net net/net.c
  330. #
  331. # VFS layer
  332. #
  333. file vfs/device.c
  334. file vfs/vfscwd.c
  335. file vfs/vfslist.c
  336. file vfs/vfslookup.c
  337. file vfs/vfspath.c
  338. file vfs/vnode.c
  339. #
  340. # VFS devices
  341. #
  342. file vfs/devnull.c
  343. #
  344. # System call layer
  345. # (You will probably want to add stuff here while doing the basic system
  346. # calls assignment.)
  347. #
  348. file syscall/loadelf.c
  349. file syscall/runprogram.c
  350. file syscall/time_syscalls.c
  351. # UW additions
  352. file syscall/proc_syscalls.c
  353. file syscall/file_syscalls.c
  354. #
  355. # Startup and initialization
  356. #
  357. file startup/main.c
  358. file startup/menu.c
  359. ########################################
  360. # #
  361. # Filesystems #
  362. # #
  363. ########################################
  364. #
  365. # sfs (the small/simple filesystem)
  366. #
  367. defoption sfs
  368. optfile sfs fs/sfs/sfs_fs.c
  369. optfile sfs fs/sfs/sfs_io.c
  370. optfile sfs fs/sfs/sfs_vnode.c
  371. #
  372. # netfs (the networked filesystem - you might write this as one assignment)
  373. #
  374. defoption netfs
  375. #optfile netfs fs/netfs/netfs_fs.c # or whatever
  376. #
  377. # Note that "emufs" is completely contained in the "emu" device.
  378. #
  379. ########################################
  380. # #
  381. # Synchronization problems assignment #
  382. # #
  383. ########################################
  384. defoption synchprobs
  385. optfile synchprobs synchprobs/whalemating.c
  386. # UW Mod
  387. optfile synchprobs synchprobs/catmouse.c
  388. optfile synchprobs synchprobs/catmouse_synch.c
  389. optfile synchprobs synchprobs/traffic.c
  390. optfile synchprobs synchprobs/traffic_synch.c
  391. ########################################
  392. # #
  393. # Test code #
  394. # #
  395. ########################################
  396. file test/arraytest.c
  397. file test/bitmaptest.c
  398. file test/threadtest.c
  399. file test/tt3.c
  400. file test/synchtest.c
  401. file test/malloctest.c
  402. file test/fstest.c
  403. optfile net test/nettest.c
  404. # UW Mod
  405. file test/uw-tests.c
  406. # UW options for different assignments
  407. defoption A0
  408. defoption A1
  409. defoption A2
  410. defoption A3
  411. defoption A4
  412. defoption A5