linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rfefw@gmail.hu (rfefw at gmail.hu)
To: linux-arm-kernel@lists.infradead.org
Subject: arm assembly, how to write a character to the mobile phone's screen at boot time?
Date: Fri, 15 Sep 2017 15:51:58 +0200	[thread overview]
Message-ID: <e0b45c8396a6cee9d34ca5ca4316e537@gmail.hu> (raw)

hi list

i would like to code a hello world like program that would be placed on 
a
phone's ?or an emulator image.

i have been checking out the current source for the boot record where i
found a code for 'puts' which prints out a text

?
   // linux/arch/arm/boot/compressed/head.S


@ puts corrupts {r0, r1, r2, r3}
puts:		loadsp	r3, r1
1:		ldrb	r2, [r0], #1
		teq	r2, #0
		moveq	pc, lr
2:		writeb	r2, r3
		mov	r1, #0x00020000
3:		subs	r1, r1, #1
		bne	3b
		teq	r2, #'\n'
		moveq	r2, #'\r'
		beq	2b
		teq	r0, #0
		bne	1b
		mov	pc, lr
@ putc corrupts {r0, r1, r2, r3}
putc:
		mov	r2, r0
		mov	r0, #0
		loadsp	r3, r1
		b	2b
...


it calls the macro 'writeb' which is defined as (well it has multiple 
definitions, but one of them for instance):

mcr	p14, 0, \ch, c0, c5, 0

what are these magical p14 and c0 c5 registers? is there a 
documentation for these?

but may be i am on the wrong track, if so, how do i print out a 
character at the boot code's level? is there something like a "video 
memory" where i can write to? or a "bios" interrupt call?

                 reply	other threads:[~2017-09-15 13:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=e0b45c8396a6cee9d34ca5ca4316e537@gmail.hu \
    --to=rfefw@gmail.hu \
    --cc=linux-arm-kernel@lists.infradead.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 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).