Skip to contentSkip to conversation

: Implement proper sparc64 kern startup.

PATCH In review David Miller 2 participants 3 messages Mar 4, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 3/7 : Implement proper sparc64 kern startup.

This replaces the C implementation with a proper assembler one. Also add missing grub_prefix[] declaration to kernel.h

2009-03-03 David S. Miller <[email protected]>

* kern/sparc64/ieee1275/init.c: Delete, replace with...
* kern/sparc64/ieee1275/crt0.S: assembler implementation.
* include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].

---
 include/grub/sparc64/ieee1275/kernel.h |    4 +
 kern/sparc64/ieee1275/crt0.S           |   53 +++++++
 kern/sparc64/ieee1275/init.c           |  237 --------------------------------
 3 files changed, 57 insertions(+), 237 deletions(-)
 create mode 100644 kern/sparc64/ieee1275/crt0.S
 delete mode 100644 kern/sparc64/ieee1275/init.c
include/grub/sparc64/ieee1275/kernel.h +4 -0
index 0b6bce2..a292657 100644
@@ -24,6 +24,10 @@
 void EXPORT_FUNC (grub_reboot) (void);
 void EXPORT_FUNC (grub_halt) (void);
 
+/* The prefix which points to the directory where GRUB modules and its
+   configuration file are located.  */
+extern char grub_prefix[];
+
 /* Where grub-mkimage places the core modules in memory.  */
 #define GRUB_IEEE1275_MODULE_BASE 0x00300000
 
kern/sparc64/ieee1275/crt0.S new file +53 -0

53 lines not on this page · raw message

kern/sparc64/ieee1275/init.c deleted +0 -237

237 lines not on this page · raw message

Signature · 1 line
1.6.1.2.253.ga34a
#1 lore raw
Quoted 9 lines · David Miller

This replaces the C implementation with a proper assembler one. Also add missing grub_prefix[] declaration to kernel.h

2009-03-03 David S. Miller <[email protected]>

* kern/sparc64/ieee1275/init.c: Delete, replace with...
* kern/sparc64/ieee1275/crt0.S: assembler implementation.
* include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].

I must say that I am not familiar with sparc. But there were lots of functions inside of init.c. Are those all not needed at all?

And if this is true. This patch is missing matching .rmk modifications...

Please have a look at other archs how it is done there.

#2 lore raw

From: Vesa Jääskeläinen <[email protected]>
Date: Wed, 04 Mar 2009 13:40:20 +0200

Quoted 5 lines
Quoted 4 lines · David Miller

This replaces the C implementation with a proper assembler one. Also add missing grub_prefix[] declaration to kernel.h

Quoted 8 lines
Quoted 5 lines

2009-03-03 David S. Miller <[email protected]>

* kern/sparc64/ieee1275/init.c: Delete, replace with...
* kern/sparc64/ieee1275/crt0.S: assembler implementation.
* include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].

I must say that I am not familiar with sparc. But there were lots of functions inside of init.c. Are those all not needed at all?

Nope, things have changed a lot since that file was written so many years ago. Some of it has moved into generic ieee1275 code in fact.

Quoted 1 line

And if this is true. This patch is missing matching .rmk modifications...

See patch 7, it does that and ties everything together.

Quoted 1 line

Please have a look at other archs how it is done there.

I most certainly did.