summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand
AgeCommit message (Collapse)Author
2011-04-26Make amd64/i386 boot(8) pass the DUID of the selected boot device to theJoel Sing
kernel so that it can use it to identify the root disk. This will be needed in order to correctly boot from a softraid volume. ok deraadt@ marco@ krw@
2011-04-24Don't leak fd's in sr_installboot(). From cppcheck via Amit Kulkarni.Kenneth R Westerback
2011-03-19Make amd64/i386 installboot error out if /boot would cross theKenneth R Westerback
BOOTBIOS_MAXSEC line. ok deraadt@.
2011-03-17Make the various findopenbsd() functions non-recursive, eliminatingKenneth R Westerback
a global, a couple of parameters, and opening up possibility of traversing much longer EBR lists without blowing the stack. Make seach algorithm the same as used in kern/subr_disk.c by checking all primary partitions in the MBR/EBR before moving to next EBR. This makes it more likely that everybody finds the same OpenBSD partition. Largely from a diff posted to tech@ by ucsavl.
2011-03-15Bunch of white space and style adjustments to make amd64 versionKenneth R Westerback
the same as i386 version. No change to .o file except for the one %lld -> %u format fix.
2011-03-14Clamp BIOS io attempts to < 2 ^28 - 1 sectors (a.k.a. 128GB forKenneth R Westerback
512-byte sectors) as some BIOSen get confused when we ask for sectors higher up. Uss u_int throughout the boot code to calculate sector addresses, since 32 bits is enough to do 28 ^ 1 - 1 arithmetic. Add checks for wraparound. I can now install and boot from the 7th extended partition below 128GB. Much feedback & guidance from deraadt@. Also from weingart@ on BIOS io. ok deraadt@ (less a couple of minor tweaks found in testing)
2011-03-13Change daddr_t to daddr32_t. The bootblocks on our architectures onlyTheo de Raadt
do 32-bit block spanning. If later on we get some that can/should do 64-bit, that can be done now using daddr64_t (but of course, we are taking this step to finalize the daddr_t 64-bit conversion). ok miod krw
2011-03-11Zap stack garbage before passing buffer to biosd_io(), which mayKenneth R Westerback
be lied to by the BIOS about successfully reading data. ok deraadt@ weingart@
2011-03-08Fix extended partition searching so we don't get lost. The offsetKenneth R Westerback
of the next EBR is relative to the start of the extended partition described in the first MBR, not relative to the EBR specifying the offset in its extended partition entry. Clean up installboot -v output. Use daddr64_t for all sector numbers. Not a complete fix, but better than what we had. More tweaks to come. Inspired by a diff and cluebat from uscav on tech@ a few weeks ago. Feedback from matthew@, weingart@. ok deraadt@
2011-03-02- change recieved -> received in comments, as well as two unused definesJasper Lievisse Adriaanse
in pxe.h. ok deraadt@ sthen@
2011-01-23Add support to installboot(8) for installing biosboot(8) and boot(8) onJoel Sing
softraid volumes. If installboot is run on a softraid volume, a fake single inode FFS filesystem is constructed to contain boot(8). This is then installed onto the softraid volume via the BIOCINSTALLBOOT ioctl. biosboot(8) is then patched and installed onto each disk that is a member of the softraid volume. Joint work with otto@ who came up with the concept of constructing a fake FFS filesystem and wrote the code to do so. No objection from miod@
2010-12-06- properly remove NENTS now after fixing the fallout.Jasper Lievisse Adriaanse
ok deraadt@
2010-12-06- partially revert previous NENTS removal for arches which got busted.Jasper Lievisse Adriaanse
2010-12-06- drop NENTS(), which was yet another copy of nitems().Jasper Lievisse Adriaanse
no binary change ok deraadt@
2010-11-20__attribute__((packed)) -> __packed. The ioprbs.c chunk was commented out, andMiod Vallat
uncommenting it is intentional. ok deraadt@
2010-08-11crank versionTheo de Raadt
2010-08-11De-inline CHS_rw. Somehow the merger of two monster __asm __inline statementsTheo de Raadt
into one function is generating broken code; it might be because of missing register clobbers. This is a workaround... it'd be nice to know the real problem work done with mlarkin and pirofti
2010-08-10add a description for bsd.sp where appropriate; while here, writeIgor Sobrado
"multiprocessor" in a consistent way. written with lots of good advice from jmc@, who noted that changing hier(7) was not enough and carefully reviewed this diff. ok jmc@
2010-07-09un-terminated string found when comparing to i386 boot code. TheseTheo de Raadt
should be 100% identical. ok toby
2010-07-02usefull -> useful;Jason McIntyre
2010-07-02Add ability to limit memory presented to kernel withTobias Weingartner
'machine memory =128M' style commands. Thanks to phessler for finding a small man page niggle. Bumped version strings to a nice round fraction, and make them the same across the board. Easier to identify boot binary versions that way. ok thib@, tedu@, phessler@
2010-05-09Fix packed use and unbreak with gcc4, same as i386.Nicholas Marriott
ok jsg
2010-04-23Recycle unused disklabel fields in order to create a disklabel uniqueJoel Sing
identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
2010-03-06remove the (now inaccurate) note about not being able to runJason McIntyre
installboot on a mounted partition; from J.C. Roberts
2009-11-30Bump up array size to prevent overflow when probing memoryCan Erkin Acar
on machines reporting > 32 memory regions. ok kettenis@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-09-30Fix comments to match reality.Tobias Weingartner
Thank you Vladimir Kirillov <proger () hackndev ! com>
2009-05-30Without -v, be quietTheo de Raadt
ok toby
2009-05-21The only value that d_npartitions should have is MAXPARTITIONS.Kenneth R Westerback
2009-04-30pass db_console from the bootloader to the kernel, and then use it toDavid Gwynne
set ddb.console real early. requested by art@ no problem! deraadt@
2009-04-23-v was printing some information which is irrelevant or duplicate. ThisTheo de Raadt
shrinks the output of installboot by a few lines.
2009-02-16Cancel the automatic boot when you hold ctrl to skip boot.conf.Stuart Henderson
"I like it" deraadt "sweet" tedu "love it" marco
2009-01-16add next-server option to exampleOleg Safiullin
ok jmc@ stevesk@
2008-12-10When booting from a CD on i386/amd64, assume the root filesystemKenneth R Westerback
is on the CD rather than always asking for its location. Behaviour pointed out at OpenCON by Stephan Rickauer. Tested by Stephan. nick@ has no objections. ok deraadt@
2008-08-12Fix multiple addition error recently introduced for when extended partitionsTheo de Raadt
are just before an OpenBSD partition in a MBR; done with kettenis & otto ok reyk
2008-08-04fix extended partition support by handling chained EBRs correctlyReyk Floeter
(using a recursion limit). now OpenBSD can be installed in a subsequent DOS/Linux-compatible extended partition. ok krw@ deraadt@
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-25this diff changes the bootloader to skip the CHS sanity check if LBAReyk Floeter
(EDD) is found and OK. it will also fix chainloading into OpenBSD from grub in a few scenarios where grub doesn't report the CHS correctly but the LBA. and we don't need CHS if there is LBA. this has been in the snapshots for a while. with input from weingart@ ok deraadt@
2008-06-25allow to install and boot the OpenBSD A6 partition and disklabel in anReyk Floeter
extended DOS partition. the concept of extended partitions is very simple, it is just another mbr at the partition offset (well, the standard "EBR" is a linked list with a few limitations, but this diff works with both variants). this diff has been in the snapshots for a while. with input from weingart@ and krw@ ok deraadt@
2008-06-04olf support starts to die (easy stuff first); ok miodTheo de Raadt
2008-04-20rewrite the serial port handling to manipulate the hardware directlyDavid Gwynne
rather than relying on calls into the bios to work. this is a result of me getting pissed off with solaris and linux being able to cope the serial bios redirection on dracs, iloms, and ilos. trying to do the same thing with openbsds boot loader caused weird behaviour like machine hangs or no visible output. talking to the serial chips directly is more reliable. tested by many ok sthen@ deraadt@
2008-04-19Change ELF loader to use the LMA as the load address for theTobias Weingartner
various segments. Hopefully this will help remove various hacks in the boot loader in the future. This should have no effect on most architectures (as we tend to have LMA == VMA). ok drahn@, soft ok's various others.
2008-01-24"read(..., ..., sizeof Y) < sizeof Y" is a dangerous idiom because itKenneth R Westerback
does an unsigned comparison and read() can return -1. Use '!=' instead of '<' since read() can't return more than 'sizeof Y'. Not perfect (that would require a separate test for -1) but a very common usage. ok toby@
2008-01-23Cleanup cn_pri. Change constants to more meaningful names, rather thanJoel Sing
the hp300 related ones currently in use. CN_NORMAL becomes CN_LOWPRI, CN_INTERNAL becomes CN_MIDPRI and CN_REMOTE becomes CN_HIGHPRI. ok miod@
2008-01-05handle 64-bit blkno in format stringOtto Moerbeek
2007-11-25typo; ok miod@Martynas Venckus
2007-11-25libkern, begone. Move to a new mechanism where config(8)'s "file"Theo de Raadt
directive can select between MI and MD versions of these files. At the same time, adjust the boot programs to pick exactly what they need, instead of the 7 or 8 mechanisms previously used. There will be some fallout from this, but testing it all by myself is a ridiculously slow process; it will be finished in-tree. Various developers were very nice and avoided making fun of me when I was gibbering in the corner..
2007-09-07Comment fix. It's 0x7F ELF, not 0xFF ELF.Tobias Weingartner
2007-07-27As on i386:Tom Cosgrove
We don't want to pass the PXE MAC address to the kernel when booting from a local disk, since the MAC address causes the kernel to look for root on NFS. Do this by remembering (not adding to boot arguments) the MAC address when opening the PXE device, and clearing this if we happen to load a file off a non-network disk. "works as advertised for me" todd@; "stop sitting on this/no objections" deraadt@; amd64 code mainly written by patch(1).
2007-06-27wt(4) was removed a while ago, so don't support booting off it anoymore.Michael Knudsen
i386/amd64 was ok tom zaurus ok drahn