Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Feb 2008 17:42:53 GMT
From:      Rafal Jaworowski <raj@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 135666 for review
Message-ID:  <200802181742.m1IHgrku061009@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135666

Change 135666 by raj@raj_mimi on 2008/02/18 17:41:53

	Clean up U-Boot API glue protos etc.: introduce a dedicated header file.

Affected files ...

.. //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#7 edit
.. //depot/projects/e500/sys/boot/uboot/common/main.c#7 edit
.. //depot/projects/e500/sys/boot/uboot/lib/api_public.h#4 edit
.. //depot/projects/e500/sys/boot/uboot/lib/glue.c#6 edit
.. //depot/projects/e500/sys/boot/uboot/lib/glue.h#1 add

Differences ...

==== //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#7 (text+ko) ====

@@ -39,11 +39,7 @@
 
 #include "api_public.h"
 #include "bootstrap.h"
-
-/* XXX this should go into header */
-struct sys_info *ub_get_sys_info(void);
-const char *ub_env_enum(const char *);
-char *ub_env_get(const char *); 
+#include "glue.h"
 
 /*
  * Return a 'boothowto' value corresponding to the kernel arguments in

==== //depot/projects/e500/sys/boot/uboot/common/main.c#7 (text+ko) ====

@@ -30,10 +30,11 @@
 __FBSDID("$FreeBSD: src/sys/boot/uboot/common/main.c,v 1.1 2008/02/16 22:13:11 marcel Exp $");
 
 #include <stand.h>
+
+#include "api_public.h"
 #include "bootstrap.h"
-
+#include "glue.h"
 #include "libuboot.h"
-#include "api_public.h"
 
 struct uboot_devdesc	currdev;
 struct arch_switch	archsw;		/* MI/MD interface boundary */
@@ -54,11 +55,6 @@
 extern unsigned char __sbss_end[];
 extern unsigned char _end[];
 
-extern void *		syscall_ptr;
-
-struct sys_info *	ub_get_sys_info(void);
-
-
 void dump_si(struct sys_info *si)
 {
 #ifdef DEBUG

==== //depot/projects/e500/sys/boot/uboot/lib/api_public.h#4 (text+ko) ====

@@ -1,5 +1,10 @@
 /* $FreeBSD: src/sys/boot/uboot/lib/api_public.h,v 1.1 2008/02/16 22:13:11 marcel Exp $ */
 
+/*
+ * This file needs to be kept in sync with U-Boot reference:
+ * http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/api_public.h
+ */
+
 #ifndef _API_PUBLIC_H_
 #define _API_PUBLIC_H_
 

==== //depot/projects/e500/sys/boot/uboot/lib/glue.c#6 (text+ko) ====

@@ -29,9 +29,10 @@
 
 #include <stand.h>
 #include "api_public.h"
+#include "glue.h"
 
+#define DEBUG
 #undef DEBUG
-#define DEBUG
 
 #ifdef DEBUG
 #define debugf(fmt, args...) do { printf("%s(): ", __func__); printf(fmt,##args); } while (0)
@@ -39,38 +40,6 @@
 #define debugf(fmt, args...)
 #endif
 
-/* console */
-int			ub_getc(void);
-int			ub_tstc(void);
-void			ub_putc(char c);
-void			ub_puts(const char *s);
-
-/* system */
-void			ub_reset(void);
-struct sys_info *	ub_get_sys_info(void);
-
-/* time */
-void			ub_udelay(unsigned long);
-unsigned long		ub_get_timer(unsigned long);
-
-/* env vars */
-char *			ub_env_get(const char *name);
-void			ub_env_set(const char *name, char *value);
-const char *		ub_env_enum(const char *last);
-
-/* devices */
-int			ub_dev_enum(void);
-int			ub_dev_open(int handle);
-int			ub_dev_close(int handle);
-int			ub_dev_read(int handle, void *buf,
-				lbasize_t len, lbastart_t start);
-int			ub_dev_send(int handle, void *buf, int len);
-int			ub_dev_recv(int handle, void *buf, int len);
-
-int			api_search_sig(struct api_signature **sig);
-
-extern int		syscall(int, int *, ...);
-
 /* Some random address used by U-Boot. */
 extern long		uboot_address;
 
@@ -190,15 +159,6 @@
 	return 0;
 }
 
-
-/*
- * NOTICE: ub_ library calls are part of the application, not U-Boot code!
- * They are front-end wrappers that are used by the consumer application: they
- * prepare arguments for particular syscall and jump to the low level
- * syscall()
- *
- */
-
 /****************************************
  *
  * console



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802181742.m1IHgrku061009>