[coreboot] r3552 - in trunk/payloads/libpayload: i386 include

svn at coreboot.org svn at coreboot.org
Fri Aug 29 01:12:23 CEST 2008


Author: jcrouse
Date: 2008-08-29 01:12:22 +0200 (Fri, 29 Aug 2008)
New Revision: 3552

Modified:
   trunk/payloads/libpayload/i386/timer.c
   trunk/payloads/libpayload/include/libpayload.h
Log:
[PATCH]: libpayload:  Document the architecture specific routines

No code changes.

Signed-off-by: Jordan Crouse <jordan.crouse at amd.com>
Acked-by: Jordan Crouse <jordan.crouse at amd.com>


Modified: trunk/payloads/libpayload/i386/timer.c
===================================================================
--- trunk/payloads/libpayload/i386/timer.c	2008-08-28 23:12:02 UTC (rev 3551)
+++ trunk/payloads/libpayload/i386/timer.c	2008-08-28 23:12:22 UTC (rev 3552)
@@ -27,9 +27,17 @@
  * SUCH DAMAGE.
  */
 
+/** @file i386/timer.c
+ * @brief i386 specific timer routines
+ */
+
 #include <libpayload.h>
 #include <arch/rdtsc.h>
 
+/**
+ * @ingroup arch
+ * Global variable containing the speed of the processor in KHz
+ */
 u32 cpu_khz;
 
 /**
@@ -72,21 +80,39 @@
 	while (rdtsc() < timeout) ;
 }
 
+/**
+ * Delay for a specified number of nanoseconds
+ * @param n Number of nanoseconds to delay for
+ */
 void ndelay(unsigned int n)
 {
 	_delay(n * cpu_khz / 1000000);
 }
 
+/**
+ * Delay for a specified number of microseconds
+ * @param n Number of microseconds to delay for
+ */
 void udelay(unsigned int n)
 {
 	_delay(n * cpu_khz / 1000);
 }
 
+/**
+ * Delay for a specified number of milliseconds
+ * @param n Number of milliseconds to delay for
+ */
+
 void mdelay(unsigned int m)
 {
 	_delay(m * cpu_khz);
 }
 
+/**
+ * Delay for a specified number of seconds
+ * @param n Number of seconds to delay for
+ */
+
 void delay(unsigned int s)
 {
 	_delay(s * cpu_khz * 1000);

Modified: trunk/payloads/libpayload/include/libpayload.h
===================================================================
--- trunk/payloads/libpayload/include/libpayload.h	2008-08-28 23:12:02 UTC (rev 3551)
+++ trunk/payloads/libpayload/include/libpayload.h	2008-08-28 23:12:22 UTC (rev 3552)
@@ -244,6 +244,7 @@
 long long int llabs(long long int j);
 u8 bin2hex(u8 b);
 u8 hex2bin(u8 h);
+void fatal(const char* msg) __attribute__ ((noreturn));
 /** @} */
 
 /**
@@ -398,6 +399,8 @@
 
 /**
  * @defgroup arch Architecture Specific Functions
+ * This modules contains global architecure specific functions.
+ * All architectures are expected to define these functions.
  * @{
  */
 int get_coreboot_info(struct sysinfo_t *info);
@@ -411,9 +414,13 @@
 void mdelay(unsigned int n);
 void delay(unsigned int n);
 
-#define abort() halt()
+#define abort() halt()    /**< Alias for the halt() function */
+
+/**
+ * Stops executions and halts the processor.  This function does
+ * not return.
+ */
 void halt(void) __attribute__ ((noreturn));
-void fatal(const char* msg) __attribute__ ((noreturn));
 /** @} */
 
 /**





More information about the coreboot mailing list