sparc64 (common & specific files)
PATCH 1/1 sparc64 (common & specific files)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
A patch contains some changes I made to common files, the second changes needed specifically by the sparc64 port.
Vincent Pelletier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC1BKaFEQoKRQyjtURAhNGAJ4le+g5fztpZmSKRowi0GoyiUIGZgCdH45G 877sQBkzMnU5Eys9fgYXcUQ=
=dkPD
-----END PGP SIGNATURE-----
Index: include/grub/types.h
===================================================================
RCS file: /cvsroot/grub/grub2/include/grub/types.h,v retrieving revision 1.5
grub/types.h +4 -0
@@ -74,11 +74,15 @@ typedef grub_uint64_t grub_addr_t;typedef grub_uint64_t grub_off_t ;typedef grub_uint64_t grub_size_t ;typedef grub_int64_t grub_ssize_t ; +typedef grub_int64_t grub_intn_t ; +typedef grub_uint64_t grub_uintn_t ;#else typedef grub_uint32_t grub_addr_t ;typedef grub_uint32_t grub_off_t ;typedef grub_uint32_t grub_size_t ;typedef grub_int32_t grub_ssize_t ; +typedef grub_int32_t grub_intn_t ; +typedef grub_uint32_t grub_uintn_t ;#endif /* Byte-orders. */
Index: include/grub/i386/pc/time.h
===================================================================
RCS file: /cvsroot/grub/grub2/include/grub/i386/pc/time.h,v retrieving revision 1.5
grub/i386/pc/time.h +1 -1
@@ -25,6 +25,6 @@#define GRUB_TICKS_PER_SECOND 18/* Return the real time in ticks. */ -grub_uint32_t EXPORT_FUNC (grub_get_rtc ) (void ); +grub_uintn_t EXPORT_FUNC (grub_get_rtc ) (void );#endif /* ! KERNEL_TIME_HEADER */
Index: kern/dl.c
===================================================================
RCS file: /cvsroot/grub/grub2/kern/dl.c,v
retrieving revision 1.10
dl.c +4 -1
@@ -618,7 +618,10 @@ grub_dl_load (const char *name)return mod;if (! grub_dl_dir) -grub_fatal ("module dir is not initialized yet" ); + { +grub_error (0 ,"module dir is not initialized yet" ); +return 0 ; + } filename = (char *)grub_malloc (grub_strlen (grub_dl_dir) +1 +grub_strlen (name) +4 +1 );
Index: kern/fs.c
===================================================================
RCS file: /cvsroot/grub/grub2/kern/fs.c,v
retrieving revision 1.4
fs.c +1 -0
@@ -35,6 +35,7 @@ grub_fs_autoload_hook_t grub_fs_autoloadvoid grub_fs_register (grub_fs_t fs) { +grub_dprintf ("fs" ,"Registering file system '%s'.\n" , fs->name); fs->next = grub_fs_list; grub_fs_list = fs; }
Index: kern/mm.c
===================================================================
RCS file: /cvsroot/grub/grub2/kern/mm.c,v
retrieving revision 1.10
mm.c +1 -1
@@ -48,7 +48,7 @@ typedef struct grub_mm_header#if GRUB_CPU_SIZEOF_VOID_P ==4 # define GRUB_MM_ALIGN_LOG2 4#elif GRUB_CPU_SIZEOF_VOID_P ==8 -# define GRUB_MM_ALIGN_LOG2 8 +# define GRUB_MM_ALIGN_LOG2 5#endif #define GRUB_MM_ALIGN (1 << GRUB_MM_ALIGN_LOG2)
Index: kern/partition.c
===================================================================
RCS file: /cvsroot/grub/grub2/kern/partition.c,v
retrieving revision 1.2
partition.c +2 -0
@@ -18,6 +18,7 @@*/ #include <grub/partition.h> +#include <grub/misc.h> #include <grub/disk.h> static grub_partition_map_t grub_partition_map_list;
@@ -25,6 +26,7 @@ static grub_partition_map_t grub_partitivoid grub_partition_map_register (grub_partition_map_t partmap) { +grub_dprintf ("partmap" ,"Registering partition map '%s'.\n" , partmap->name); partmap->next = grub_partition_map_list; grub_partition_map_list = partmap; }
Index: configure.ac
===================================================================
RCS file: /cvsroot/grub/grub2/configure.ac,v
retrieving revision 1.10
configure.ac +2 -0
@@ -23,12 +23,14 @@ AC_CANONICAL_HOST case "$host_cpu" in i[[3456]]86) host_cpu=i386 ;; powerpc) ;; + sparc64) ;; *) AC_MSG_ERROR([unsupported CPU type]) ;; esac case "$host_cpu"-"$host_vendor" in i386-*) host_vendor=pc ;; powerpc-*) host_vendor=ieee1275 ;; + sparc64-*) host_vendor=ieee1275 ;; *) AC_MSG_ERROR([unsupported machine type]) ;; esac
Index: conf/sparc64-ieee1275.rmk
===================================================================
RCS file: conf/sparc64-ieee1275.rmk
sparc64-ieee1275.rmk new file +200 -0
200 lines not on this page · raw message
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Pelletier wrote:
One more sparc64 specific file.
Now that the configure file has been updated on the server, the changes are more visible.
Vincent Pelletier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC1MQcFEQoKRQyjtURAsckAJsFzSJbF8rj+mK/aca0e39hoKfN3QCcDiPI CyBhCKHD6f82gSIuWBDVf50=
=h1m7
-----END PGP SIGNATURE-----
Index: configure
===================================================================
RCS file: /cvsroot/grub/grub2/configure,v
retrieving revision 1.15
configure +2 -0
@@ -1397,6 +1397,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^ case "$host_cpu" in i[3456]86) host_cpu=i386 ;; powerpc) ;; + sparc64) ;; *) { { echo "$as_me:$LINENO: error: unsupported CPU type" >&5 echo "$as_me: error: unsupported CPU type" >&2;} { (exit 1); exit 1; }; } ;;
@@ -1405,6 +1406,7 @@ esac case "$host_cpu"-"$host_vendor" in i386-*) host_vendor=pc ;; powerpc-*) host_vendor=ieee1275 ;; + sparc64-*) host_vendor=ieee1275 ;; *) { { echo "$as_me:$LINENO: error: unsupported machine type" >&5 echo "$as_me: error: unsupported machine type" >&2;} { (exit 1); exit 1; }; } ;;
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Something I forgot in previous patch : prototype change for grub_get_rtc in utils/misc.c .
Vincent Pelletier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC1NcTFEQoKRQyjtURAlWWAKC0HdHIZCfNqjbl2j685m2hI8o5XwCgnI1Y /qedbKjsWGY6qLlvLi+N2lg=
=35nJ
-----END PGP SIGNATURE-----
Index: util/misc.c
===================================================================
RCS file: /cvsroot/grub/grub2/util/misc.c,v
retrieving revision 1.13
misc.c +1 -1
@@ -254,7 +254,7 @@ grub_stop (void)exit (1 ); } -grub_uint32_t +grub_uintn_t grub_get_rtc (void ) {struct timeval tv;
Vincent Pelletier <[email protected]> writes:
Hi Vincent,
Quoted 2 lines
Something I forgot in previous patch : prototype change for
grub_get_rtcinutils/misc.c.
This change is not required. We can better leave it as it was.
Thanks,
Marco
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 1 line · Marco Gerards
This change is not required. We can better leave it as it was.
So you'll have not to apply a part of the first patch in this thread, because this one fixes an error in grub emu because I changed a prototype in the first patch.
I insist though that the time should be kept with the most precision/value range we could give it.
Vincent Pelletier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC1YFZFEQoKRQyjtURAu7iAKC04QsYgkYqDvckx0d/NX0BLoG/xwCggjNp 7M82LzstyIaa2kUm0TxpLIQ=
=uDB5
-----END PGP SIGNATURE-----
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
Quoted 9 lines · Vincent Pelletier
Quoted 1 line · Marco Gerards
This change is not required. We can better leave it as it was.
So you'll have not to apply a part of the first patch in this thread, because this one fixes an error in grub emu because I changed a prototype in the first patch.
I insist though that the time should be kept with the most precision/value range we could give it.
For which reason?
But if it should be more precise, it should be a grub_uint64_t.
--
Marco
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 3 lines · Marco Gerards
For which reason?
But if it should be more precise, it should be a
grub_uint64_t.
If the architecture give us a 32 bit number, we won't invent the remaining 32 bits...
On the other hand, if the architecture give us 64 significant bits, why loosing 32 of them through a cast ?
Vincent Pelletier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC1ZJnFEQoKRQyjtURAs6jAJ9u1dHXeKxPUNgb+jNThMhBWTTopwCeK2u/ PFzGcGVncu6IxqUcBp/kmxk=
=PyOQ
-----END PGP SIGNATURE-----
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
Quoted 8 lines · Vincent Pelletier
Quoted 3 lines · Marco Gerards
For which reason?
But if it should be more precise, it should be a
grub_uint64_t.If the architecture give us a 32 bit number, we won't invent the remaining 32 bits...
We don't invent them; they are 0.
-Hollis
Quoted 10 lines · Hollis Blanchard
Quoted 7 lines · Vincent Pelletier
Quoted 3 lines · Marco Gerards
For which reason?
But if it should be more precise, it should be a
grub_uint64_t.If the architecture give us a 32 bit number, we won't invent the remaining 32 bits...
We don't invent them; they are 0.
Please do not extend it to 64-bit on i386. 64-bit variables consume more registers and enlarge the binary code. GRUB does not have to be very precise about the time, so I prefer 32-bit here for all architectures. If you have a good reason to use 64-bit except that the native representation is 64-bit, let me know.
Okuji
Vincent Pelletier <[email protected]> writes:
Hi Vincent,
Thanks a lot for your porting work, you are doing a great job! You definitely set the world record GRUB porting. :)
Here are some comments on the patch. This patch can be applied after Hollis' patch, which will require some changes in your patches.
Quoted 31 lines
Index:
include/grub/types.h
===================================================================
RCS file: /cvsroot/grub/grub2/include/grub/types.h,v retrieving revision 1.5
diff -u -p -r1.5types.hgrub/types.h +4
-0@@ -74,11 +74,15 @@ typedef grub_uint64_t grub_addr_t;typedef grub_uint64_t grub_off_t ;typedef grub_uint64_t grub_size_t ;typedef grub_int64_t grub_ssize_t ; +typedef grub_int64_t grub_intn_t ; +typedef grub_uint64_t grub_uintn_t ;#else typedef grub_uint32_t grub_addr_t ;typedef grub_uint32_t grub_off_t ;typedef grub_uint32_t grub_size_t ;typedef grub_int32_t grub_ssize_t ; +typedef grub_int32_t grub_intn_t ; +typedef grub_uint32_t grub_uintn_t ;#endif /* Byte-orders. */ Index:
include/grub/i386/pc/time.h
===================================================================
RCS file: /cvsroot/grub/grub2/include/grub/i386/pc/time.h,v retrieving revision 1.5
diff -u -p -r1.5time.h
grub/i386/pc/time.h line 28
Quoted 5 lines
grub/i386/pc/time.h +1
-1@@ -25,6 +25,6 @@#define GRUB_TICKS_PER_SECOND 18/* Return the real time in ticks. */ -grub_uint32_t EXPORT_FUNC (grub_get_rtc ) (void ); +grub_uintn_t EXPORT_FUNC (grub_get_rtc ) (void );
When Hollis' patch is applied, this is not required anymore.
Quoted 8 lines
Index:
kern/dl.c
===================================================================
RCS file: /cvsroot/grub/grub2/kern/dl.c,v
retrieving revision 1.10
diff -u -p -r1.10dl.c
dl.c grub_dl_load (const char *name) · line 624
Quoted 8 lines
dl.c +4
-1@@ -618,7 +618,10 @@ grub_dl_load (const char *name)return mod;if (! grub_dl_dir) -grub_fatal ("module dir is not initialized yet" ); + { +grub_error (0 ,"module dir is not initialized yet" ); +return 0 ; + }
Can you explain this?
Thanks,
Marco
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 2 lines · Marco Gerards
Thanks a lot for your porting work, you are doing a great job! You definitely set the world record GRUB porting. :)
I would have been much slower without the whole working ppc port, as I had all the functions I needed. And it is not over yet, because we can't boot anything from it for the moment. I'll try to work on it as fast as I can this summer.
Quoted 10 lines
Quoted 10 lines
Index:
kern/dl.c
===================================================================
RCS file: /cvsroot/grub/grub2/kern/dl.c,v
retrieving revision 1.10
diff -u -p -r1.10dl.cdl.c +0
-0@@ -618,7 +618,10 @@ grub_dl_load (const char *name)return mod;
Quoted 9 lines
dl.c grub_dl_load (const char *name) · line 624
Quoted 6 lines
dl.c +4
-1if (! grub_dl_dir) -grub_fatal ("module dir is not initialized yet" ); + { +grub_error (0 ,"module dir is not initialized yet" ); +return 0 ; + }Can you explain this?
Hollis told me it should have been only an error.
I was getting this fatal in the early stages of porting (after I got the ieee calls working and before I got the mm.c problems).
So I left it in the final patch.
Hollis, could you confirm / infirm that ?
Vincent Pelletier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC1YCqFEQoKRQyjtURAheHAJ9lja5g7Bt5SmF88/8VvNxFmSeRswCeOhRZ 5AKMcEx2eCYeRwal2U1pc6w=
=pqHf
-----END PGP SIGNATURE-----
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
Re: missing prefix not fatal
Quoted 20 lines · Vincent Pelletier
Quoted 10 lines
Quoted 10 lines
Index:
kern/dl.c
===================================================================
RCS file: /cvsroot/grub/grub2/kern/dl.c,v
retrieving revision 1.10
diff -u -p -r1.10dl.cdl.c +0
-0@@ -618,7 +618,10 @@ grub_dl_load (const char *name)return mod;Quoted 9 lines
dl.c grub_dl_load (const char *name) · line 624
Quoted 6 lines
dl.c +4
-1if (! grub_dl_dir) -grub_fatal ("module dir is not initialized yet" ); + { +grub_error (0 ,"module dir is not initialized yet" ); +return 0 ; + }Can you explain this?
Quoted 5 lines
Hollis told me it should have been only an error.
I was getting this fatal in the early stages of porting (after I got the ieee calls working and before I got themm.cproblems).
So I left it in the final patch.
Hollis, could you confirm / infirm that ?
What do you mean "confirm"? This is simply not a fatal error. If you don't have a prefix, you cannot load modules, and that's all.
I need this same change as I've been trying to boot on qemu. It should be committed.
-Hollis
Re: missing prefix not fatal
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 2 lines · Hollis Blanchard
What do you mean "confirm"? This is simply not a fatal error. If you don't have a prefix, you cannot load modules, and that's all.
That's what I meant :) .
Vincent Pelletier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC5zd8FEQoKRQyjtURAhb7AJ4mYVebN4W40vYNaUj8QOsCT7w3wgCfd3xq 3pvqgl+Hf/qYrf4TJGTvg8Y=
=K2Dr
-----END PGP SIGNATURE-----
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com