9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Fco.J.Ballesteros <nemo@plan9.escet.urjc.es>
To: 9fans@cse.psu.edu
Subject: RE: [9fans] supported ipaq's?
Date: Tue, 25 Jun 2002 18:46:27 +0200	[thread overview]
Message-ID: <8236b69bcd50ae4ebc333372f1cf824d@plan9.escet.urjc.es> (raw)

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

I think I sent this before to 9fans, but
here's it again.

It's /sys/src/boot/arm/il.s.

Let me know if you have problems with it. I haven't
compiled it for so long...

[-- Attachment #2: Type: message/rfc822, Size: 2007 bytes --]

From: Stephen Parker <stephen.parker@pitechnology.com>
To: "'9fans@cse.psu.edu'" <9fans@cse.psu.edu>
Subject: RE: [9fans] supported ipaq's?
Date: Tue, 25 Jun 2002 16:56:25 +0100
Message-ID: <E562FCEE3A42D61192880002A5FB43330A6352@kite.pigroup.co.uk>

that sounds plausible.  i'd like to try it.

stephen

--
Stephen Parker.  Pi Technology.  +44 (0)1223 203438.

> -----Original Message-----
> From: Fco.J.Ballesteros [mailto:nemo@plan9.escet.urjc.es]
> Sent: 25 June 2002 16:54
> To: 9fans@cse.psu.edu
> Subject: RE: [9fans] supported ipaq's?
>
>
> If you get the `unrecognized magic number command' I can send you
> an alternate 5l.s file that contains the magic number.
> Is that your case?
>

[-- Attachment #3.1: Type: text/plain, Size: 304 bytes --]

The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Disposition: attachment; filename=il.s
	Content-Type: text/plain; charset="US-ASCII"
	Content-Transfer-Encoding: 7bit

[-- Attachment #3.2: il.s.suspect --]
[-- Type: application/octet-stream, Size: 2268 bytes --]

#include "mem.h"
/*
 *  Entered here from Compaq's bootldr.  First relocate to
 *  the location we're linked for and then copy back the
 *  decompressed kernel.
 *
 *  All
 */
TEXT _start(SB), $-4
	MOVW	$setR12(SB), R12		/* load the SB */
	MOVW	$1, R0		/* dance to make 5l think that the magic */
	MOVW	$1, R1		/* numbers in WORDs below are being used */
	CMP.S	R0, R1		/* and to align them to where bootldr wants */
	BEQ	_start2
	WORD	$0x016f2818	/* magic number to say we are a kernel */
	WORD	$0xc0008000	/* entry point address */
	WORD	$0		/* size?, or end of data? */

_start2:

	/* SVC mode, interrupts disabled */
	MOVW	$(PsrDirq|PsrDfiq|PsrMsvc), R1
	MOVW	R1, CPSR

	/* disable the MMU */
	MOVW	$0x130, R1
	MCR     CpMMU, 0, R1, C(CpControl), C(0x0)

	/* enable caches */
	MRC	CpMMU, 0, R0, C(CpControl), C(0x0)
	ORR	$(CpCdcache|CpCicache|CpCwb), R0
	MCR     CpMMU, 0, R0, C(CpControl), C(0x0)

	/* flush caches */
	MCR	CpMMU, 0, R0, C(CpCacheFlush), C(0x7), 0
	/* drain prefetch */
	MOVW	R0,R0
	MOVW	R0,R0
	MOVW	R0,R0
	MOVW	R0,R0

	/* drain write buffer */
	MCR	CpMMU, 0, R0, C(CpCacheFlush), C(0xa), 4

	/* relocate to where we expect to be */
	MOVW	$(512*1024),R3
	MOVW	$0xC0008000,R1
	MOVW	$0xC0200000,R2
	ADD	R1,R3
_relloop:
	MOVW	(R1),R0
	MOVW	R0,(R2)
	ADD	$4,R1
	ADD	$4,R2
	CMP.S	R1,R3
	BNE	_relloop

	MOVW	$(MACHADDR+BY2PG), R13		/* stack */
	SUB	$4, R13				/* link */

	/* jump to where we've been relocated */
	MOVW	$_relocated(SB),R15

TEXT _relocated(SB),$-4
	BL	main(SB)
	BL	exit(SB)
	/* we shouldn't get here */
_mainloop:
	B	_mainloop
	BL	_div(SB)			/* hack to get _div etc loaded */

TEXT mypc(SB),$-4
	MOVW	R14,R0
	RET

TEXT draincache(SB),$-4
	/* write back any dirty data */
	MOVW	$0xe0000000,R0
	ADD	$(8*1024),R0,R1
_cfloop:
	MOVW.P	32(R0),R2
	CMP.S	R0,R1
	BNE	_cfloop

	/* drain write buffer and invalidate i&d cache contents */
	MCR	CpMMU, 0, R0, C(CpCacheFlush), C(0xa), 4
	MCR	CpMMU, 0, R0, C(CpCacheFlush), C(0x7), 0

	/* drain prefetch */
	MOVW	R0,R0
	MOVW	R0,R0
	MOVW	R0,R0
	MOVW	R0,R0

	/* disable caches */
	MRC	CpMMU, 0, R0, C(CpControl), C(0x0)
	BIC	$(CpCdcache|CpCicache|CpCwb), R0
	MCR     CpMMU, 0, R0, C(CpControl), C(0x0)
	RET

             reply	other threads:[~2002-06-25 16:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-25 16:46 Fco.J.Ballesteros [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-26  9:09 Stephen Parker
2002-06-26  9:08 Sape Mullender
2002-06-26  9:03 Sape Mullender
2002-06-26  9:03 Sape Mullender
2002-06-26  7:35 Stephen Parker
2002-06-26  7:29 Fco.J.Ballesteros
2002-06-26  7:28 Stephen Parker
2002-06-25 16:39 Fco.J.Ballesteros
2002-06-25 15:56 rob pike, esq.
2002-06-25 15:56 Stephen Parker
2002-06-25 15:54 Sape Mullender
2002-06-25 15:53 Fco.J.Ballesteros
2002-06-25 16:10 ` Axel Belinfante
2002-06-25 15:51 Stephen Parker
2002-06-25 15:44 Stephen Parker
2002-06-25  8:26 Sape Mullender
2002-06-25  8:03 Fco.J.Ballesteros
2002-06-25  7:59 Stephen Parker
2002-06-25  7:45 Fco.J.Ballesteros
2002-06-24 19:00 Sape Mullender
2002-06-24 16:42 presotto
2002-06-24 16:38 Axel Belinfante
2002-06-27 22:55 ` Latchesar Ionkov

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=8236b69bcd50ae4ebc333372f1cf824d@plan9.escet.urjc.es \
    --to=nemo@plan9.escet.urjc.es \
    --cc=9fans@cse.psu.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).