Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
The debug option lost the commandline, and initialize the "ok"
variable to fix ramddisk loading.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
It turned out, that calling the IODC to print a char to the console
is incredibly slow when running on a C8000 workstation.
Speed it up a lot by printing as many chars at once per call to
firmware. Since new-line chars need to be replaced by \n\r,
break all strings at this char.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Fix the argument pointer (ap) when calling a 64-bit PDC/STI function.
This fix is similiar to commit 6e3220ba3323 ("parisc: Fix argument pointer in real64_call_asm()")
in the Linux kernel.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
It turns out, that the FPU isn't initialized by firmware, which is
why the floating point instructions in libgcc's __udivdi3, __umoddi3
and __muldi3 routines simply hangs the machine.
This patch enables the FPU at bootup and thus we can drop the
current work-arounds.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
If user runs "ls 6/var", then he actually wants the contents of
directory /var. Add a trailing slash to make this happen.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Say so, if the partition doesn't hold an ext2 filesystem.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Fix a bug where for partitions > 6 a wrong offset was used.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
I missed one block offset calculation in ext3_extent_load_find().
In addition, close the ext2 file handle in ext2_close() when finished.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
The "list directory" function uses file handles to open the directories.
Since there is a limited number of file handles available, add the fileio_close() function to
free them up after usage.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
The partition detection was broken on big drives. Use u64
addresses now, and print partition table like fdisk output.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Add a Makefile check to abort the make if we find those millicode
routines in the palo binary.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Avoid using millicode routines in the ext2 code by using a simplified
bit-shifting mechanism to avoid u64 integer divisions.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
At palo boot time we don't have an exception handler installed yet.
So we must avoid using __umoddi3 and __udivdi3 (which use floating point
instructions).
This is a trivial work-around to simply output all integer values
which are bigger than 32-bit as hex-values only. For hex-printing
we can use bitshifts which don't need to be emulated.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Most newer-generation PA-RISC machines provide firmware support for the
ENTRY_IO_BBLOCK_IN (ARG=16) PDC option which addresses sectors in terms
of 2048 byte blocks. This feature overcomes the limitations of the old
ENTRY_IO_BOOTIN (ARG=0) PDC option, which uses byte offsets and thus
requires that boot files are located inside the first 2GB of the drive.
This palo patch checks the IODC_FEATURES (byte 10) of the IODC block of
the boot device, and if the rightmost bit is set, it will use the
ENTRY_IO boot block input support.
Palo will output at startup if the machines has the 2GB limitation:
-> Boot limited to sectors below 2GB: YES/NO
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Use the known constants from pdc.h instead of defining new constants.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
When listing the files of a directory, append "/" to directory entries
and append "@" to files which symlink other files.
In addition it's now possible to enter "l 2/." to list entries of the root
directory of the filesystem in partition #2.
Listing entries depends that the filesystem is inside the first 2GB
of the disk.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
I noticed that palo randomly doesn't list all available files in
the /boot directory. This is caused by palo accessing non-aligned 32-bit
words and due to the absense of unalignment fixup routines wrong values
are returned for such words.
This is what happens:
The directory entry structure for ext2 is defined as:
struct ext2_dir_entry_2 {
__u32 inode; /* Inode number */
__u16 rec_len; /* Directory entry length */
__u8 name_len; /* Name length */
__u8 file_type;
char name[EXT2_NAME_LEN]; /* File name */
The inode member is of type __u32, so the compiler will access it with a 32-bit
load instruction. The problem here is, that this __u32 might not be
word-aligned. We are in the bootloader which doesn't has an
unalignment-handler, so depending on the CPU undefined values can be returned,
mostly often zero.
This patch fixes it by copying the directory entry to a naturally
aligned struct before accessing it with word accesses.
Fixes: 812b3b323186 ("Remove useless files from directory listing")
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Add the hidden option "m" in the menu to turn on manufacturing
mode on C8000 workstations. It's then enabl until next hard reset.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
The directory listing command 'l' currently shows deleted files plus
other filetypes that couldn't possibly be booted. Eliminate deleted
files and make it show only regular/symlink and directory entries.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
Harden the palo usespace utilility. Happily the hardening flags don't
have any effect when compiling the palo ipl bootloader.
Suggested-by: Pierre-Elliott Bécue <peb@debian.org>
|
|
The palo.8 file is rebuilt when help2man is installed, e.g.
when building the palo debian package.
|
|
Suggested-by: Pierre-Elliott Bécue <peb@debian.org>
|
|
Add better description in man page, add proper version printing in palo.
Suggested-by: Pierre-Elliott Bécue <peb@debian.org>
|
|
Website is now at https://parisc.wiki.kernel.org
|
|
Standards-Version to 4.5.0, drop Uploaders from control,
use https links in debian/copyright
Suggested-by: Pierre-Elliott Bécue <peb@debian.org>
|
|
|
|
|
|
|
|
|
|
With GCC 10, the ipl is built with the compiler overriding local definitions of
some string functions, causing the ipl to trigger an HPMC.
Fix this by setting the -fno-builtin compiler flag.
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
|
|
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
The ext4 group cache is truncated because the read that populates it
is assuming ext2 fixed group size and not using the ext4 variable
group size. This only shows up with large inode numbers because the
read stops before their contents is read. The upshot is when you try
to do ext2_iget() for an ext4 inode above a certain number it fails
because the group descriptor is random junk.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
Now that we support ext4 and palo within the boot label, update the
documentation to reflect this. Also beef up the man page with
examples and remove reference to palo in the gnu info system because
it doesn't exist.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Ever since the widespread adoption of gpt and 4k emulation disks,
we've been starting the first partition at sector 2048 instead of 63.
Since we only need 512 sectors for iplboot, this offers the
opportunity of placing iplboot directly inside the disk label.
The way this patch works is that if no palo (F0) partition is found
and the first partition starts high enough, initialise the disk with
the ipl boot just below the first partition. If the disk isn't big
enough, error out as previously and if an F0 partition is found,
proceed as usual.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Now that iplboot can read ext4 filesystem, allow palo to create them
with the palo --format-as=4 option.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
For a read only filesystem, like iplboot, the only real additions for
ext4 are allowing for extent based inodes and a variable group size.
The current block transformation scheme simply goes from filesystem
block offset to absolute partition block employing a caching scheme
for the indirect inodes. We can follow a similar scheme for the
extent tree based on depth, relying on the fact that linear block
loading will optimally keep the cache at a given depth until it's not
needed.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
A lot has changed in libext2fs since this header was last imported,
but most of it is irrelevant to simply reading files from ext2/3, so
only import the additional changes absolutely necessary for reading
from an ext4 filesystem.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
It's only used locally in ext2.c to carry the blocksize, so make
blocksize a static variable instead.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
Fix this warning:
ipl.c: In function 'iplmain':
ipl.c:644:33: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf(kern_fullname, "%d%s", kern_part, kern_name);
^
ipl.c:644:5: note: 'sprintf' output between 2 and 139 bytes into a destination of size 128
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
palo is producing corrupt filesystems because ext2 can't cope with any
of the resize_inode, which is traditionally placed at blocks 3-258,
being in the badblocks list. If this happens, mke2fs silently
produces a corrupt filesystem image and the palo partition will
eventually trigger a filesystem error. The fix is to force palo to
specify -O^resize_inode to mke2fs which prevents ext2/3 from
allocating a resize_inode (and thus prevents the filesystem from being
resized).
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Suggested-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
Increase palo to version 2.00 and put version marker in the binary ipl
file.
|
|
Our puts() implemenation behaved non-conforming to the standard, since we
didn't added a newline after having printed the string. This leads to some
strange behaviour, because gcc optimizes (and replaces) some printf() calls to
puts() and dropped the trailing newline, which then wasn't added back by our
puts() implementation. As such we were missing newlines although our printf()
calls seemed correct.
Fix it by rewriting puts() to behave as expected by the standard, and as such
avoid such problems.
The other solution could have been to add the -fno-builtin-printf gcc
option but I prefer to conform to the standard.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Default again to console=ttyS0 for all machines, including the rp34x0.
The Linux kernel commit bcf3f1752a62 ("parisc: Hide Diva-built-in serial aux
and graphics card") avoids that the Diva AUX port on rp34x0 machines show up as
ttyS0, and as such we now can use ttyS0 as boot console on all machines again.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
It was broken for hard discs which exceed 100GB.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Taken from Gentoo patch to palo.
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Add code to prevent overwriting palo code and data unintentionally
during load of a kernel.
Improve debug output and add the hidden command "d" to toggle debug
mode.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
It seems the firmware boot loader code isn't able to load images
via TFTP if those are bigger than 30MB. Instead it runs into timeouts
and reports errors back to the palo bootloader.
This patch detects such situations and prints a useful warning before
rebooting.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
When enabling UBSAN on the Linux kernel, the 64-bit kernel image can
easily exceed 50MB and more. Increase the maximum size to 100MB to be
on the safe side.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
|
|
|
|
Patch provided by Christoph Biedl <debian.axhn@manchmal.in-ulm.de> via
debian bug report #851792
|
|
|
|
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
Newer toolchains don't seem to provide calloc any longer.
Add a private one for the IPL boot loader instead.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
gcc-6 optimizes the code differently and thus creates duplicate symbols
for the inline asm labels. Replace it by generic code, which isn't as
good to debug, but we don't face this kind of boot bugs any longer
either.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Fix typo in PHYS() macro, which prevents the palo ipl boot loader
to load kernels into memory regions which are above 16 MB.
I noticed this bug, because of the test_rhashtable.c built-in kernel
testcase. The old palo boot loader crashed/stopped while trying to load
the linux kernel whith CONFIG_TEST_RHASHTABLE=y (built-in).
Here is the palo output before this change:
Entry 00100000 first 00100000 n 5
Segment 0 load 00100000 size 415968 mediaptr 0x1000
Segment 1 load 00166000 size 108928 mediaptr 0x67000
Segment 2 load 00200000 size 10786768 mediaptr 0x82000
Segment 3 load 00c4a000 size 3549016 mediaptr 0xacc000
Segment 4 load 00000000 size 17939000 mediaptr 0xe2f000
Notice the load address (zero) for segment #4.
And here is the new palo output, with which palo sucessfully
can boot the kernel:
Entry 00100000 first 00100000 n 5
Segment 0 load 00100000 size 411512 mediaptr 0x1000
Segment 1 load 00165000 size 108928 mediaptr 0x66000
Segment 2 load 00200000 size 10782104 mediaptr 0x81000
Segment 3 load 00c49000 size 3545848 mediaptr 0xaca000
Segment 4 load 01000000 size 1938744 mediaptr 0xe2c000
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
Otherwise gcc-4.9 will miscompile the IPL bootloader since it
will optimize out accesses to PAGE0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
While editing a boot parameter, the user can now use the Control-U
key to delete the whole existing line and start over.
Patch is originally from Randolph Chung <rchung42@gmail.com> from July 2007
|
|
|
|
We allow a maximum of 1023 characters for the kernel command line
since quite some time already, but the runtime checks and the
documentation didn't reflected that change yet.
|
|
The 64bit kernel is built with SMP (and stable nowadays), that way
we can utilize and see all CPUs and all memory above 4GB.
|
|
Version 5 supports compressed kernels and kernel command lines up to 1023 characters.
|
|
|
|
|
|
|
|
|
|
|
|
Unnecessary and it breaks build on hppa.
This reverts commit ba637f0a5e7268df35f12b89b1443c9f4b3a42ff.
|
|
|
|
|
|
|
|
|
|
|
|
HP-UX.
|
|
|
|
|
|
variable. Since palo requires GNU make this gives an option to set
MAKE=gnumake on HP-UX
|
|
|
|
attribute warn_unused_result [-Wunused-result]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some people don't understand, that 2/vmlinux means to load the vmlinux
file from the second partition on the harddisk.
Instead they use e.g. 2/boot/vmlinux, because the second partition
is mounted under /boot in Linux.
But PALO doesn't know anything about the mount points in Linux, so it
expects 2/vmlinux instead.
We now try to strip the path from the given filename if it wasn't found
in the given directory. That way the kernel/initrd which people wanted
to load will be loaded and we inform the people what they did wrong.
|
|
|
|
|
|
|
|
|
|
Update debian changelog, RPM spec file and palo header file.
|
|
to 1024 bytes of Linux kernel command line.
It's important that we ensure that the user does not enter more than 40
(MAX_ARGV) different parameters. If 40 is too low, we can increase this
value at any time, but we need to avoid accessing memory outside of the
argv[] array.
Each kernel parameter (fieldbuf) can now hold up to 200 characters
instead of 79.
As cleanups we have:
- we don't need to pass over the original commandline,
- we simplify some printf() calls and use puts instead.
|
|
longer than 512 bytes (which is sizeof(iodc_string)).
The maximum of 512 bytes is a limit of the PDC IODC function, so if we
want to print a longer string, we just split it up and print up to 512
characters each time.
|
|
There is no protection yet, if generated string is longer than 4096
bytes.
|
|
maxchars characters, enter_text() may overwrite random memory outside of
the string.
|
|
A longer Linux kernel command line may help if you want to provide more
and longer information to the kernel, e.g. for UUIDs of harddisks.
|
|
'__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
In file included from /usr/include/fcntl.h:296:0,
from palo.c:16:
In function 'open',
inlined from 'do_formatted' at palo.c:482:5:
/usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode'
declared with attribute error: open with O_CREAT in second argument
needs 3 arguments
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
I have been carrying this patch in the Gentoo repository[1] for quite a
while now.
[1]
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-boot/palo/files/palo-1.18-include.patch?view=log
Add missing include for memcmp.
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
|
|
- Add spec file for building RPM target, just run "make palo.rpm"
- delete further files during "make clean"
|
|
Drop unnecessary and confusing debug info.
|
|
|
|
|
|
|
|
|
|
|
|
Try to fix this by more correctly implement strchr().
|
|
|
|
to truncate 'count' length according to max device/file size if reading from
uncompressed gzip image in memory.
|
|
|
|
gzip-decompressor (inflate.c) was taken from the sparc silo (with minor modifications).
|
|
This was useful for me when I booted a bootloader with an 64bit kernel, while
the machine was only capable to run 32bit kernels.
|
|
|
|
kernel, but we want to produce a 32bit palo iplboot image).
|
|
|
|
|
|
http://git.kernel.org/cgit/linux/kernel/git/deller/palo.git
|
|
defined.
|
|
|
|
|
|
Increase it to 800MB (the same as allowed for a CD-ROM) so we can boot
kernels with grotesque amounts of debug data in them.
|
|
|
|
|
|
it's now PALO version 1.14
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version back in testing, I will sanitize the headers palo requires.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
error reporting
|