Index: arch/amd64/include/asm.h
===================================================================
--- arch/amd64/include/asm.h	(revision 36b209a59f199b774cab2328b7ac54413c29775a)
+++ arch/amd64/include/asm.h	(revision 82a80d392903baa374f50e411c3523502ebdc9c2)
@@ -37,4 +37,10 @@
 void asm_fake_loop(__u32 t);
 
+/** Return base address of current stack.
+ *
+ * Return the base address of the current stack.
+ * The stack is assumed to be STACK_SIZE bytes long.
+ * The stack must start on page boundary.
+ */
 static inline __address get_stack_base(void)
 {
Index: arch/ppc/include/asm.h
===================================================================
--- arch/ppc/include/asm.h	(revision 36b209a59f199b774cab2328b7ac54413c29775a)
+++ arch/ppc/include/asm.h	(revision 82a80d392903baa374f50e411c3523502ebdc9c2)
@@ -102,8 +102,17 @@
 }
 
-/* TODO: implement the real stuff */
+/** Return base address of current stack.
+ *
+ * Return the base address of the current stack.
+ * The stack is assumed to be STACK_SIZE bytes long.
+ * The stack must start on page boundary.
+ */
 static inline __address get_stack_base(void)
 {
-	return NULL;
+	__address v;
+	
+	__asm__ volatile ("and %0, %%r1, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
+	
+	return v;
 }
 
