summaryrefslogtreecommitdiff
path: root/sys/src/boot
AgeCommit message (Collapse)Author
2022-12-27boot/reform: bootm if loading the kernel workedSigrid Solveig Haflínudóttir
2022-12-029boot: delay GetMemoryMap until right before ExitBootServices (thanks ↵cinap_lenrek
michael forney!) Michael Forney reported the following: The UEFI specification suggests calling GetMemoryMap immediately before ExitBootServices to ensure that the loader has the current memory map. The firmware is able to enforce this since we have to pass a "MapKey" from the last GetMemoryMap to ExitBootServices. The T14 AMD gen 1 firmware is quite strict about this, and even a call to OutputString will invalidate the MapKey. This causes ExitBootServices to fail, and we enter 9front with boot services still running. This causes all sorts of problems including leaving the IOMMU enabled, breaking 9front's PCI drivers. --- Michael sent a patch that moves memconf() to unload(), but i prefer to make this explicit by calling memconf() before and keep unload() as just that, not touching the configuration.
2022-11-03boot/bitsy: clean up checked in binaryJacob Moody
2022-07-10imx8: load a plan9.ini at CONFADDR 0x40010000cinap_lenrek
2022-06-18generate boot.scr in /sys/src/boot/reformcinap_lenrek
2022-06-18add /sys/src/boot/reform/mkfile to download official u-boot for the mnt-reformcinap_lenrek
2021-09-119boot: fix isowalk() for directories spanning multiple sectorscinap_lenrek
directory entries cannot span sector boundaries, meaning that the end of a sector would be zero padded until the next sector. we have to skip over these zero paddings to fully read the directory.
2021-08-22revert 8c228a123fa0c6062570964011854302bbf57242: accidental commitOri Bernstein
was testing out the git/import tweaks and accidentally pushed this commit. No comment on whether we want it, but it definitely wasn't ready for merge. Oops.
2021-08-17mk for only supported archsunobe@cpan.org
http://fqa.9front.org/fqa1.html#1.2 states the supported archs. However, clean and nuke also remove build files for 0 (spim) and q (power). 'mk all' using those archs fails; 'mk kernels' also tries to build all the kernels, even those which are not supported. For example, I tried to build the power arch (qc, qa, ql) and without surprise it failed (when building dtracy): ... mk dtracy qc -FTVw dtracy.c yacc -v -d -D1 parse.y qc -FTVw cgen.c qc -FTVw act.c qc -FTVw type.c == regfree == REGISTER R0 <11> STRUCT DTAct cgen.c:302 == regfree == REGISTER R0 <11> STRUCT DTAct act.c:266 == regfree == qc -FTVw agg.c cgen.c:299 unknown type in regalloc: STRUCT DTAct cgen.c:299 bad opcode in gmove INT -> STRUCT DTAct cgen.c:302 unknown type in regalloc: STRUCT DTAct cgen.c:302 bad opcode in gmove INT -> STRUCT DTAct cgen.c:302 error in regfree: 0 [0] REGISTERmk: qc -FTVw cgen.c : exit status=rc 387386: qc 387392: error R0 <11> STRUCT DTAct act.c:269 act.c:250 unknown type in regalloc: STRUCT DTAct act.c:250 bad opcode in gmove INT -> STRUCT DTAct act.c:266 unknown type in regalloc: STRUCT DTAct act.c:266 bad opcode in gmove INT -> STRUCT DTAct act.c:266 error in regfree: 0 [0] act.c:269 unknown type in regalloc: STRUCT DTAct act.c:269 bad opcode in gmove INT -> STRUCT DTAct act.c:269 error in regfree: 0 [0] act.c:274 unknown type in regalloc: STRUCT DTAct act.c:274 bad opcode in gmove INT -> STRUCT DTAct act.c:274 error in regfree: 0 [0] too many errors mk: for(i in cc ... : exit status=rc 382748: rc 387379: mk 387381: error mk: date for (i ... : exit status=rc 373781: rc 382226: mk 382227: error cpu% The patch below skips over non-supported architectures. Is that something we want? This way, 'mk kernels' should work without a problem (tested on amd64). Then if someone works on getting those architectures supported again in the future, they can be added back in.
2021-02-22boot/bcm: download dtb files for rpi-400 and rpi-cm4cinap_lenrek
2021-02-209boot: handle automatic length for 64-bit values in hexfmt() for framebuffer ↵cinap_lenrek
address (thanks Michael Forney)
2021-02-159boot: mark efi boot and runtime service regions as reservedcinap_lenrek
despite the kernel never doing any efi runtime service calls, overriding the runtime service regions makes some machines lock up. so consider them reserved. the boot service regions should also, in theory, be usable by the os, but linux says otherwise...
2020-11-21efi: prefer plan9.ini from ESP we loaded frommischief
currently the EFI loader's behavior is to search all disks in a firmware-defined order. we search the list returned by the firmware in reverse order in the hopes of searching the first 9FAT instead of the ESP, but this results in unintuitive behavior when there are multiple FAT partitions (possibly in multiple disks), such as loading a plan9.ini and kernel from a different disk than the one you executed the EFI loader from. to resolve this, we change the EFI loader to instead prefer read plan9.ini and the kernel from the same disk as the EFI loader was read from, and then fall back to the old behavior, since the old behavior is relied on by current installations.
2020-04-089bootpxe: simplifycinap_lenrek
2020-04-089bootpxe: continues the war against random DHCPv6 DUIDscinap_lenrek
Some UEFI implementations use random UUID based DUID instead of ethernet address, but use ethernet derived link-local addresses. So extract the MAC from our IPv6 address.
2019-08-18add missing device tree file for raspberry pi 4cinap_lenrek
2019-08-18add raspberry pi 4 kernel and bootloader to pi3.img targetcinap_lenrek
2018-10-22add /sys/src/boot/bcm/mkfile to download raspberry pi bootcode firmwarecinap_lenrek
2018-10-069boot: get rid of 64 byte line length limitcinap_lenrek
2018-09-169boot: don't let user erase the prompt (thanks mischief)cinap_lenrek
2018-05-279boot: detect SYSLINUX "memdisk" and pass to kernel via ramdisk0= parametercinap_lenrek
this makes virtual "memdisk" from SYSLINUX accessible to the kernel, allowing the iso to be loaded via TFTP and started without any ethernet or disk drivers available.
2018-05-159boot: DHCPv6 support for eficinap_lenrek
2018-02-10aijuboard bootloader: fix 10BASE-T / 100BASE-TX supportaiju
2017-09-299boot: limit read size to 4K for efi simple file system protocolcinap_lenrek
copying files from the uefi shell works, reading plan9.ini works, loading the kernel by calling Read to read in the DATA section of the kernel *FAILS*. my guess is that uefi filesystem driver or nvme driver tries to allocate a temporary buffer and hasnt got the space. limiting the read size fixes it.
2017-09-10rename pcf kernel to pc, remove pcf, pccpuf, pccpu64 kernels, update ↵cinap_lenrek
documentation there isnt much of a point in keep maintaining separate kernel configurations for terminal and cpu kernels as the role can be switched with service=cpu boot parameter. to make stuff cosistent, we will just have one "pc" kernel and one "pc64" kernel configuration now.
2016-05-22efi: ensure 8 byte alignment of buffer, as ReadBlocks() method will fail ↵cinap_lenrek
otherwise
2016-05-22efi: allow access to iso filesystem on non-cdrom media (iso/hybrid)cinap_lenrek
2016-05-199boot: add iso hybrid loader 9boothybcinap_lenrek
2016-05-04retire the dec alpha portcinap_lenrek
2015-06-059boot: look for plan9.ini in all filesystems accessible to efi to find plan9 ↵cinap_lenrek
partition try the handle buffer in reverse order looking for plan9.ini to find plan9 partition (9fat). when that fails, we'll default to the first handle which should be the esp.
2015-05-13boot/zynq: use ./boothead.$cputype to invoke helpercinap_lenrek
2015-05-13boot/zynq: add jtagload utilitycinap_lenrek
2015-05-13boot/zynq: implement sdmmc boot (fat)cinap_lenrek
2015-01-25pc, efi loaders: erase characters when backspace is pressedmischief
2014-12-24added zynq kernelaiju
2014-10-31efi: generate /386/efiboot.fat for generating efi bootable cd images (see -E ↵cinap_lenrek
option of mk9660)
2014-10-31efi: iso filesystem support for cdrom bootingcinap_lenrek
instead of including kernel and config in the efi fat image, we can just include the loaders and read the plan9.ini and kernel from iso filesystem just like the bios loaders.
2014-10-31efi: add test targets for iso and fat (for documentation only)cinap_lenrek
2014-10-24efi: change eficonfig ordering so memconf() is first, dont fallback to fs ↵cinap_lenrek
when /cfg/pxe/ file isnt there having the memconf() (*e820=) last clutters the screen. do it first, so we can read *acpi= and *bootscreen= prints. we want to continue using tftp even when the /cfg/pxe/$ether file is not found. only when we detect no pxe/dhcp session, then we switch to local filesystem (non-network boot).
2014-10-23efi: add initial pxe support (v4 only)cinap_lenrek
2014-10-19efi: use LocateHandle() and HandleProtocol() to check for multiple gop ↵cinap_lenrek
protocols to find a usable one the gop returned by LocateProtocol() is not usable on thinkpad x230, so iterate over all handles to find a usable one.
2014-10-19efi: fix compiler warnings, remove indicator prints in readn()cinap_lenrek
2014-10-18efi: simplify bootscreen codecinap_lenrek
2014-10-18efi: convert pixel format to bootscreen color channelcinap_lenrek
2014-10-18efi: make clean target virtualcinap_lenrek
2014-10-18efi: add experimental efi bootloadercinap_lenrek
this is basically a port of 9boot to EFI. theres support for IA32 (386) and X64 (amd64). has been tested only under qemu with OVMF so far.
2013-09-239bootfat: only check for fat at block 0 on floppy drives (thanks aap)cinap_lenrek
smart boot manager has a "FAT" signature in its mbr causing 9bootfat to "detect" it as a fat filesystem and then fails to find plan9.ini. there shouldnt be a fat filesystem on harddrives at block 0, only on floppy drives. but some bioses use floppy drive numbers for usb harddrives so still check for a partition table. thanks aap for debugging this.
2013-09-019bootfat: always try plan9 partition even when not marked active, fix bugcinap_lenrek
always look for 9fat in plan9 partition even tho the partition is *not* maked active. marking partitions active is not recommended anymore with grub so this makes life easier for some people. multiple plan9 partitions on a single drive is not supported. have to copy partition table as buf gets trashed when reading first block of fat partition. it worked only when the first fat partition found (the one marked active) was the right one, but conffat() can fail.
2013-05-06pbs: allow 9bootfat start cluster beyond 0xFFFFcinap_lenrek
pbs failed to load (silently loading garbage) 9BOOTFAT from start cluster beyond FFFF because we ignored the low word from the directory entry. now taking the high 16 bit of the directory's start cluster into account.
2013-02-189boot: fix 9bootisocinap_lenrek
rearrange sub.c for putc(), readn(), memcmp(), memmove(), strchr() and strlen() and uart to fit into the first 2K of the image.