Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/stand Add comment and figure of address map.
details: https://anonhg.NetBSD.org/src/rev/99c4c479b2c4
branches: trunk
changeset: 467236:99c4c479b2c4
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Jan 18 05:48:31 2020 +0000
description:
Add comment and figure of address map.
diffstat:
sys/arch/x68k/stand/boot_ufs/boot.S | 37 ++++++++++++++++++++++++++++++++++---
sys/arch/x68k/stand/xxboot/boot.S | 37 ++++++++++++++++++++++++++++++++++---
2 files changed, 68 insertions(+), 6 deletions(-)
diffs (110 lines):
diff -r 0e126f674391 -r 99c4c479b2c4 sys/arch/x68k/stand/boot_ufs/boot.S
--- a/sys/arch/x68k/stand/boot_ufs/boot.S Sat Jan 18 05:46:25 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ufs/boot.S Sat Jan 18 05:48:31 2020 +0000
@@ -2,7 +2,40 @@
| author: chapuni(webmaster%chapuni.com@localhost)
| ITOH Yasufumi
|
-| $NetBSD: boot.S,v 1.14 2020/01/18 05:07:34 isaki Exp $
+| $NetBSD: boot.S,v 1.15 2020/01/18 05:48:31 isaki Exp $
+
+|
+| (1) IPL (or previous stage loader) loads first 1KB of this primary
+| bootloader to (*). (*) is 0x2000 (from FD) or 0x2400 (from SASI/SCSI).
+|
+| (2) The first 1KB loads full primary bootloader (including first 1KB) from
+| the boot partition to 0xf0000. And jump to there.
+|
+| (3) The full primary bootloader loads the secondary bootloader known as
+| /boot from its filesystem to 0x6000. And jump to there.
+|
+| Therefore, The first 1KB must be relocatable.
+| The first 1KB must be smaller than or equal to 1024 bytes.
+|
+| (1) -> (2) -> (3)
+| +------------+ +------------+ +------------+ 0x000000
+| : : : : : :
+| +------------+ +------------+ +------------+ (*)
+| | first 1KB | | first 1KB | | first 1KB |
+| +------------+ +------------+ +------------+ (*)+0x400
+| : : : : : :
+| : : : : +------------+ 0x006000
+| : : : : | /boot |
+| : : : : +------------+
+| : : : : : :
+| ~ ~ ~ ~ ~ ~
+| : : : :<-SP : :<-SP
+| : : +------------+ +------------+ 0x0f0000
+| : : |full primary| |full primary|
+| : : |boot loader | |boot loader |
+| : : +------------+ +------------+
+| : : : : : :
+|
#include <machine/asm.h>
#include "iocscall.h"
@@ -28,9 +61,7 @@
.word 0x8e9e,0x82c9,0x82cd,0x8cbb
.word 0x8ec0,0x93a6,0x94f0,0x8149
.word 0
-| 0x2000 (FD), 0x2400 (SASI/SCSI) (¤â¤·¤¯¤Ï 0x0f0000)
| d4 ¤Ë¤Ï¤¹¤Ç¤Ë SCSI ID ¤¬Æþ¤Ã¤Æ¤¤¤ë
-| ¤³¤³¤«¤é jmp ¤Þ¤Ç¤Ï¥ê¥í¥±¡¼¥¿¥Ö¥ë¤Ë½ñ¤«¤Í¤Ð¤Ê¤é¤Ê¤¤¡£
ASENTRY_NOPROFILE(entry0)
moveml %d0-%d7/%a0-%a7,_C_LABEL(startregs)
lea BASEPTR_A:l,%a5 | set base ptr
diff -r 0e126f674391 -r 99c4c479b2c4 sys/arch/x68k/stand/xxboot/boot.S
--- a/sys/arch/x68k/stand/xxboot/boot.S Sat Jan 18 05:46:25 2020 +0000
+++ b/sys/arch/x68k/stand/xxboot/boot.S Sat Jan 18 05:48:31 2020 +0000
@@ -2,7 +2,40 @@
| author: chapuni(webmaster%chapuni.com@localhost)
| ITOH Yasufumi
|
-| $NetBSD: boot.S,v 1.6 2020/01/18 05:07:34 isaki Exp $
+| $NetBSD: boot.S,v 1.7 2020/01/18 05:48:31 isaki Exp $
+
+|
+| (1) IPL (or previous stage loader) loads first 1KB of this primary
+| bootloader to (*). (*) is 0x2000 (from FD) or 0x2400 (from SASI/SCSI).
+|
+| (2) The first 1KB loads full primary bootloader (including first 1KB) from
+| the boot partition to 0xf0000. And jump to there.
+|
+| (3) The full primary bootloader loads the secondary bootloader known as
+| /boot from its filesystem to 0x6000. And jump to there.
+|
+| Therefore, The first 1KB must be relocatable.
+| The first 1KB must be smaller than or equal to 1024 bytes.
+|
+| (1) -> (2) -> (3)
+| +------------+ +------------+ +------------+ 0x000000
+| : : : : : :
+| +------------+ +------------+ +------------+ (*)
+| | first 1KB | | first 1KB | | first 1KB |
+| +------------+ +------------+ +------------+ (*)+0x400
+| : : : : : :
+| : : : : +------------+ 0x006000
+| : : : : | /boot |
+| : : : : +------------+
+| : : : : : :
+| ~ ~ ~ ~ ~ ~
+| : : : :<-SP : :<-SP
+| : : +------------+ +------------+ 0x0f0000
+| : : |full primary| |full primary|
+| : : |boot loader | |boot loader |
+| : : +------------+ +------------+
+| : : : : : :
+|
#include <machine/asm.h>
#include "iocscall.h"
@@ -30,9 +63,7 @@
.word 0x8e9e,0x82c9,0x82cd,0x8cbb
.word 0x8ec0,0x93a6,0x94f0,0x8149
.word 0
-| 0x2000 (FD), 0x2400 (SASI/SCSI) (¤â¤·¤¯¤Ï 0x0f0000)
| d4 ¤Ë¤Ï¤¹¤Ç¤Ë SCSI ID ¤¬Æþ¤Ã¤Æ¤¤¤ë
-| ¤³¤³¤«¤é jmp ¤Þ¤Ç¤Ï¥ê¥í¥±¡¼¥¿¥Ö¥ë¤Ë½ñ¤«¤Í¤Ð¤Ê¤é¤Ê¤¤¡£
ASENTRY_NOPROFILE(entry0)
moveml %d0-%d7/%a0-%a7,_C_LABEL(startregs)
lea BASEPTR_A:l,%a5 | set base ptr
Home |
Main Index |
Thread Index |
Old Index