Index: contrib/arch/hadlbppp.py
===================================================================
--- contrib/arch/hadlbppp.py	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/hadlbppp.py	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -36,11 +36,11 @@
 INC, POST_INC, BLOCK_COMMENT, LINE_COMMENT, SYSTEM, ARCH, HEAD, BODY, NULL, \
 	INST, VAR, FIN, BIND, TO, SUBSUME, DELEGATE, IFACE, EXTENDS, PRE_BODY, \
-	PROTOTYPE, PAR_LEFT, PAR_RIGHT, SIGNATURE, PROTOCOL, FRAME, PROVIDES, \
-	REQUIRES = range(27)
+	PROTOTYPE, PAR_LEFT, PAR_RIGHT, SIGNATURE, PROTOCOL, INITIALIZATION, \
+	FINALIZATION, FRAME, PROVIDES, REQUIRES = range(29)
 
 def usage(prname):
 	"Print usage syntax"
 	
-	print "%s <OUTPUT>" % prname
+	print "%s <--dumpbp|--dumpadl|--noop>+ <OUTPUT>" % prname
 
 def tabs(cnt):
@@ -246,5 +246,5 @@
 	"Convert interface Behavior Protocol to generic protocol"
 	
-	result = ["("]
+	result = []
 	i = 0
 	
@@ -266,14 +266,12 @@
 		i += 1
 	
-	result.append(")")
-	result.append("*")
-	
 	return result
 
-def merge_bp(protocols):
+def merge_bp(initialization, finalization, protocols):
 	"Merge several Behavior Protocols"
 	
+	indep = []
+	
 	if (len(protocols) > 1):
-		result = []
 		first = True
 		
@@ -282,16 +280,45 @@
 				first = False
 			else:
-				result.append("|")
-			
-			result.append("(")
-			result.extend(protocol)
-			result.append(")")
-		
-		return result
-	
-	if (len(protocols) == 1):
-		return protocols[0]
-	
-	return []
+				indep.append("|")
+			
+			indep.append("(")
+			indep.extend(protocol)
+			indep.append(")")
+	elif (len(protocols) == 1):
+		indep = protocols[0]
+	
+	inited = []
+	
+	if (initialization != None):
+		if (len(indep) > 0):
+			inited.append("(")
+			inited.extend(initialization)
+			inited.append(")")
+			inited.append(";")
+			inited.append("(")
+			inited.extend(indep)
+			inited.append(")")
+		else:
+			inited = initialization
+	else:
+		inited = indep
+	
+	finited = []
+	
+	if (finalization != None):
+		if (len(inited) > 0):
+			finited.append("(")
+			finited.extend(inited)
+			finited.append(")")
+			finited.append(";")
+			finited.append("(")
+			finited.extend(finalization)
+			finited.append(")")
+		else:
+			finited = finalization
+	else:
+		finited = inited
+	
+	return finited
 
 def parse_bp(name, tokens, base_indent):
@@ -373,7 +400,11 @@
 	"Dump Behavior Protocol of a given frame"
 	
+	global opt_bp
+	
 	fname = "%s.bp" % frame['name']
 	
-	archf.write("instantiate %s from \"%s\"\n" % (var, fname))
+	if (archf != None):
+		archf.write("instantiate %s from \"%s\"\n" % (var, fname))
+	
 	outname = os.path.join(outdir, fname)
 	
@@ -381,4 +412,14 @@
 	if ('protocol' in frame):
 		protocols.append(frame['protocol'])
+	
+	if ('initialization' in frame):
+		initialization = frame['initialization']
+	else:
+		initialization = None
+	
+	if ('finalization' in frame):
+		finalization = frame['finalization']
+	else:
+		finalization = None
 	
 	if ('provides' in frame):
@@ -393,7 +434,9 @@
 				print "%s: Provided interface '%s' is undefined" % (frame['name'], provides['iface'])
 	
-	outf = file(outname, "w")
-	outf.write(parse_bp(outname, merge_bp(protocols), 0))
-	outf.close()
+	
+	if (opt_bp):
+		outf = file(outname, "w")
+		outf.write(parse_bp(outname, merge_bp(initialization, finalization, protocols), 0))
+		outf.close()
 
 def get_system_arch():
@@ -431,10 +474,15 @@
 	"Create null frame protocol"
 	
-	archf.write("frame \"%s\"\n" % fname)
+	global opt_bp
+	
+	if (archf != None):
+		archf.write("frame \"%s\"\n" % fname)
+	
 	outname = os.path.join(outdir, fname)
 	
-	outf = file(outname, "w")
-	outf.write("NULL")
-	outf.close()
+	if (opt_bp):
+		outf = file(outname, "w")
+		outf.write("NULL")
+		outf.close()
 
 def flatten_binds(binds, delegates, subsumes):
@@ -521,4 +569,6 @@
 	"Dump system architecture Behavior Protocol"
 	
+	global opt_bp
+	
 	arch = get_system_arch()
 	
@@ -562,6 +612,10 @@
 			break
 	
+	
 	outname = os.path.join(outdir, "%s.archbp" % arch['name'])
-	outf = file(outname, "w")
+	if (opt_bp):
+		outf = file(outname, "w")
+	else:
+		outf = None
 	
 	create_null_bp("null.bp", outdir, outf)
@@ -573,7 +627,9 @@
 	
 	for dst, src in directed_binds.items():
-		outf.write("bind %s to %s\n" % (", ".join(src), dst))
-	
-	outf.close()
+		if (outf != None):
+			outf.write("bind %s to %s\n" % (", ".join(src), dst))
+	
+	if (outf != None):
+		outf.close()
 
 def preproc_adl(raw, inarg):
@@ -591,4 +647,6 @@
 	global frame
 	global protocol
+	global initialization
+	global finalization
 	
 	global iface_properties
@@ -689,4 +747,72 @@
 			
 			if (BODY in context):
+				if (FINALIZATION in context):
+					if (token == "{"):
+						indent += 1
+					elif (token == "}"):
+						indent -= 1
+					
+					if (((token[-1] == ":") and (indent == 0)) or (indent == -1)):
+						bp = split_bp(finalization)
+						finalization = None
+						
+						if (not frame in frame_properties):
+							frame_properties[frame] = {}
+						
+						if ('finalization' in frame_properties[frame]):
+							print "%s: Finalization protocol for frame '%s' already defined" % (inname, frame)
+						else:
+							frame_properties[frame]['finalization'] = bp
+						
+						output += "\n%s" % tabs(2)
+						output += parse_bp(inname, bp, 2)
+						
+						context.remove(FINALIZATION)
+						if (indent == -1):
+							output += "\n%s" % token
+							context.remove(BODY)
+							context.add(NULL)
+							indent = 0
+							continue
+						else:
+							indent = 2
+					else:
+						finalization += token
+						continue
+				
+				if (INITIALIZATION in context):
+					if (token == "{"):
+						indent += 1
+					elif (token == "}"):
+						indent -= 1
+					
+					if (((token[-1] == ":") and (indent == 0)) or (indent == -1)):
+						bp = split_bp(initialization)
+						initialization = None
+						
+						if (not frame in frame_properties):
+							frame_properties[frame] = {}
+						
+						if ('initialization' in frame_properties[frame]):
+							print "%s: Initialization protocol for frame '%s' already defined" % (inname, frame)
+						else:
+							frame_properties[frame]['initialization'] = bp
+						
+						output += "\n%s" % tabs(2)
+						output += parse_bp(inname, bp, 2)
+						
+						context.remove(INITIALIZATION)
+						if (indent == -1):
+							output += "\n%s" % token
+							context.remove(BODY)
+							context.add(NULL)
+							indent = 0
+							continue
+						else:
+							indent = 2
+					else:
+						initialization += token
+						continue
+				
 				if (PROTOCOL in context):
 					if (token == "{"):
@@ -695,5 +821,5 @@
 						indent -= 1
 					
-					if (indent == -1):
+					if (((token[-1] == ":") and (indent == 0)) or (indent == -1)):
 						bp = split_bp(protocol)
 						protocol = None
@@ -709,14 +835,17 @@
 						output += "\n%s" % tabs(2)
 						output += parse_bp(inname, bp, 2)
-						output += "\n%s" % token
-						indent = 0
 						
 						context.remove(PROTOCOL)
-						context.remove(BODY)
-						context.add(NULL)
+						if (indent == -1):
+							output += "\n%s" % token
+							context.remove(BODY)
+							context.add(NULL)
+							indent = 0
+							continue
+						else:
+							indent = 2
 					else:
 						protocol += token
-					
-					continue
+						continue
 				
 				if (REQUIRES in context):
@@ -816,5 +945,4 @@
 					output += "\n%s%s" % (tabs(indent - 1), token)
 					context.add(PROVIDES)
-					protocol = ""
 					continue
 				
@@ -822,5 +950,18 @@
 					output += "\n%s%s" % (tabs(indent - 1), token)
 					context.add(REQUIRES)
-					protocol = ""
+					continue
+				
+				if (token == "initialization:"):
+					output += "\n%s%s" % (tabs(indent - 1), token)
+					indent = 0
+					context.add(INITIALIZATION)
+					initialization = ""
+					continue
+				
+				if (token == "finalization:"):
+					output += "\n%s%s" % (tabs(indent - 1), token)
+					indent = 0
+					context.add(FINALIZATION)
+					finalization = ""
 					continue
 				
@@ -1012,5 +1153,5 @@
 						print "%s: Expected inherited interface name in interface head '%s'" % (inname, interface)
 					else:
-						output += " %s" % token
+						output += "%s " % token
 						if (not interface in iface_properties):
 							iface_properties[interface] = {}
@@ -1023,5 +1164,5 @@
 				
 				if (token == "extends"):
-					output += " %s" % token
+					output += "%s " % token
 					context.add(EXTENDS)
 					continue
@@ -1376,6 +1517,10 @@
 	global frame
 	global protocol
+	global initialization
+	global finalization
 	
 	global arg0
+	
+	global opt_adl
 	
 	output = ""
@@ -1385,4 +1530,6 @@
 	frame = None
 	protocol = None
+	initialization = None
+	finalization = None
 	arg0 = None
 	
@@ -1390,5 +1537,5 @@
 	output = output.strip()
 	
-	if (output != ""):
+	if ((output != "") and (opt_adl)):
 		outf = file(outname, "w")
 		outf.write(output)
@@ -1416,10 +1563,26 @@
 	global frame_properties
 	global arch_properties
-	
-	if (len(sys.argv) < 2):
+	global opt_bp
+	global opt_adl
+	
+	if (len(sys.argv) < 3):
 		usage(sys.argv[0])
 		return
 	
-	path = os.path.abspath(sys.argv[1])
+	opt_bp = False
+	opt_adl = False
+	
+	for arg in sys.argv[1:(len(sys.argv) - 1)]:
+		if (arg == "--dumpbp"):
+			opt_bp = True
+		elif (arg == "--dumpadl"):
+			opt_adl = True
+		elif (arg == "--noop"):
+			pass
+		else:
+			print "Error: Unknown command line option '%s'" % arg
+			return
+	
+	path = os.path.abspath(sys.argv[-1])
 	if (not os.path.isdir(path)):
 		print "Error: <OUTPUT> is not a directory"
Index: contrib/arch/kernel/kernel.adl
===================================================================
--- contrib/arch/kernel/kernel.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/kernel/kernel.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -7,5 +7,5 @@
 		unative_t sys_klog(int fd, const void *buf, size_t size);
 	protocol:
-		?sys_klog
+		?sys_klog*
 };
 
@@ -17,6 +17,8 @@
 		unative_t sys_debug_disable_console(void);
 	protocol:
-		?sys_debug_enable_console +
-		?sys_debug_disable_console
+		(
+			?sys_debug_enable_console +
+			?sys_debug_disable_console
+		)*
 };
 
@@ -25,5 +27,5 @@
 		unative_t sys_tls_set(unative_t addr);
 	protocol:
-		?sys_tls_set
+		?sys_tls_set*
 };
 
@@ -38,7 +40,9 @@
 		unative_t sys_thread_get_id(thread_id_t *uspace_thread_id);
 	protocol:
-		?sys_thread_create +
-		?sys_thread_get_id +
-		?sys_thread_exit
+		(
+			?sys_thread_create +
+			?sys_thread_get_id +
+			?sys_thread_exit
+		)*
 };
 
@@ -50,6 +54,8 @@
 		unative_t sys_task_get_id(task_id_t *uspace_task_id);
 	protocol:
-		?sys_task_set_name +
-		?sys_task_get_id
+		(
+			?sys_task_set_name +
+			?sys_task_get_id
+		)*
 };
 
@@ -58,5 +64,5 @@
 		unative_t sys_program_spawn_loader(char *uspace_name, size_t name_len);
 	protocol:
-		?sys_program_spawn_loader
+		?sys_program_spawn_loader*
 };
 
@@ -68,6 +74,8 @@
 		unative_t sys_futex_wakeup(uintptr_t uaddr);
 	protocol:
-		?sys_futex_sleep_timeout +
-		?sys_futex_wakeup
+		(
+			?sys_futex_sleep_timeout +
+			?sys_futex_wakeup
+		)*
 };
 
@@ -76,5 +84,5 @@
 		unative_t sys_smc_coherence(uintptr_t va, size_t size);
 	protocol:
-		?sys_smc_coherence
+		?sys_smc_coherence*
 };
 
@@ -92,8 +100,10 @@
 		unative_t sys_as_area_destroy(uintptr_t address);
 	protocol:
-		?sys_as_area_create +
-		?sys_as_area_resize +
-		?sys_as_area_change_flags +
-		?sys_as_area_destroy
+		(
+			?sys_as_area_create +
+			?sys_as_area_resize +
+			?sys_as_area_change_flags +
+			?sys_as_area_destroy
+		)*
 };
 
@@ -132,15 +142,17 @@
 		unative_t sys_ipc_poke(void);
 	protocol:
-		?sys_ipc_call_sync_fast +
-		?sys_ipc_call_sync_slow +
-		?sys_ipc_call_async_fast +
-		?sys_ipc_call_async_slow +
-		?sys_ipc_forward_fast +
-		?sys_ipc_forward_slow +
-		?sys_ipc_answer_fast +
-		?sys_ipc_answer_slow +
-		?sys_ipc_hangup +
-		?sys_ipc_wait_for_call +
-		?sys_ipc_poke
+		(
+			?sys_ipc_call_sync_fast +
+			?sys_ipc_call_sync_slow +
+			?sys_ipc_call_async_fast +
+			?sys_ipc_call_async_slow +
+			?sys_ipc_forward_fast +
+			?sys_ipc_forward_slow +
+			?sys_ipc_answer_fast +
+			?sys_ipc_answer_slow +
+			?sys_ipc_hangup +
+			?sys_ipc_wait_for_call +
+			?sys_ipc_poke
+		)*
 };
 
@@ -149,5 +161,5 @@
 		unative_t sys_event_subscribe(unative_t evno, unative_t method);
 	protocol:
-		?sys_event_subscribe
+		?sys_event_subscribe*
 };
 
@@ -159,6 +171,8 @@
 		unative_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps);
 	protocol:
-		?sys_cap_grant +
-		?sys_cap_rewoke
+		(
+			?sys_cap_grant +
+			?sys_cap_rewoke
+		)*
 };
 
@@ -182,10 +196,12 @@
 		unative_t sys_ipc_unregister_irq(inr_t inr, devno_t devno);
 	protocol:
-		?sys_enable_iospace +
-		?sys_physmem_map +
-		?sys_device_assign_devno +
-		?sys_preempt_control +
-		?sys_ipc_register_irq +
-		?sys_ipc_unregister_irq
+		(
+			?sys_enable_iospace +
+			?sys_physmem_map +
+			?sys_device_assign_devno +
+			?sys_preempt_control +
+			?sys_ipc_register_irq +
+			?sys_ipc_unregister_irq
+		)*
 };
 
@@ -197,6 +213,8 @@
 		unative_t sys_sysinfo_value(unatice_t ptr, unative_t len);
 	protocol:
-		?sys_sysinfo_valid +
-		?sys_sysinfo_value
+		(
+			?sys_sysinfo_valid +
+			?sys_sysinfo_value
+		)*
 };
 
@@ -205,5 +223,5 @@
 		unative_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid_arg);
 	protocol:
-		?sys_ipc_connect_kbox
+		?sys_ipc_connect_kbox*
 };
 
Index: contrib/arch/uspace/app/klog/klog.adl
===================================================================
--- contrib/arch/uspace/app/klog/klog.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/app/klog/klog.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -3,6 +3,7 @@
 		naming_service ns;
 		[/uspace/lib/libc/requires]
+	initialization:
+		!ns.ipc_m_share_in /* SERVICE_MEM_KLOG */
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[klog.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/app/klog/klog.bp
===================================================================
--- contrib/arch/uspace/app/klog/klog.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,3 +1,0 @@
-(
-	!ns.ipc_m_share_in /* SERVICE_MEM_KLOG */
-)
Index: contrib/arch/uspace/srv/bd/rd/rd.adl
===================================================================
--- contrib/arch/uspace/srv/bd/rd/rd.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/bd/rd/rd.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -8,6 +8,8 @@
 		ns ns;
 		devmap_driver devmap_driver;
+	initialization:
+		[/uspace/lib/libc/fnc.devmap_driver_register] ;
+		[/uspace/lib/libc/fnc.devmap_device_register]
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[rd.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/srv/bd/rd/rd.bp
===================================================================
--- contrib/arch/uspace/srv/bd/rd/rd.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,4 +1,0 @@
-(
-	[/uspace/lib/libc/fnc.devmap_driver_register] ;
-	[/uspace/lib/libc/fnc.devmap_device_register]
-)
Index: contrib/arch/uspace/srv/console/console.adl
===================================================================
--- contrib/arch/uspace/srv/console/console.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/console/console.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -52,7 +52,30 @@
 		ns ns;
 		sys_console sys_console;
+	initialization:
+		!ns.ipc_m_connect_me_to /* kbd */ ;
+		!kbd.ipc_m_connect_to_me ;
+		!ns.ipc_m_connect_me_to /* fb */ ;
+		[/uspace/lib/libc/fnc.devmap_driver_register] ;
+		!fb.get_resolution ;
+		(
+			[fnc.vp_create] +
+			[fnc.vp_switch]
+		)* ;
+		[fnc.make_pixmap]* ;
+		[fnc.make_anim] ;
+		[fnc.vp_switch] ;
+		!fb.flush ;
+		!fb.get_csize ;
+		!fb.get_color_cap ;
+		!fb.ipc_m_share_out ;
+		[/uspace/lib/libc/fnc.devmap_device_register]* ;
+		!sys_console.sys_disable_console ;
+		[fnc.gcons_redraw_console] ;
+		[fnc.set_rgb_color] ;
+		[fnc.screen_clear] ;
+		[fnc.curs_goto] ;
+		[fnc.curs_visibility]
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[console_server.bp]
+		[/uspace/lib/libc/protocol]
 };
 
Index: ntrib/arch/uspace/srv/console/console_server.bp
===================================================================
--- contrib/arch/uspace/srv/console/console_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,25 +1,0 @@
-(
-	!ns.ipc_m_connect_me_to /* kbd */ ;
-	!kbd.ipc_m_connect_to_me ;
-	!ns.ipc_m_connect_me_to /* fb */ ;
-	[/uspace/lib/libc/fnc.devmap_driver_register] ;
-	!fb.get_resolution ;
-	(
-		[fnc.vp_create] +
-		[fnc.vp_switch]
-	)* ;
-	[fnc.make_pixmap]* ;
-	[fnc.make_anim] ;
-	[fnc.vp_switch] ;
-	!fb.flush ;
-	!fb.get_csize ;
-	!fb.get_color_cap ;
-	!fb.ipc_m_share_out ;
-	[/uspace/lib/libc/fnc.devmap_device_register]* ;
-	!sys_console.sys_disable_console ;
-	[fnc.gcons_redraw_console] ;
-	[fnc.set_rgb_color] ;
-	[fnc.screen_clear] ;
-	[fnc.curs_goto] ;
-	[fnc.curs_visibility]
-)
Index: contrib/arch/uspace/srv/devmap/devmap.adl
===================================================================
--- contrib/arch/uspace/srv/devmap/devmap.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/devmap/devmap.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -63,6 +63,7 @@
 		[/uspace/lib/libc/requires]
 		ns ns;
+	initialization:
+		!ns.ipc_m_connect_to_me /* devmap */
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[devmap_server.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/srv/devmap/devmap_server.bp
===================================================================
--- contrib/arch/uspace/srv/devmap/devmap_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,3 +1,0 @@
-(
-	!ns.ipc_m_connect_to_me /* devmap */
-)
Index: contrib/arch/uspace/srv/fb/fb.adl
===================================================================
--- contrib/arch/uspace/srv/fb/fb.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/fb/fb.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -105,6 +105,7 @@
 		[/uspace/lib/libc/requires]
 		ns ns;
+	initialization:
+		!ns.ipc_m_connect_to_me /* fb */
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[fb_server.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/srv/fb/fb_server.bp
===================================================================
--- contrib/arch/uspace/srv/fb/fb_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,3 +1,0 @@
-(
-	!ns.ipc_m_connect_to_me /* fb */
-)
Index: contrib/arch/uspace/srv/fs/devfs/devfs.adl
===================================================================
--- contrib/arch/uspace/srv/fs/devfs/devfs.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/fs/devfs/devfs.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -13,6 +13,9 @@
 		devmap_client devmap_client;
 		service device;
+	initialization:
+		[/uspace/lib/libc/fnc.devmap_get_phone] ;
+		!ns.ipc_m_connect_me_to /* vfs */ ;
+		[/uspace/lib/libfs/fnc.fs_register]
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[devfs_server.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/srv/fs/devfs/devfs_server.bp
===================================================================
--- contrib/arch/uspace/srv/fs/devfs/devfs_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,5 +1,0 @@
-(
-	[/uspace/lib/libc/fnc.devmap_get_phone] ;
-	!ns.ipc_m_connect_me_to /* vfs */ ;
-	[/uspace/lib/libfs/fnc.fs_register]
-)
Index: contrib/arch/uspace/srv/fs/fat/fat.adl
===================================================================
--- contrib/arch/uspace/srv/fs/fat/fat.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/fs/fat/fat.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -12,6 +12,8 @@
 		ns ns;
 		rd rd;
+	initialization:
+		!ns.ipc_m_connect_me_to /* vfs */ ;
+		[/uspace/lib/libfs/fnc.fs_register]
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[fat_server.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/srv/fs/fat/fat_server.bp
===================================================================
--- contrib/arch/uspace/srv/fs/fat/fat_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,4 +1,0 @@
-(
-	!ns.ipc_m_connect_me_to /* vfs */ ;
-	[/uspace/lib/libfs/fnc.fs_register]
-)
Index: contrib/arch/uspace/srv/fs/tmpfs/tmpfs.adl
===================================================================
--- contrib/arch/uspace/srv/fs/tmpfs/tmpfs.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/fs/tmpfs/tmpfs.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -12,6 +12,8 @@
 		ns ns;
 		rd rd;
+	initialization:
+		!ns.ipc_m_connect_me_to /* vfs */ ;
+		[/uspace/lib/libfs/fnc.fs_register]
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[tmpfs_server.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/srv/fs/tmpfs/tmpfs_server.bp
===================================================================
--- contrib/arch/uspace/srv/fs/tmpfs/tmpfs_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,4 +1,0 @@
-(
-	!ns.ipc_m_connect_me_to /* vfs */ ;
-	[/uspace/lib/libfs/fnc.fs_register]
-)
Index: contrib/arch/uspace/srv/kbd/kbd.adl
===================================================================
--- contrib/arch/uspace/srv/kbd/kbd.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/kbd/kbd.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -26,6 +26,8 @@
 		event event;
 		ns ns;
+	initialization:
+		!ns.ipc_m_connect_to_me /* kbd */ ;
+		!event.event*
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[kbd_server.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/srv/kbd/kbd_server.bp
===================================================================
--- contrib/arch/uspace/srv/kbd/kbd_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,7 +1,0 @@
-(
-	tentative {
-		!ns.ipc_m_connect_me_to /* cir */
-	} ;
-	!ns.ipc_m_connect_to_me /* kbd */ ;
-	!event.event*
-)
Index: contrib/arch/uspace/srv/loader/loader.adl
===================================================================
--- contrib/arch/uspace/srv/loader/loader.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/loader/loader.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -27,6 +27,8 @@
 		[/uspace/lib/libc/requires]
 		ns ns;
+	initialization:
+		!ns.id_intro ;
+		!ns.ipc_m_connect_to_me /* loader */
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[loader_server.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/srv/loader/loader_server.bp
===================================================================
--- contrib/arch/uspace/srv/loader/loader_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,4 +1,0 @@
-(
-	!ns.id_intro ;
-	!ns.ipc_m_connect_to_me /* loader */
-)
Index: contrib/arch/uspace/srv/pci/pci.adl
===================================================================
--- contrib/arch/uspace/srv/pci/pci.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/pci/pci.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -10,6 +10,7 @@
 		[/uspace/lib/libc/requires]
 		ns ns;
+	initialization:
+		!ns.ipc_m_connect_to_me /* pci */
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[pci_server.bp]
+		[/uspace/lib/libc/protocol]
 };
Index: ntrib/arch/uspace/srv/pci/pci_server.bp
===================================================================
--- contrib/arch/uspace/srv/pci/pci_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,3 +1,0 @@
-(
-	!ns.ipc_m_connect_to_me /* pci */
-)
Index: contrib/arch/uspace/srv/vfs/vfs.adl
===================================================================
--- contrib/arch/uspace/srv/vfs/vfs.adl	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/arch/uspace/srv/vfs/vfs.adl	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -92,7 +92,8 @@
 		devfs devfs;
 		ns ns;
+	initialization:
+		!ns.ipc_m_connect_to_me /* vfs */
 	protocol:
-		[/uspace/lib/libc/protocol] |
-		[vfs_server.bp]
+		[/uspace/lib/libc/protocol]
 };
 
Index: ntrib/arch/uspace/srv/vfs/vfs_server.bp
===================================================================
--- contrib/arch/uspace/srv/vfs/vfs_server.bp	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ 	(revision )
@@ -1,3 +1,0 @@
-(
-	!ns.ipc_m_connect_to_me /* vfs */
-)
Index: contrib/highlight/adl.syntax
===================================================================
--- contrib/highlight/adl.syntax	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ contrib/highlight/adl.syntax	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -28,4 +28,6 @@
 	
 	keyword whole protocol yellow
+	keyword whole initialization yellow
+	keyword whole finalization yellow
 	keyword whole provides yellow
 	keyword whole requires yellow
Index: kernel/genarch/Makefile.inc
===================================================================
--- kernel/genarch/Makefile.inc	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ kernel/genarch/Makefile.inc	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -59,5 +59,6 @@
 ifeq ($(CONFIG_SOFTINT),y)
 	GENARCH_SOURCES += \
-		genarch/src/softint/division.c
+		genarch/src/softint/division.c \
+		genarch/src/softint/multiplication.c
 endif
 
Index: kernel/genarch/include/softint/multiplication.h
===================================================================
--- kernel/genarch/include/softint/multiplication.h	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
+++ kernel/genarch/include/softint/multiplication.h	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2009 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genarch
+ * @{
+ */ 
+/**
+ * @file
+ */
+
+#ifndef __SOFTINT_MULTIPLICATION_H__
+#define __SOFTINT_MULTIPLICATION_H__
+
+/* 64 bit multiplication */
+long long __muldi3(long long a, long long b);
+
+#endif
+
+/** @}
+ */
+
+
Index: kernel/genarch/src/softint/multiplication.c
===================================================================
--- kernel/genarch/src/softint/multiplication.c	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
+++ kernel/genarch/src/softint/multiplication.c	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2009 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genarch
+ * @{
+ */ 
+/**
+ * @file
+ * SW implementation of 32 and 64 bit multiplication.
+ */
+
+#include <genarch/softint/multiplication.h>
+
+/** Set 1 to return MAX_INT64 or MIN_INT64 on overflow */
+#ifndef SOFTINT_CHECK_OF
+# define SOFTINT_CHECK_OF 0
+#endif
+
+#define MAX_UINT16 (0xFFFFu)
+#define MAX_UINT32 (0xFFFFFFFFu)
+#define MAX_INT64 (0x7FFFFFFFFFFFFFFFll)
+#define MIN_INT64 (0x8000000000000000ll)
+
+/**
+ * Multiply two integers and return long long as result. 
+ * This function is overflow safe.
+ * @param a
+ * @param b
+ * @result
+ */
+static unsigned long long mul(unsigned int a, unsigned int b) {
+	unsigned int a1, a2, b1, b2;
+	unsigned long long t1, t2, t3;	
+
+	a1 = a >> 16;
+	a2 = a & MAX_UINT16;
+	b1 = b >> 16;
+	b2 = b & MAX_UINT16;
+
+	t1 = a1 * b1;
+	t2 = a1*b2;
+	t2 += a2*b1;
+	t3 = a2*b2;
+
+	t3 = (((t1 << 16) + t2) << 16) + t3; 
+
+	return t3;
+}
+
+/** Emulate multiplication of two 64-bit long long integers.
+ *
+ */
+long long __muldi3 (long long a, long long b)
+{
+	long long result;
+	unsigned long long t1,t2;
+	unsigned long long a1, a2, b1, b2;
+	char neg = 0;
+
+	if (a < 0) {
+		neg = !neg;
+		a = -a;
+	}
+
+	if (b < 0) {
+		neg = !neg;
+		b = -b;
+	}
+
+	a1 = a >> 32;
+	b1 = b >> 32;
+
+	a2 = a & (MAX_UINT32);
+	b2 = b & (MAX_UINT32);
+
+	if (SOFTINT_CHECK_OF && (a1 != 0) && (b1 != 0)) {
+		// error, overflow
+		return (neg?MIN_INT64:MAX_INT64);
+	}
+
+	// (if OF checked) a1 or b1 is zero => result fits in 64 bits, no need to another overflow check
+	t1 = mul(a1,b2) + mul(b1,a2);	
+
+	if (SOFTINT_CHECK_OF && t1 > MAX_UINT32) {
+		// error, overflow
+		return (neg?MIN_INT64:MAX_INT64);
+	}
+
+	t1 = t1 << 32;
+	t2 = mul(a2,b2);
+	t2 += t1;
+
+	/* t2 & (1ull << 63) - if this bit is set in unsigned long long,
+	 * result does not fit in signed one */
+	if (SOFTINT_CHECK_OF && ((t2 < t1) || (t2 & (1ull << 63)))) {
+		// error, overflow
+		return (neg?MIN_INT64:MAX_INT64);
+	}
+
+	result = t2;
+
+	if (neg) {
+		result = -result;
+	}
+
+	return result;
+}	
+
+/** @}
+ */
Index: uspace/lib/softint/Makefile
===================================================================
--- uspace/lib/softint/Makefile	(revision 8810c637dd169b6a4102dd564f3f7db7f01d685a)
+++ uspace/lib/softint/Makefile	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -45,5 +45,6 @@
 
 GENERIC_SOURCES = \
-	generic/division.c
+	generic/division.c\
+	generic/multiplication.c
 
 GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES)))
Index: uspace/lib/softint/generic/multiplication.c
===================================================================
--- uspace/lib/softint/generic/multiplication.c	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
+++ uspace/lib/softint/generic/multiplication.c	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2009 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup softint
+ * @{
+ */ 
+/**
+ * @file
+ * SW implementation of 32 and 64 bit multiplication.
+ */
+
+#include <multiplication.h>
+#include <stdint.h> 
+
+/** Set 1 to return MAX_INT64 or MIN_INT64 on overflow */
+#ifndef SOFTINT_CHECK_OF
+# define SOFTINT_CHECK_OF 0
+#endif
+
+/**
+ * Multiply two integers and return long long as result. 
+ * This function is overflow safe.
+ * @param a
+ * @param b
+ * @result
+ */
+static unsigned long long mul(unsigned int a, unsigned int b) {
+	unsigned int a1, a2, b1, b2;
+	unsigned long long t1, t2, t3;	
+
+	a1 = a >> 16;
+	a2 = a & MAX_UINT16;
+	b1 = b >> 16;
+	b2 = b & MAX_UINT16;
+
+	t1 = a1 * b1;
+	t2 = a1*b2;
+	t2 += a2*b1;
+	t3 = a2*b2;
+
+	t3 = (((t1 << 16) + t2) << 16) + t3; 
+
+	return t3;
+}
+
+/** Emulate multiplication of two 64-bit long long integers.
+ *
+ */
+long long __muldi3 (long long a, long long b)
+{
+	long long result;
+	unsigned long long t1,t2;
+	unsigned long long a1, a2, b1, b2;
+	char neg = 0;
+
+	if (a < 0) {
+		neg = !neg;
+		a = -a;
+	}
+
+	if (b < 0) {
+		neg = !neg;
+		b = -b;
+	}
+
+	a1 = a >> 32;
+	b1 = b >> 32;
+
+	a2 = a & (MAX_UINT32);
+	b2 = b & (MAX_UINT32);
+
+	if (SOFTINT_CHECK_OF && (a1 != 0) && (b1 != 0)) {
+		// error, overflow
+		return (neg?MIN_INT64:MAX_INT64);
+	}
+
+	// (if OF checked) a1 or b1 is zero => result fits in 64 bits, no need to another overflow check
+	t1 = mul(a1,b2) + mul(b1,a2);	
+
+	if (SOFTINT_CHECK_OF && t1 > MAX_UINT32) {
+		// error, overflow
+		return (neg?MIN_INT64:MAX_INT64);
+	}
+
+	t1 = t1 << 32;
+	t2 = mul(a2,b2);
+	t2 += t1;
+
+	/* t2 & (1ull << 63) - if this bit is set in unsigned long long,
+	 * result does not fit in signed one */
+	if (SOFTINT_CHECK_OF && ((t2 < t1) || (t2 & (1ull << 63)))) {
+		// error, overflow
+		return (neg?MIN_INT64:MAX_INT64);
+	}
+
+	result = t2;
+
+	if (neg) {
+		result = -result;
+	}
+
+	return result;
+}	
+
+/** @}
+ */
Index: uspace/lib/softint/include/multiplication.h
===================================================================
--- uspace/lib/softint/include/multiplication.h	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
+++ uspace/lib/softint/include/multiplication.h	(revision f5af63551dff4de3a7ab1cf6b8554664b6554751)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2009 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup softint
+ * @{
+ */ 
+/**
+ * @file
+ */
+
+#ifndef __SOFTINT_MULTIPLICATION_H__
+#define __SOFTINT_MULTIPLICATION_H__
+
+/* 64 bit multiplication */
+long long __muldi3(long long a, long long b);
+
+#endif
+
+/** @}
+ */
+
+
