Name Date Size #Lines LOC

..--

.gitignoreH A D25-Apr-20256 21

MakefileH A D25-Apr-2025684 3424

bucts.cH A D25-Apr-202510 KiB427380

description.mdH A D25-Apr-202558 21

readme.mdH A D25-Apr-20252.5 KiB5339

readme.md

1# What is bucts?
2Many Intel southbridges provide a mechanism called Back Up Control Top Swap (`BUC.TS`).
3This functionality allows to have the southbridge fetch the reset vector or
4the beginning of the bootblock at a 64K/128/256K offset from the usual top of flash.
5
6This can be useful in different ways:
7- Have a backup bootblock in case of bootblock hacking;
8- Some vendor BIOS only write protect their bootblock so this tool makes it
9  possible to circumvent this protection to allow flashing and booting coreboot.
10
11The BUC.TS status is stored in a nvram bit. To clear it one has to remove the RTC battery.
12
13# Operation Description
14First compile bucts by running make:
15
16	$ make
17
18Then you can view the current system settings:
19
20	$ ./bucts --print
21
22To flip the decode address of the bootblock, by setting `BUC.TS` to 1:
23
24	$ ./bucts --set
25
26To set the behavior the regular mapping, by setting `BUC.TS` to 0
27
28	$ ./bucts --unset
29
30
31# Details
32Example Bootblock size of 64KB (this is only configurable to be something else
33like 128 or 256K on PCH Intel targets).
34
35<pre>
36    +-------------+ -> 0x200000         +-------------+ -> 0xFFFFFFFF       +-------------+ -> 0xFFFFFFFF
37    |             |                     |             |                     |             |
38    | bootblock_0 |                     | bootblock_0 |                     | bootblock_1 |
39    |             |                     |             |                     |             |
40    +-------------+ -> 0x1F0000         +-------------+ -> 0xFFFF0000       +-------------+ -> 0xFFFF0000
41    |             |                     |             |                     |             |
42    | bootblock_1 |                     | bootblock_1 |                     | bootblock_0 |
43    |             |                     |             |                     |             |
44    +-------------+ -> 0x1E0000         +-------------+ -> 0xFFFE0000       +-------------+ -> 0xFFFE0000
45    |             |                     |             |                     |             |
46    |             |                     |             |                     |             |
47    Z             Z                     Z             Z                     Z             Z
48    Z             Z                     Z             Z                     Z             Z
49    |             |                     |             |                     |             |
50    |             |                     |             |                     |             |
51    FLASH (2M)                          Memory Map BUC.TS=0               Memory Map BUC.TS=1
52</pre>
53