127 Commits (a499113a7a38189e0514860cb8415434a24a3c6c)
 

Author SHA1 Message Date
Adam Joseph d791388304 src/coreboot: put expose fmap in passthru
This commit exposes the `fmap` (flash chip partition table) used to
build the coreboot image as the `passthru.fmap` attribute so it can
be referenced from other expressions.
2 years ago
Adam Joseph 203e6da773 flashrom: parameterize and passthru patches
Sadly we need at least two different forks of flashrom, with
different patches (and therefore different capabilities) applied to
each.  This commit parameterizes the flashrom expression and
includes those parameters in the `passthru` so downstream
expressions can check whether various needed features are present.
2 years ago
Adam Joseph c5fdfbff1b src/platform/*: move hostPlatform into the packageset
This commit makes `hostPlatform` part of the packageset for more
consistent handling.  A top-level `hostPlatform` argument is exposed
to the caller, in case they want to customize the `hostPlatform`
(compiler flags, etc).

The `hostPlatform` argument is inherited into the ownerboot package
set, where it will be overridden by `src/platform/*.nix` if it has
not been set explicitly.

Making `hostPlatform` part of the package set allows for more
sophisticated overriding schemes, for example adding additional
compiler flags or sanity-checking the flags that the user has
provided.
2 years ago
Adam Joseph 197e82f050 src/platforms/common: factor out {amd,arm}64.nix
This commit creates a (currently empty) overlay list for things
common to each of the amd64 and arm64 platform-classes.
2 years ago
Adam Joseph 0ecb6e67da default.nix: move flashrom into the ownerboot packageset
Since we (unfortunately) need to use different forks of flashrom for
different platforms, flashrom must be overrideable.  Moving it into
the ownerboot packageset is the way to do that.
2 years ago
Adam Joseph 3bdb75a387 src/default.nix: use a list of overlays rather than a single overlay
This commit changes from using a single overlay to using a
nixpkgs-like list of overlays chained together by
`lib.composeExtensions`.
2 years ago
Adam Joseph 66fecd2adf src/coreboot: cherry-pick python2->python3 patch 2 years ago
Adam Joseph 516b86434a kgpe: allow to configure recovery nvram values
On amd64 platforms, booting ownerboot with the recovery jumper
installed will wipe the battery-backed nvram (aka "cmos" aka "rtc
nvram") and overwrite it with known-safe values taken from the
coreboot source code (`src/mainboard/asus/kgpe-d16/cmos.default`).

You should always do this when flashing a motherboard with ownerboot
for the first time.

This commit allows the user to customize the set of known-safe
values which are written when the recovery jumper is installed.  To
do so, copy `src/mainboard/asus/kgpe-d16/cmos.default` out of
coreboot, edit to suit your tastes, and then override
`cmos-defaults` with the path to your customized `cmos.default`
file.
2 years ago
Adam Joseph 25bf9f95e0 kgpe: formatting 2 years ago
Adam Joseph 218f2f8e83 kgpe: move microcode blob out of ownerboot
The microcode blob is only needed for Opteron 63xx chips.  I have a
few of these, so I add the blob in a local overlay.

If other people are interested in this I will publish the overlay.

The 63xx chips are kind of rare and more expensive than the 62xx
chips -- their only real benefit is lower power draw.  I ended up
receiving some by accident due to an incorrect eBay listing.
2 years ago
Adam Joseph 0eb193a149 src/platform/kgpe/default.nix: typo 2 years ago
Adam Joseph 821fba4722 default.nix: formatting 2 years ago
Adam Joseph ad5cee037a remove accidentally-checked-in file
I accidentally checked in "ectool-patches-of-unclear-provenance.patch",
which was never used in any way by the build expressions.

This file contained my local patches to a very old version of
ectool, some of which came from Debian and some of which I wrote
myself.  The `ectool.nix` expression uses a newer version of ectool,
which has upstreamed the relevant changes from Debian.  So those
patches no longer need to be carried.  The other patches delete
functionality which I don't need, but other people might, so those
patches won't be included in ownerboot.
2 years ago
Adam Joseph 8438f297b4 Relicense: GPL-v2-or-v3 instead of GPL-v2-or-later
At this point I am the only person who has contributed to ownerboot,
so I'm able to make this correction unilaterally.  I wanted to do
this while I still had the chance.
2 years ago
Adam Joseph 9924354136 README: add todo item for moving to module-merge-based kconfig 2 years ago
Adam Joseph 276723681d kevin/linux.config: enable ath9k spectral scan and debugfs 2 years ago
Adam Joseph 0f15fd86a8 kgpe/linux.config: remove sb700 watchdog-related settings
The KGPE-D16 southbridge contains a watchdog; the kernel module for
this watchdog is sp5100_tco.

Unfortunately this watchdog keeps its counter in the main system CPU
RAM.  This means that the IOMMU will block the watchdog's attempts
to read and write its own counter (through the SMBus, which is PCI
device 0000:00:14.0), resulting in massive amounts of dmesg spam
like this:

```
        pci 0000:00:14.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0004 address=0xfdf9103300 flags=0x0030]
piix4_smbus 0000:00:14.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0004 address=0xfdf9103300 flags=0x0030]
```

Setting the IOMMU to allow these accesses is a headache, and
pointless anyways: the KGPE-D16 board disallows the use of the
watchdog by the CPU; it is reserved for the exclusive use of the
BMC.  Attempting to enable the watchdog does nothing; the enable bit
will not turn on.  Recent kernels check for this situation and
report when it is detected:

  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f7781b067522aa269213e8025c80cbed1868d349

Fortunately there is *another* watchdog on the motherboard, inside
the `W83667HG-A` SuperIO chip, and it is supported by
`w83627hf_wdt.ko`.  Subsequent commits to ownerboot will use *that*
watchdog instead.

Dump of my collection of possibly-related links:

- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266325
- https://forums.freebsd.org/threads/ivhd-errors-after-upgrade-host-to-13-1.85234/
- https://lists.linuxfoundation.org/pipermail/iommu/2015-October/014523.html
- https://lkml.org/lkml/2014/4/22/562
- https://bugzilla.kernel.org/show_bug.cgi?id=170741
- https://marc.info/?l=linuxbios&m=152035277020470&w=2
2 years ago
Adam Joseph 6cf5223d41 ecfw: move flashing scripts to separate derivation 2 years ago
Adam Joseph e5824b756d ecfw: fix comment 2 years ago
Adam Joseph 4cf0b70ae3 ecfw: fix version attr 2 years ago
Adam Joseph cab2ef5655 README.md: update roadmap 2 years ago
Adam Joseph 1ce5815fc1 README.md: move roadmap to top of page 2 years ago
Adam Joseph 036e75e542 README.md: link to more details about ecfw write protection 2 years ago
Adam Joseph bdebb940c9 platform/kevin/ecfw: init 2 years ago
Adam Joseph 1b9d35c10d flashrom: append -chromebook to pname and $out/bin-name when forChromebook==true 2 years ago
Adam Joseph 9ff6fba57c ectool: remove redundant EXTRA_CFLAGS 2 years ago
Adam Joseph 9e592c9751 ectool: make boardName a non-package argument 2 years ago
Adam Joseph 30ac75903b src/util/ectool/: init 2 years ago
Adam Joseph c40ed36e6b src/util/flashrom: move from src/flashrom 2 years ago
Adam Joseph 709bb2104d src/plat/*: allow to override hostPlatform 2 years ago
Adam Joseph 0bdf6e9355 src/plat/*: pass `lib` as a parameter instead of reimporting it 2 years ago
Adam Joseph ed0d745ca4 kgpe: add missing `mkdir` and path component 2 years ago
Adam Joseph d90863f36b coreboot: use python3 2 years ago
Adam Joseph 2bf7048655 README.md: fix typo 2 years ago
Adam Joseph 400ca67b14 README.md: fix link 2 years ago
Adam Joseph 98ff0a6132 README.md: current plans 2 years ago
Adam Joseph a0ba72a30a README.md: mention nvramtool 2 years ago
Adam Joseph 364ab1d34d README.md: shout out to PrawnOS 2 years ago
Adam Joseph f0eef409de README.md: mention google's flashrom-wp chromebook fork 2 years ago
Adam Joseph 576e50fc85 flashrom: add option for google chromebook fork 2 years ago
Adam Joseph 6243fa9245 src/coreboot: expose src attr in passthru.src 2 years ago
Adam Joseph 018e75000a optionally build nvramtool, put it and the .layout files in the initramfs 2 years ago
Adam Joseph 7a93f3a128 update coreboot-toolchain to deal with changes in nixpkgs 21.11 2 years ago
Adam Joseph 427d6beaae update nixpkgs to 21.11 2 years ago
Adam Joseph bceb4820f4 factor out lib as an optional argument 2 years ago
Adam Joseph 5fa23513f9 factor out pkgsFun as an optional argument 2 years ago
Adam Joseph 7fa5116288 doc/owner-controlled.md: mention debian and gnuk 2 years ago
Adam Joseph ece2e5c052 add links 2 years ago
Adam Joseph 8eaa402ba1 doc/platform/kevin/notes.md: mention CONFIG_INITRAMFS_SOURCE issue 2 years ago
Adam Joseph b8729694c2 doc/platform/am1i/notes.md: mention iommu situation 2 years ago