util/bucts: Add tool to manipulate BUC.TS bit on Intel targets

The purpose of this tool is to manipulate and get information about the
`Back Up Control, Top Swap` mechanism present on most Intel Southbridges.

This tool is initially written by Peter Stuge.

This tool makes it possible to have a backup mechanism for the
bootblock by using the southbridges Back Up Control Top Swap.

Sometimes it is also possible to circumvent vendor write protection mechanisms
in order to flash coreboot. An example of where this would be useful would be
the Lenovo Thinkpad X60 and T60.

Change-Id: I12cc2e91396f096fc979e23848e1929cb6c44fc5
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/18224
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans
2017-01-24 20:27:43 +01:00
committed by Patrick Georgi
parent 0ce41f1a11
commit a29498f599
4 changed files with 514 additions and 0 deletions

21
util/bucts/Makefile Normal file
View File

@@ -0,0 +1,21 @@
CC:=gcc
OBJ:=bucts.o
VERSION:=$(shell git describe)
CFLAGS+=-Wall
ifeq ($(shell uname), FreeBSD)
CFLAGS += -I/usr/local/include
LDFLAGS += -L/usr/local/lib
endif
all: bucts
bucts: $(OBJ)
$(CC) -o $@ $(OBJ) $(LDFLAGS) -lpci
%.o: %.c
$(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' -c $<
.PHONY: clean
clean:
rm -f bucts $(OBJ)