summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-08-02 16:30:57 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-08-02 16:30:57 +0000
commit15c48f4c67f57fbe3c602fa366afabb413aac9d0 (patch)
tree800016d9abba8ebb7f85c8016fc69799e73efe4f /c
parentf3d9df08d5f116370ebd3761f861f31e1e142595 (diff)
downloadrtems-15c48f4c67f57fbe3c602fa366afabb413aac9d0.tar.bz2
Properly pass argc, argc, and environp to boot_card.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/start/start.S6
-rw-r--r--c/src/lib/libbsp/powerpc/eth_comm/start/start.S10
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/dlentry/dlentry.S6
-rw-r--r--c/src/lib/libbsp/powerpc/helas403/flashentry/flashentry.S6
-rw-r--r--c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S4
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.S6
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.S6
-rw-r--r--c/src/lib/libbsp/powerpc/ppcn_60x/start/start.S8
-rw-r--r--c/src/lib/libbsp/powerpc/psim/start/start.S7
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/start/start.S6
-rw-r--r--c/src/lib/libbsp/powerpc/shared/start/start.S6
11 files changed, 64 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/powerpc/dmv177/start/start.S b/c/src/lib/libbsp/powerpc/dmv177/start/start.S
index d591ec6a0c..e3e4bc3fb3 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/start/start.S
+++ b/c/src/lib/libbsp/powerpc/dmv177/start/start.S
@@ -106,6 +106,10 @@ _start:
stw r0,0(sp) /* clear back chain */
stwu sp,-56(sp) /* push another stack frame */
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
+ li r4, 0 /* argv */
+ li r3, 0 /* argc */
/* Let her rip */
bl FUNC_NAME(boot_card)
@@ -114,3 +118,5 @@ _start:
trap
.Lstart:
.size _start,.Lstart-_start
+
+ .comm environ,4,4
diff --git a/c/src/lib/libbsp/powerpc/eth_comm/start/start.S b/c/src/lib/libbsp/powerpc/eth_comm/start/start.S
index b119379641..b3e09bd638 100644
--- a/c/src/lib/libbsp/powerpc/eth_comm/start/start.S
+++ b/c/src/lib/libbsp/powerpc/eth_comm/start/start.S
@@ -128,10 +128,10 @@ cpy_b: lwz r5, 0(r3) /* In with the old ... */
addi r9, r9, 0x0007
mtspr 0x9e, r9
- /* clear argc and argv */
- xor r3, r3, r3
- xor r4, r4, r4
-
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
+ li r4, 0 /* argv */
+ li r3, 0 /* argc */
.extern SYM (boot_card)
bl SYM (boot_card) /* call the first C routine */
loopstop:
@@ -154,3 +154,5 @@ clear_bss:
bdnz clear_bss /* dec counter and loop */
blr /* return */
+
+ .comm environ,4,4
diff --git a/c/src/lib/libbsp/powerpc/helas403/dlentry/dlentry.S b/c/src/lib/libbsp/powerpc/helas403/dlentry/dlentry.S
index 3944d2bc47..2d37090a4f 100644
--- a/c/src/lib/libbsp/powerpc/helas403/dlentry/dlentry.S
+++ b/c/src/lib/libbsp/powerpc/helas403/dlentry/dlentry.S
@@ -116,6 +116,10 @@ stack_top:
stw r3, 4(r1)
stw r3, 8(r1)
stw r3, 12(r1)
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
+ li r4, 0 /* argv */
+ li r3, 0 /* argc */
.extern SYM (boot_card)
b SYM (boot_card) /* call the first C routine */
@@ -142,3 +146,5 @@ clear_bss:
#if PPC_ABI == PPC_ABI_POWEROPEN
DESCRIPTOR (startup)
#endif
+
+ .comm environ,4,4
diff --git a/c/src/lib/libbsp/powerpc/helas403/flashentry/flashentry.S b/c/src/lib/libbsp/powerpc/helas403/flashentry/flashentry.S
index 133e64e650..aa6f98578b 100644
--- a/c/src/lib/libbsp/powerpc/helas403/flashentry/flashentry.S
+++ b/c/src/lib/libbsp/powerpc/helas403/flashentry/flashentry.S
@@ -403,6 +403,10 @@ dcinvlp:
stw r3, 4(r1)
stw r3, 8(r1)
stw r3, 12(r1)
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
+ li r4, 0 /* argv */
+ li r3, 0 /* argc */
.extern SYM (boot_card)
b SYM (boot_card) /* call the first C routine */
@@ -466,4 +470,6 @@ ramaccfx:
#endif
+ .comm environ,4,4
+
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S b/c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S
index c487a58a33..ecd2971559 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/startup/start.S
@@ -270,6 +270,8 @@ spin:
bl bssclr
nop
+ lis 5,environ@ha
+ la 5,environ@l(5) /* environp */
/* clear argc and argv */
xor r3, r3, r3
xor r4, r4, r4
@@ -381,3 +383,5 @@ initregs:
blr /* return */
.L_text_e:
+
+ .comm environ,4,4
diff --git a/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.S b/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.S
index e6c04592c6..399d2c2072 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.S
+++ b/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.S
@@ -223,6 +223,10 @@ bss_addr:
stw r3, 4(r1)
stw r3, 8(r1)
stw r3, 12(r1)
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
+ li r4, 0 /* argv */
+ li r3, 0 /* argc */
.extern SYM (boot_card)
b SYM (boot_card) /* call the first C routine */
@@ -249,3 +253,5 @@ clear_bss:
#if PPC_ABI == PPC_ABI_POWEROPEN
DESCRIPTOR (startup)
#endif
+
+ .comm environ,4,4
diff --git a/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.S b/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.S
index 43693ebbf3..60339decda 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.S
+++ b/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.S
@@ -245,6 +245,10 @@ bss_addr:
stw r3, 4(r1)
stw r3, 8(r1)
stw r3, 12(r1)
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
+ li r4, 0 /* argv */
+ li r3, 0 /* argc */
.extern SYM (boot_card)
b SYM (boot_card) /* call the first C routine */
@@ -287,3 +291,5 @@ clear_bss:
#if PPC_ABI == PPC_ABI_POWEROPEN
DESCRIPTOR (startup)
#endif
+
+ .comm environ,4,4
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/start/start.S b/c/src/lib/libbsp/powerpc/ppcn_60x/start/start.S
index 1fa6f64da9..782a0b8de1 100644
--- a/c/src/lib/libbsp/powerpc/ppcn_60x/start/start.S
+++ b/c/src/lib/libbsp/powerpc/ppcn_60x/start/start.S
@@ -126,10 +126,10 @@ _start:
stw r0,0(sp) /* clear back chain */
stwu sp,-56(sp) /* push another stack frame */
- li r3, 0 /* argc */
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
li r4, 0 /* argv */
- li r5, 0 /* environp */
-
+ li r3, 0 /* argc */
/* Let her rip */
bl FUNC_NAME(boot_card)
@@ -152,3 +152,5 @@ _start:
blr
.Lstart:
.size _start,.Lstart-_start
+
+ .comm environ,4,4
diff --git a/c/src/lib/libbsp/powerpc/psim/start/start.S b/c/src/lib/libbsp/powerpc/psim/start/start.S
index f94a3ca330..12bbb120a9 100644
--- a/c/src/lib/libbsp/powerpc/psim/start/start.S
+++ b/c/src/lib/libbsp/powerpc/psim/start/start.S
@@ -96,6 +96,10 @@ _start:
stw r0,0(sp) /* clear back chain */
stwu sp,-56(sp) /* push another stack frame */
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
+ li r4, 0 /* argv */
+ li r3, 0 /* argc */
/* Let her rip */
bl FUNC_NAME(boot_card)
@@ -104,3 +108,6 @@ _start:
trap
.Lstart:
.size _start,.Lstart-_start
+
+ .comm environ,4,4
+
diff --git a/c/src/lib/libbsp/powerpc/score603e/start/start.S b/c/src/lib/libbsp/powerpc/score603e/start/start.S
index d384dff4f8..60cb56a696 100644
--- a/c/src/lib/libbsp/powerpc/score603e/start/start.S
+++ b/c/src/lib/libbsp/powerpc/score603e/start/start.S
@@ -146,6 +146,10 @@ past_constants:
stw r0,0(sp) /* clear back chain */
stwu sp,-56(sp) /* push another stack frame */
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
+ li r4, 0 /* argv */
+ li r3, 0 /* argc */
/* Let her rip */
bl FUNC_NAME(boot_card)
@@ -154,3 +158,5 @@ past_constants:
trap
.Lstart:
.size _start,.Lstart-_start
+
+ .comm environ,4,4
diff --git a/c/src/lib/libbsp/powerpc/shared/start/start.S b/c/src/lib/libbsp/powerpc/shared/start/start.S
index e0b1d0e3c4..270ab9918c 100644
--- a/c/src/lib/libbsp/powerpc/shared/start/start.S
+++ b/c/src/lib/libbsp/powerpc/shared/start/start.S
@@ -107,6 +107,10 @@ enter_C_code:
/*
* We are know in a environment that is totally independent from bootloader setup.
*/
+ lis r5,environ@ha
+ la r5,environ@l(r5) /* environp */
+ li r4, 0 /* argv */
+ li r3, 0 /* argc */
bl boot_card
bl _return_to_ppcbug
@@ -194,3 +198,5 @@ flush_tlbs:
sync
blr
+
+ .comm environ,4,4