From: Marco Gerards <metgerards@student.han.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: RISC OS rescue mode
Date: Tue, 22 Nov 2005 10:47:38 +0100 [thread overview]
Message-ID: <87oe4ddnet.fsf@student.han.nl> (raw)
In-Reply-To: <200511191122.19345.T.E.Baldwin99@members.leeds.ac.uk> (Timothy Baldwin's message of "Sat, 19 Nov 2005 11:22:02 +0000")
Timothy Baldwin <tim.lists@majoroak.f2s.com> writes:
Hi Timothy,
Thanks a lot for your patch. This week I will have very little time,
but I'll try to review it ASAP. Here are a few things I noticed while
I was having a quick look at it.
>> I'm a little confused about this "RISC_OS" naming. Is "RISC_OS" the name of
>> the firmware that GRUB runs above? If not, I don't think that's an
>> appropriate name.
>
> The firmware is called "RISC OS", not to be confused with "RISC/os". Putting
> spaces in the filenames is asking for trouble.
>
> RISC OS is a co-operative multitasking operating system and is the firmware in
> the systems on which it runs.
Please use `risc_os' instead of `RISC_OS'. I don't like using capital
names in files, we don't do that for other files. For example for
IEEE 1275 we use ieee1275. Please only use capital names in case of
macro's and enum's, see the GCS.
> 2005-08-29 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
> * boot/arm/RISC_OS/!Run,feb: New file.
I would prefer another name and renaming when installing. I wonder
what other people think about that.
> * Makefile.in (RMKFILES): Add arm-RISC_OS.rmk and common.rmk to list.
Wasn't common.rmk added already?
> +# For grub_RO.img.
> +grub_RO_ff8_SOURCES = kern/arm/aif_header.S \
What's RO_ff8?
> +#define SEEK_SET 0
> +#define SEEK_END 2
can you use a prefix here? for example GRUB_RISC_OS_SEEK_SET.
> +extern unsigned grub_RISC_OS_version, grub_RISC_OS_81C710_present;
Please only put one variable declaration on a line.
> +#define Cache_Control 0x280
[...]
> +#define Service_PreReset 0x45
> +#define ERROR_NO_SUCH_SWI 0x1E6
Can you please change this so it is according to the GCS? And please
use a prefix. Or did yo directly copy it from some other file? In
that case we need to figure out the copyright issues.
> +void *
> +grub_memalign (grub_size_t align, grub_size_t size)
> +{
> + void **mem = grub_RISC_OS_malloc (size + align + sizeof (void *));
> + if (mem == 0)
> + {
> + grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
> + return 0;
> + }
> + void **result = (void **) grub_align (align, (unsigned) (mem + 1));
> + result[-1] = mem;
> + return result;
> +}
> +
> +void *
> +grub_malloc (grub_size_t size)
> +{
> + void **result = grub_RISC_OS_malloc (size + sizeof (void *));
> + if (result == 0)
> + {
> + grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
> + return 0;
> + }
> + *result = result;
> + return result + 1;
> +}
> +
> +void *
> +grub_realloc (void *ptr, grub_size_t size)
> +{
> + void **ptr2 = ptr;
> + void **result =
> + grub_RISC_OS_realloc (ptr2 ? ptr2[-1] : 0, size + sizeof (void *));
> + if (result == 0)
> + {
> + grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
> + return 0;
> + }
> + *result = result;
> + return result + 1;
> +}
Have you considered using the GRUB memory allocation routines? What
are the advantages and disadvantages?
And some general remarks:
The copyright years are not always updated to 2005, is this correct?
Sometimes you mentioned copyright with your name. Can that be
changed?
Not all C comments are formatted correctly. Always start a sentence with a
capital letter and end with a `.'. Put two spaces after a sentence.
A full review will follow.
Thanks,
Marco
next prev parent reply other threads:[~2005-11-22 11:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-18 22:37 RISC OS rescue mode Timothy Baldwin
2005-11-18 23:27 ` Hollis Blanchard
2005-11-19 11:22 ` Timothy Baldwin
2005-11-19 21:50 ` Hollis Blanchard
2005-11-20 15:15 ` Timothy Baldwin
2005-11-25 20:12 ` Yoshinori K. Okuji
2005-11-22 9:47 ` Marco Gerards [this message]
2005-11-24 23:25 ` Timothy Baldwin
2006-01-02 19:09 ` Marco Gerards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oe4ddnet.fsf@student.han.nl \
--to=metgerards@student.han.nl \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.