debuggers.hg

view tools/firmware/rombios/32bit/util.h @ 13681:c07326324f8d

[HVM] Add TCG BIOS extensions to the high memory area along with
some often-used libc utility functions. The TCG extensions are
described here:

https://www.trustedcomputinggroup.org/specs/PCClient/TCG_PCClientImplementationforBIOS_1-20_1-00.pdf

I have tried to keep the patching with rombios.c to a minimum, but
some amount of code needs to be inserted at various locations.

The code is currently deactivated, but can be activated by setting
BX_TCGBIOS to '1'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author kaf24@localhost.localdomain
date Fri Jan 26 16:38:32 2007 +0000 (2007-01-26)
parents
children e212203d7d34
line source
1 #ifndef UTIL_H
2 #define UTIL_H
4 void outb(uint16_t addr, uint8_t val);
5 void outw(uint16_t addr, uint16_t val);
6 void outl(uint16_t addr, uint32_t val);
7 uint8_t inb(uint16_t addr);
8 uint16_t inw(uint16_t addr);
9 uint32_t inl(uint16_t addr);
10 void mssleep(uint32_t time);
12 char *itoa(char *a, unsigned int i);
13 int strcmp(const char *cs, const char *ct);
14 int strncmp(const char *s1, const char *s2, uint32_t n);
15 void *memcpy(void *dest, const void *src, unsigned n);
16 void *memmove(void *dest, const void *src, unsigned n);
17 char *strcpy(char *dest, const char *src);
18 char *strncpy(char *dest, const char *src, unsigned n);
19 unsigned strlen(const char *s);
20 void * memset(void *s, int c, unsigned n);
21 int memcmp(const void *s1, const void *s2, unsigned n);
22 void cpuid(uint32_t idx, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx);
23 void byte_to_hex(char *digits, uint8_t byte);
24 void uuid_to_string(char *dest, uint8_t *uuid);
25 int printf(const char *fmt, ...);
28 #endif