summaryrefslogtreecommitdiff
path: root/firmware/lib/include/vboot_display.h
blob: 52730b9e1ff67db0bd824ee7e83b1b6dc3ef8feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * Display functions used in kernel selection.
 */

#ifndef VBOOT_REFERENCE_VBOOT_DISPLAY_H_
#define VBOOT_REFERENCE_VBOOT_DISPLAY_H_

#include "bmpblk_font.h"
#include "vboot_api.h"
#include "vboot_nvstorage.h"

VbError_t VbDisplayScreenFromGBB(VbCommonParams *cparams, uint32_t screen,
                                 VbNvContext *vncptr);
VbError_t VbDisplayScreen(VbCommonParams *cparams, uint32_t screen, int force,
                          VbNvContext *vncptr);
VbError_t VbDisplayDebugInfo(VbCommonParams *cparams, VbNvContext *vncptr);
VbError_t VbCheckDisplayKey(VbCommonParams *cparams, uint32_t key,
                            VbNvContext *vncptr);

/* Internal functions, for unit testing */

typedef FontArrayHeader VbFont_t;

VbFont_t *VbInternalizeFontData(FontArrayHeader *fonthdr);

void VbDoneWithFontForNow(VbFont_t *ptr);

ImageInfo *VbFindFontGlyph(VbFont_t *font, uint32_t ascii,
			   void **bufferptr, uint32_t *buffersize);

/**
 * Try to display the specified text at a particular position.
 */
void VbRenderTextAtPos(char *text, int right_to_left,
		       uint32_t x, uint32_t y, VbFont_t *font);

/**
 * Return a description of the recovery reason code.
 */
const char *RecoveryReasonString(uint8_t code);

/**
 * Return a fixed string representing the HWID.
 */
char *VbHWID(VbCommonParams *cparams);

/**
 * Get the number of localizations in the GBB bitmap data.
 */
VbError_t VbGetLocalizationCount(VbCommonParams *cparams, uint32_t *count);

#endif /* VBOOT_REFERENCE_VBOOT_DISPLAY_H_ */