Module Name: src
Committed By: uebayasi
Date: Thu Oct 30 08:20:15 UTC 2014
Modified Files:
src/usr.bin/config: TODO
Log Message:
config(1): More TODO
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/config/TODO
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/config/TODO
diff -u src/usr.bin/config/TODO:1.5 src/usr.bin/config/TODO:1.6
--- src/usr.bin/config/TODO:1.5 Thu Oct 30 01:26:20 2014
+++ src/usr.bin/config/TODO Thu Oct 30 08:20:15 2014
@@ -109,17 +109,22 @@ o Introduce "class".
Accordingly device/attach selection syntax should be revisited.
-o Support kernel constructor/destructor (.ctors/.dtors)
+o Support kernel constructor/destructor (.kctors/.kdtors)
Initialization and finalization should be called via constructors and
destructors. Don't hardcode those sequences as sys/kern/init_main.c:main()
does.
- The order of .ctors/.dtors is resolved by dependency. The difference from
+ The order of .kctors/.kdtors is resolved by dependency. The difference from
userland is that in kernel depended ones are located in lower addresses;
"machdep" module is the lowest. Thus the lowest entry in .ctors must be
executed the first.
+ The .kctors/.kdtors entries are executed by kernel's main() function, unlike
+ userland where start code executes .ctors/.dtors before main(). The hardcoded
+ sequence of various subsystem initializations in init_main.c:main() will be
+ replaced by an array of .kctors invocaions, and #ifdef's there will be gone.
+
o Replace linkset.
Don't allow kernel subsystems create random ELF sections (with potentially
@@ -131,3 +136,17 @@ o Replace linkset.
Dynamically loaded modules have to register those entries via constructors
(functions). This means that dynamically loaded modules are flexible but
come with overhead.
+
+o Shared kernel objects.
+
+ Since NetBSD has not established a clear kernek ABI, every single kernel
+ has to build all the objects by their own. As a result, similar kernels
+ (e.g. evbarm kernels) repeatedly compile similar objects, that is waste of
+ energy & space.
+
+ Share them if possible. For evb* ports, ideally everything except machdep.ko
+ should be shared.
+
+ While leaving optimizations as options (CPU specific optimizations, inlined
+ bus_space(9) operations, etc.) for users, the official binaries build
+ provided by TNF should be as portable as possible.