drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / payloads / linuxcheck / i386.c
blobc0b48c16e2995b441dc88cb71c98393e3931655e
1 /*
3 * Copyright (C) 2018 Google Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #include <libpayload-config.h>
16 #include <libpayload.h>
17 #include "linuxcheck.h"
19 void buts(char *s)
21 int i;
22 for (i = 0; i < strlen(s); i++)
23 outb(s[i], 0x3f8);
26 void hex4(u8 c)
28 static char *hex = "0123456789abcdef";
29 outb(hex[c & 0xf], 0x3f8);
32 void hex8(u8 c)
34 hex4(c >> 4);
35 hex4(c);
38 void hex16(u16 c)
40 hex8((u8)(c >> 8));
41 hex8((u8)c);
43 void hex32(u32 c)
45 hex16((u16)(c >> 16));
46 hex16((u16)c);