46ce169ae0a6b9d4f04fdfccbee1df89c4c14ad9
[platform/kernel/u-boot.git] / tools / binman / etype / x86_start16_tpl.py
1 # SPDX-License-Identifier: GPL-2.0+
2 # Copyright (c) 2018 Google, Inc
3 # Written by Simon Glass <sjg@chromium.org>
4 #
5 # Entry-type module for the 16-bit x86 start-up code for U-Boot TPL
6 #
7
8 from entry import Entry
9 from blob import Entry_blob
10
11 class Entry_x86_start16_tpl(Entry_blob):
12     """x86 16-bit start-up code for TPL
13
14     Properties / Entry arguments:
15         - filename: Filename of tpl/u-boot-x86-16bit-tpl.bin (default
16             'tpl/u-boot-x86-16bit-tpl.bin')
17
18     x86 CPUs start up in 16-bit mode, even if they are 64-bit CPUs. This code
19     must be placed at a particular address. This entry holds that code. It is
20     typically placed at offset CONFIG_SYS_X86_START16. The code is responsible
21     for changing to 32-bit mode and starting TPL, which in turn jumps to SPL.
22
23     If TPL is not being used, the 'x86_start16_spl or 'x86_start16' entry types
24     may be used instead.
25     """
26     def __init__(self, section, etype, node):
27         Entry_blob.__init__(self, section, etype, node)
28
29     def GetDefaultFilename(self):
30         return 'tpl/u-boot-x86-16bit-tpl.bin'