Home | History | Annotate | Download | only in zbsdmod
History log of /src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c
RevisionDateAuthorComments
 1.12  13-Nov-2019  tsutsui Make zaurus kernels use symbol tables loaded by the bootloader.

Now COPY_SYMTAB is no longer necessary and it saves ~500kbytes of
GENERIC, so re-enable options DDB (i.e. revert GENERIC rev 1.85).

Also fix zbsdmod.o (a kernel loader for Zaurus Linux) to load symbols
at a proper address as the MI sys/lib/libsa/loadfile_elf32.c does.

No particular comment on port-zaurus@:
https://mail-index.netbsd.org/port-zaurus/2019/11/11/msg000086.html

Note zbsdmod.c (derived from OpenBSD/zaurus) assumed that the loaded
kernels had "esym" variable at the top of its data section and
implicitly overwrote it with the address of loaded symbol tables.
OpenBSD/zaurus kernels used the esym value written by the zbsdmod.o
to initialize ksyms(4) on startup, but we will avoid such implicit
MD interface between the bootloader and kernels (though we don't
bother to add a symbol address value into bootinfo but just assume
symbols are loaded at end[] of a loaded kernel, as per the MI
libsa loadfile() implementation).

Worth to pullup to both netbsd-8 and netbsd-9.
 1.11  28-Oct-2019  tsutsui Make sure to clear bss before jumping to a kernel copied from load buffer.

This will fix yet another boot failure issue
"screen white-out after loading a kernel"
https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg000072.html

Should be pulled up to netbsd-8 and netbsd-9.
 1.10  26-Oct-2019  tsutsui Fix another boot failure issue of NetBSD/zaurus 8.x and later.

It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.
Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg000069.html

Should be pulled up to netbsd-8 and netbsd-9.
 1.9  02-Dec-2013  joerg branches: 1.9.22; 1.9.30; 1.9.34;
Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.8  16-Dec-2011  nonaka branches: 1.8.6; 1.8.10;
more clean D-cache.
 1.7  11-Dec-2011  nonaka - WARNS=4
- object size is more smaller.
 1.6  05-May-2011  nonaka branches: 1.6.4; 1.6.8;
Reduce kernel size.
Tested on SL-C1000.

Fix PR/44898.
 1.5  26-Dec-2010  nonaka branches: 1.5.2;
Add missing argument to printk(). (from OpenBSD)
 1.4  02-Mar-2009  nonaka branches: 1.4.4;
Added zboot from OpenBSD.
 1.3  12-Nov-2008  ad branches: 1.3.4;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.2  11-Apr-2008  nonaka branches: 1.2.4; 1.2.10; 1.2.12;
increase bsdimage size.
 1.1  17-Dec-2006  peter branches: 1.1.2; 1.1.4; 1.1.6; 1.1.50;
Update from the latest Zaurus source from NONAKA Kimihiro.

- LCD screen and keyboard are working now.
- Add bootstrap loader.
 1.1.50.2  17-Jan-2009  mjf Sync with HEAD.
 1.1.50.1  02-Jun-2008  mjf Sync with HEAD.
 1.1.6.2  12-Jan-2007  ad Sync with head.
 1.1.6.1  17-Dec-2006  ad file zbsdmod.c was added on branch newlock2 on 2007-01-12 01:01:03 +0000
 1.1.4.2  30-Dec-2006  yamt sync with head.
 1.1.4.1  17-Dec-2006  yamt file zbsdmod.c was added on branch yamt-lazymbuf on 2006-12-30 20:47:31 +0000
 1.1.2.2  18-Dec-2006  yamt sync with head.
 1.1.2.1  17-Dec-2006  yamt file zbsdmod.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:12 +0000
 1.2.12.2  03-Mar-2009  skrll Sync with HEAD.
 1.2.12.1  19-Jan-2009  skrll Sync with HEAD.
 1.2.10.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.2.4.1  04-May-2009  yamt sync with head.
 1.3.4.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.4.2  31-May-2011  rmind sync with head
 1.4.4.1  05-Mar-2011  rmind sync with head
 1.5.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.6.8.1  18-Feb-2012  mrg merge to -current.
 1.6.4.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.4.1  17-Apr-2012  yamt sync with head
 1.8.10.1  18-May-2014  rmind sync with head
 1.8.6.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.34.2  16-Nov-2019  martin Pull up following revision(s) (requested by tsutsui in ticket #431):

sys/arch/zaurus/conf/GENERIC: revision 1.89
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.12
sys/arch/zaurus/conf/INSTALL: revision 1.40
sys/arch/zaurus/zaurus/machdep.c: revision 1.45

Make zaurus kernels use symbol tables loaded by the bootloader.

Now COPY_SYMTAB is no longer necessary and it saves ~500kbytes of
GENERIC, so re-enable options DDB (i.e. revert GENERIC rev 1.85).
Also fix zbsdmod.o (a kernel loader for Zaurus Linux) to load symbols
at a proper address as the MI sys/lib/libsa/loadfile_elf32.c does.

No particular comment on port-zaurus@:

https://mail-index.netbsd.org/port-zaurus/2019/11/11/msg000086.html

Note zbsdmod.c (derived from OpenBSD/zaurus) assumed that the loaded
kernels had "esym" variable at the top of its data section and
implicitly overwrote it with the address of loaded symbol tables.
OpenBSD/zaurus kernels used the esym value written by the zbsdmod.o
to initialize ksyms(4) on startup, but we will avoid such implicit
MD interface between the bootloader and kernels (though we don't
bother to add a symbol address value into bootinfo but just assume
symbols are loaded at end[] of a loaded kernel, as per the MI
libsa loadfile() implementation).

Worth to pullup to both netbsd-8 and netbsd-9.
 1.9.34.1  03-Nov-2019  martin Pull up following revision(s) (requested by tsutsui in ticket #391):

sys/arch/zaurus/stand/zbsdmod/Makefile: revision 1.12
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.10
sys/arch/zaurus/conf/Makefile.zaurus.inc: revision 1.10
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.11
sys/arch/zaurus/stand/zbsdmod/compat_linux.h: revision 1.7

Explicitly set empty LINKENTRY to keep ENTRY address specified in ldscript.

This fixes kernel boot failures of NetBSD/zaurus 8.x and later.
While here, also set empty TEXTADDR also specified in ldscript.

See my post in port-zaurus@ for details:
https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg000069.html

Should be pulled up to netbsd-8 and netbsd-9.

-

Fix another boot failure issue of NetBSD/zaurus 8.x and later.

It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.

Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg000069.html

Should be pulled up to netbsd-8 and netbsd-9.

-

Misc cleanup to avoid future confusion.
- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding

-

Make sure to clear bss before jumping to a kernel copied from load buffer.
This will fix yet another boot failure issue
"screen white-out after loading a kernel"
https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg000072.html

Should be pulled up to netbsd-8 and netbsd-9.
 1.9.30.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.22.2  16-Nov-2019  martin Pull up following revision(s) (requested by tsutsui in ticket #1446):

sys/arch/zaurus/conf/GENERIC: revision 1.89
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.12
sys/arch/zaurus/conf/INSTALL: revision 1.40
sys/arch/zaurus/zaurus/machdep.c: revision 1.40
sys/arch/zaurus/zaurus/machdep.c: revision 1.45
sys/arch/zaurus/conf/GENERIC: revision 1.85

Yes, we need to load symbols, but we don't need the whole DDB infrastructure
for that.

bye ddb and we fit again.

Make zaurus kernels use symbol tables loaded by the bootloader.
Now COPY_SYMTAB is no longer necessary and it saves ~500kbytes of
GENERIC, so re-enable options DDB (i.e. revert GENERIC rev 1.85).

Also fix zbsdmod.o (a kernel loader for Zaurus Linux) to load symbols
at a proper address as the MI sys/lib/libsa/loadfile_elf32.c does.

No particular comment on port-zaurus@:

https://mail-index.netbsd.org/port-zaurus/2019/11/11/msg000086.html

Note zbsdmod.c (derived from OpenBSD/zaurus) assumed that the loaded
kernels had "esym" variable at the top of its data section and
implicitly overwrote it with the address of loaded symbol tables.
OpenBSD/zaurus kernels used the esym value written by the zbsdmod.o
to initialize ksyms(4) on startup, but we will avoid such implicit
MD interface between the bootloader and kernels (though we don't
bother to add a symbol address value into bootinfo but just assume
symbols are loaded at end[] of a loaded kernel, as per the MI
libsa loadfile() implementation).

Worth to pullup to both netbsd-8 and netbsd-9.
 1.9.22.1  03-Nov-2019  martin Pull up following revision(s) (requested by tsutsui in ticket #1420):

sys/arch/zaurus/stand/zbsdmod/Makefile: revision 1.12
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.10
sys/arch/zaurus/conf/Makefile.zaurus.inc: revision 1.10
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.11
sys/arch/zaurus/stand/zbsdmod/compat_linux.h: revision 1.7

Explicitly set empty LINKENTRY to keep ENTRY address specified in ldscript.

This fixes kernel boot failures of NetBSD/zaurus 8.x and later.
While here, also set empty TEXTADDR also specified in ldscript.

See my post in port-zaurus@ for details:
https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg000069.html

Should be pulled up to netbsd-8 and netbsd-9.

-

Fix another boot failure issue of NetBSD/zaurus 8.x and later.

It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.

Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg000069.html

Should be pulled up to netbsd-8 and netbsd-9.

-

Misc cleanup to avoid future confusion.
- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding

-

Make sure to clear bss before jumping to a kernel copied from load buffer.
This will fix yet another boot failure issue
"screen white-out after loading a kernel"
https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg000072.html

Should be pulled up to netbsd-8 and netbsd-9.

RSS XML Feed