* [PATCH] sparc64 (common & specific files)
@ 2005-07-12 18:57 Vincent Pelletier
2005-07-13 7:34 ` Vincent Pelletier
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Vincent Pelletier @ 2005-07-12 18:57 UTC (permalink / raw)
To: Grub-devel
[-- Attachment #1: Type: text/plain, Size: 369 bytes --]
-----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-----
[-- Attachment #2: sparc64_common.diff --]
[-- Type: text/plain, Size: 3718 bytes --]
Index: include/grub/types.h
===================================================================
RCS file: /cvsroot/grub/grub2/include/grub/types.h,v
retrieving revision 1.5
diff -u -p -r1.5 types.h
--- include/grub/types.h 4 Apr 2004 13:46:00 -0000 1.5
+++ include/grub/types.h 12 Jul 2005 18:51:50 -0000
@@ -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.5 time.h
--- include/grub/i386/pc/time.h 27 Feb 2005 21:19:05 -0000 1.5
+++ include/grub/i386/pc/time.h 12 Jul 2005 18:51:52 -0000
@@ -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
diff -u -p -r1.10 dl.c
--- kern/dl.c 14 Feb 2005 18:41:33 -0000 1.10
+++ kern/dl.c 12 Jul 2005 18:51:52 -0000
@@ -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
diff -u -p -r1.4 fs.c
--- kern/fs.c 3 Jul 2005 18:06:56 -0000 1.4
+++ kern/fs.c 12 Jul 2005 18:51:52 -0000
@@ -35,6 +35,7 @@ grub_fs_autoload_hook_t grub_fs_autoload
void
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
diff -u -p -r1.10 mm.c
--- kern/mm.c 23 Jun 2005 08:12:19 -0000 1.10
+++ kern/mm.c 12 Jul 2005 18:51:52 -0000
@@ -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
diff -u -p -r1.2 partition.c
--- kern/partition.c 13 Feb 2005 01:40:27 -0000 1.2
+++ kern/partition.c 12 Jul 2005 18:51:52 -0000
@@ -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_partiti
void
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;
}
[-- Attachment #3: sparc64_specific.diff --]
[-- Type: text/plain, Size: 6911 bytes --]
Index: configure.ac
===================================================================
RCS file: /cvsroot/grub/grub2/configure.ac,v
retrieving revision 1.10
diff -u -p -r1.10 configure.ac
--- configure.ac 30 Jun 2005 10:21:36 -0000 1.10
+++ configure.ac 12 Jul 2005 18:51:37 -0000
@@ -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
diff -N conf/sparc64-ieee1275.rmk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ conf/sparc64-ieee1275.rmk 12 Jul 2005 18:51:50 -0000
@@ -0,0 +1,200 @@
+
+# -*- makefile -*-
+
+COMMON_ASFLAGS = -nostdinc
+COMMON_CFLAGS = -ggdb -ffreestanding -m64 -mcpu=v9 -mtune=ultrasparc
+
+# Images.
+
+MOSTLYCLEANFILES += grubof_symlist.c kernel_syms.lst
+DEFSYMFILES += kernel_syms.lst
+
+grubof_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
+ file.h fs.h kernel.h misc.h mm.h net.h rescue.h symbol.h \
+ term.h types.h loader.h \
+ partition.h pc_partition.h machine/time.h machine/ieee1275.h
+
+grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) gensymlist.sh
+ sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
+
+kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) genkernsyms.sh
+ sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
+
+# Programs
+pkgdata_PROGRAMS = grubof
+
+# Utilities.
+bin_UTILITIES = grub-emu grub-mkimage
+noinst_UTILITIES = genmoddep
+
+# For grub-mkimage.
+grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
+ util/resolve.c
+
+# For grub-emu
+grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
+ commands/configfile.c commands/default.c commands/help.c \
+ commands/terminal.c commands/ls.c commands/timeout.c \
+ commands/ieee1275/halt.c commands/ieee1275/reboot.c \
+ disk/loopback.c \
+ fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c fs/jfs.c \
+ fs/minix.c fs/ufs.c \
+ kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c \
+ kern/file.c kern/fs.c kern/loader.c kern/main.c kern/misc.c \
+ kern/partition.c kern/rescue.c kern/term.c \
+ normal/arg.c normal/cmdline.c normal/command.c normal/context.c \
+ normal/main.c normal/menu.c normal/menu_entry.c \
+ partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
+ util/console.c util/grub-emu.c util/misc.c \
+ util/i386/pc/biosdisk.c util/i386/pc/getroot.c \
+ util/sparc64/ieee1275/misc.c
+
+grub_emu_LDFLAGS = -lncurses
+
+grubof_SOURCES = boot/sparc64/ieee1275/cmain.c \
+ boot/sparc64/ieee1275/ieee1275.c kern/main.c kern/device.c \
+ kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
+ kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
+ kern/sparc64/ieee1275/init.c term/sparc64/ieee1275/ofconsole.c \
+ kern/sparc64/ieee1275/openfw.c disk/sparc64/ieee1275/ofdisk.c \
+ kern/partition.c kern/env.c kern/sparc64/dl.c grubof_symlist.c \
+ kern/sparc64/cache.c
+
+grubof_HEADERS = grub/sparc64/ieee1275/ieee1275.h
+grubof_CFLAGS = $(COMMON_CFLAGS)
+grubof_ASFLAGS = $(COMMON_ASFLAGS)
+grubof_LDFLAGS = -nostdlib -Wl,-N,-Ttext,0x200000,-Bstatic -Xlinker --oformat -Xlinker elf64-sparc
+
+# For genmoddep.
+genmoddep_SOURCES = util/genmoddep.c
+
+# Modules.
+#pkgdata_MODULES = _linux.mod linux.mod fat.mod ufs.mod ext2.mod minix.mod \
+# hfs.mod jfs.mod normal.mod hello.mod font.mod ls.mod \
+# boot.mod cmp.mod cat.mod terminal.mod fshelp.mod amiga.mod apple.mod \
+# pc.mod suspend.mod loopback.mod help.mod reboot.mod halt.mod sun.mod \
+# default.mod timeout.mod configfile.mod
+
+# For fshelp.mod.
+fshelp_mod_SOURCES = fs/fshelp.c
+fshelp_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For fat.mod.
+fat_mod_SOURCES = fs/fat.c
+fat_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For ext2.mod.
+ext2_mod_SOURCES = fs/ext2.c
+ext2_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For ufs.mod.
+ufs_mod_SOURCES = fs/ufs.c
+ufs_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For minix.mod.
+minix_mod_SOURCES = fs/minix.c
+minix_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For hfs.mod.
+hfs_mod_SOURCES = fs/hfs.c
+hfs_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For jfs.mod.
+jfs_mod_SOURCES = fs/jfs.c
+jfs_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For iso9660.mod.
+iso9660_mod_SOURCES = fs/iso9660.c
+iso9660_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For _linux.mod.
+_linux_mod_SOURCES = loader/sparc64/ieee1275/linux.c
+_linux_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For linux.mod.
+linux_mod_SOURCES = loader/sparc64/ieee1275/linux_normal.c
+linux_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For normal.mod.
+normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
+ normal/context.c normal/main.c normal/menu.c \
+ normal/menu_entry.c \
+ normal/sparc64/setjmp.c
+normal_mod_CFLAGS = $(COMMON_CFLAGS)
+normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
+
+# For hello.mod.
+hello_mod_SOURCES = hello/hello.c
+hello_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For boot.mod.
+boot_mod_SOURCES = commands/boot.c
+boot_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For terminal.mod.
+terminal_mod_SOURCES = commands/terminal.c
+terminal_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For ls.mod.
+ls_mod_SOURCES = commands/ls.c
+ls_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For cmp.mod.
+cmp_mod_SOURCES = commands/cmp.c
+cmp_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For cat.mod.
+cat_mod_SOURCES = commands/cat.c
+cat_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For font.mod.
+font_mod_SOURCES = font/manager.c
+font_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For amiga.mod
+amiga_mod_SOURCES = partmap/amiga.c
+amiga_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For apple.mod
+apple_mod_SOURCES = partmap/apple.c
+apple_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For pc.mod
+pc_mod_SOURCES = partmap/pc.c
+pc_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For sun.mod
+sun_mod_SOURCES = partmap/sun.c
+sun_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For loopback.mod
+loopback_mod_SOURCES = disk/loopback.c
+loopback_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For suspend.mod
+suspend_mod_SOURCES = commands/ieee1275/suspend.c
+suspend_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For reboot.mod
+reboot_mod_SOURCES = commands/ieee1275/reboot.c
+reboot_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For halt.mod
+halt_mod_SOURCES = commands/ieee1275/halt.c
+halt_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For help.mod.
+help_mod_SOURCES = commands/help.c
+help_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For default.mod
+default_mod_SOURCES = commands/default.c
+default_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For timeout.mod
+timeout_mod_SOURCES = commands/timeout.c
+timeout_mod_CFLAGS = $(COMMON_CFLAGS)
+
+# For configfile.mod
+configfile_mod_SOURCES = commands/configfile.c
+configfile_mod_CFLAGS = $(COMMON_CFLAGS)
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] sparc64 (common & specific files)
2005-07-12 18:57 [PATCH] sparc64 (common & specific files) Vincent Pelletier
@ 2005-07-13 7:34 ` Vincent Pelletier
2005-07-13 8:55 ` Vincent Pelletier
2005-07-13 16:19 ` Marco Gerards
2 siblings, 0 replies; 13+ messages in thread
From: Vincent Pelletier @ 2005-07-13 7:34 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 402 bytes --]
-----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-----
[-- Attachment #2: sparc64_configure.diff --]
[-- Type: text/plain, Size: 882 bytes --]
Index: configure
===================================================================
RCS file: /cvsroot/grub/grub2/configure,v
retrieving revision 1.15
diff -u -p -r1.15 configure
--- configure 12 Jul 2005 22:36:43 -0000 1.15
+++ configure 13 Jul 2005 07:29:21 -0000
@@ -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; }; } ;;
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] sparc64 (common & specific files)
2005-07-12 18:57 [PATCH] sparc64 (common & specific files) Vincent Pelletier
2005-07-13 7:34 ` Vincent Pelletier
@ 2005-07-13 8:55 ` Vincent Pelletier
2005-07-13 16:21 ` Marco Gerards
2005-07-13 16:19 ` Marco Gerards
2 siblings, 1 reply; 13+ messages in thread
From: Vincent Pelletier @ 2005-07-13 8:55 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 346 bytes --]
-----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-----
[-- Attachment #2: util_misc.c.diff --]
[-- Type: text/plain, Size: 402 bytes --]
Index: util/misc.c
===================================================================
RCS file: /cvsroot/grub/grub2/util/misc.c,v
retrieving revision 1.13
diff -u -p -r1.13 misc.c
--- util/misc.c 27 Feb 2005 21:19:06 -0000 1.13
+++ util/misc.c 13 Jul 2005 08:27:22 -0000
@@ -254,7 +254,7 @@ grub_stop (void)
exit (1);
}
-grub_uint32_t
+grub_uintn_t
grub_get_rtc (void)
{
struct timeval tv;
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] sparc64 (common & specific files)
2005-07-13 8:55 ` Vincent Pelletier
@ 2005-07-13 16:21 ` Marco Gerards
2005-07-13 21:02 ` Vincent Pelletier
0 siblings, 1 reply; 13+ messages in thread
From: Marco Gerards @ 2005-07-13 16:21 UTC (permalink / raw)
To: The development of GRUB 2
Vincent Pelletier <subdino2004@yahoo.fr> writes:
Hi Vincent,
> Something I forgot in previous patch : prototype change for grub_get_rtc
> in utils/misc.c .
This change is not required. We can better leave it as it was.
Thanks,
Marco
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] sparc64 (common & specific files)
2005-07-13 16:21 ` Marco Gerards
@ 2005-07-13 21:02 ` Vincent Pelletier
2005-07-13 21:49 ` Marco Gerards
0 siblings, 1 reply; 13+ messages in thread
From: Vincent Pelletier @ 2005-07-13 21:02 UTC (permalink / raw)
To: The development of GRUB 2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 832 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marco Gerards wrote:
> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] sparc64 (common & specific files)
2005-07-13 21:02 ` Vincent Pelletier
@ 2005-07-13 21:49 ` Marco Gerards
2005-07-13 22:15 ` Vincent Pelletier
0 siblings, 1 reply; 13+ messages in thread
From: Marco Gerards @ 2005-07-13 21:49 UTC (permalink / raw)
To: The development of GRUB 2
Vincent Pelletier <subdino2004@yahoo.fr> writes:
> Marco Gerards wrote:
>> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] sparc64 (common & specific files)
2005-07-13 21:49 ` Marco Gerards
@ 2005-07-13 22:15 ` Vincent Pelletier
2005-07-14 0:43 ` Hollis Blanchard
0 siblings, 1 reply; 13+ messages in thread
From: Vincent Pelletier @ 2005-07-13 22:15 UTC (permalink / raw)
To: The development of GRUB 2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 785 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marco Gerards wrote:
> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] sparc64 (common & specific files)
2005-07-13 22:15 ` Vincent Pelletier
@ 2005-07-14 0:43 ` Hollis Blanchard
2005-07-14 8:27 ` Yoshinori K. Okuji
0 siblings, 1 reply; 13+ messages in thread
From: Hollis Blanchard @ 2005-07-14 0:43 UTC (permalink / raw)
To: The development of GRUB 2
On Jul 13, 2005, at 5:15 PM, Vincent Pelletier wrote:
>
> Marco Gerards wrote:
>> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] sparc64 (common & specific files)
2005-07-14 0:43 ` Hollis Blanchard
@ 2005-07-14 8:27 ` Yoshinori K. Okuji
0 siblings, 0 replies; 13+ messages in thread
From: Yoshinori K. Okuji @ 2005-07-14 8:27 UTC (permalink / raw)
To: The development of GRUB 2
On Thursday 14 July 2005 02:43, Hollis Blanchard wrote:
> On Jul 13, 2005, at 5:15 PM, Vincent Pelletier wrote:
> > Marco Gerards wrote:
> >> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] sparc64 (common & specific files)
2005-07-12 18:57 [PATCH] sparc64 (common & specific files) Vincent Pelletier
2005-07-13 7:34 ` Vincent Pelletier
2005-07-13 8:55 ` Vincent Pelletier
@ 2005-07-13 16:19 ` Marco Gerards
2005-07-13 20:59 ` Vincent Pelletier
2 siblings, 1 reply; 13+ messages in thread
From: Marco Gerards @ 2005-07-13 16:19 UTC (permalink / raw)
To: The development of GRUB 2
Vincent Pelletier <subdino2004@yahoo.fr> 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.
> Index: include/grub/types.h
> ===================================================================
> RCS file: /cvsroot/grub/grub2/include/grub/types.h,v
> retrieving revision 1.5
> diff -u -p -r1.5 types.h
> --- include/grub/types.h 4 Apr 2004 13:46:00 -0000 1.5
> +++ include/grub/types.h 12 Jul 2005 18:51:50 -0000
> @@ -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.5 time.h
> --- include/grub/i386/pc/time.h 27 Feb 2005 21:19:05 -0000 1.5
> +++ include/grub/i386/pc/time.h 12 Jul 2005 18:51:52 -0000
> @@ -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.
> Index: kern/dl.c
> ===================================================================
> RCS file: /cvsroot/grub/grub2/kern/dl.c,v
> retrieving revision 1.10
> diff -u -p -r1.10 dl.c
> --- kern/dl.c 14 Feb 2005 18:41:33 -0000 1.10
> +++ kern/dl.c 12 Jul 2005 18:51:52 -0000
> @@ -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
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] sparc64 (common & specific files)
2005-07-13 16:19 ` Marco Gerards
@ 2005-07-13 20:59 ` Vincent Pelletier
2005-07-27 3:58 ` missing prefix not fatal Hollis Blanchard
0 siblings, 1 reply; 13+ messages in thread
From: Vincent Pelletier @ 2005-07-13 20:59 UTC (permalink / raw)
To: The development of GRUB 2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1678 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marco Gerards wrote:
> 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.
>>Index: kern/dl.c
>>===================================================================
>>RCS file: /cvsroot/grub/grub2/kern/dl.c,v
>>retrieving revision 1.10
>>diff -u -p -r1.10 dl.c
>>--- kern/dl.c 14 Feb 2005 18:41:33 -0000 1.10
>>+++ kern/dl.c 12 Jul 2005 18:51:52 -0000
>>@@ -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?
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
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: missing prefix not fatal
2005-07-13 20:59 ` Vincent Pelletier
@ 2005-07-27 3:58 ` Hollis Blanchard
2005-07-27 7:27 ` Vincent Pelletier
0 siblings, 1 reply; 13+ messages in thread
From: Hollis Blanchard @ 2005-07-27 3:58 UTC (permalink / raw)
To: The development of GRUB 2
On Jul 13, 2005, at 4:59 PM, Vincent Pelletier wrote:
>>> Index: kern/dl.c
>>> ===================================================================
>>> RCS file: /cvsroot/grub/grub2/kern/dl.c,v
>>> retrieving revision 1.10
>>> diff -u -p -r1.10 dl.c
>>> --- kern/dl.c 14 Feb 2005 18:41:33 -0000 1.10
>>> +++ kern/dl.c 12 Jul 2005 18:51:52 -0000
>>> @@ -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?
>
> 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 ?
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
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-07-27 7:39 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 18:57 [PATCH] sparc64 (common & specific files) Vincent Pelletier
2005-07-13 7:34 ` Vincent Pelletier
2005-07-13 8:55 ` Vincent Pelletier
2005-07-13 16:21 ` Marco Gerards
2005-07-13 21:02 ` Vincent Pelletier
2005-07-13 21:49 ` Marco Gerards
2005-07-13 22:15 ` Vincent Pelletier
2005-07-14 0:43 ` Hollis Blanchard
2005-07-14 8:27 ` Yoshinori K. Okuji
2005-07-13 16:19 ` Marco Gerards
2005-07-13 20:59 ` Vincent Pelletier
2005-07-27 3:58 ` missing prefix not fatal Hollis Blanchard
2005-07-27 7:27 ` Vincent Pelletier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.