payloads: Drop unneeded empty lines
Change-Id: I6faeb7c783052edc4217d2d301dbb905e1fc6a19 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44605 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
parent
99e0c7ddc1
commit
3ff7bcf10e
|
@ -7,14 +7,12 @@
|
||||||
#define LINES_SHOWN 19
|
#define LINES_SHOWN 19
|
||||||
#define TAB_WIDTH 2
|
#define TAB_WIDTH 2
|
||||||
|
|
||||||
|
|
||||||
/* Globals that are used for tracking screen state */
|
/* Globals that are used for tracking screen state */
|
||||||
static char *g_buf = NULL;
|
static char *g_buf = NULL;
|
||||||
static s32 g_line = 0;
|
static s32 g_line = 0;
|
||||||
static s32 g_lines_count = 0;
|
static s32 g_lines_count = 0;
|
||||||
static s32 g_max_cursor_line = 0;
|
static s32 g_max_cursor_line = 0;
|
||||||
|
|
||||||
|
|
||||||
/* Copied from libpayload/drivers/cbmem_console.c */
|
/* Copied from libpayload/drivers/cbmem_console.c */
|
||||||
struct cbmem_console {
|
struct cbmem_console {
|
||||||
u32 size;
|
u32 size;
|
||||||
|
@ -25,7 +23,6 @@ struct cbmem_console {
|
||||||
#define CURSOR_MASK ((1 << 28) - 1)
|
#define CURSOR_MASK ((1 << 28) - 1)
|
||||||
#define OVERFLOW (1 << 31)
|
#define OVERFLOW (1 << 31)
|
||||||
|
|
||||||
|
|
||||||
static u32 char_width(char c, u32 cursor, u32 screen_width)
|
static u32 char_width(char c, u32 cursor, u32 screen_width)
|
||||||
{
|
{
|
||||||
if (c == '\n') {
|
if (c == '\n') {
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
|
|
||||||
unsigned long virtual_offset = 0;
|
unsigned long virtual_offset = 0;
|
||||||
|
|
||||||
|
|
||||||
int getpagesize(void)
|
int getpagesize(void)
|
||||||
{
|
{
|
||||||
return 4096;
|
return 4096;
|
||||||
|
|
|
@ -127,7 +127,6 @@ void apic_start_delay(unsigned int usec)
|
||||||
enable_interrupts();
|
enable_interrupts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void apic_wait_delay(void)
|
void apic_wait_delay(void)
|
||||||
{
|
{
|
||||||
/* Loop in case another interrupt has fired and resumed execution. */
|
/* Loop in case another interrupt has fired and resumed execution. */
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
/* Let's assume APIC interrupts take at least 100us */
|
/* Let's assume APIC interrupts take at least 100us */
|
||||||
#define APIC_INTERRUPT_LATENCY_NS (100 * NSECS_PER_USEC)
|
#define APIC_INTERRUPT_LATENCY_NS (100 * NSECS_PER_USEC)
|
||||||
|
|
||||||
|
|
||||||
void arch_ndelay(uint64_t ns)
|
void arch_ndelay(uint64_t ns)
|
||||||
{
|
{
|
||||||
uint64_t delta = ns * timer_hz() / NSECS_PER_SEC;
|
uint64_t delta = ns * timer_hz() / NSECS_PER_SEC;
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
|
|
||||||
unsigned long virtual_offset = 0;
|
unsigned long virtual_offset = 0;
|
||||||
|
|
||||||
|
|
||||||
int getpagesize(void)
|
int getpagesize(void)
|
||||||
{
|
{
|
||||||
return 4096;
|
return 4096;
|
||||||
|
|
|
@ -115,7 +115,6 @@ SHA1Transform(u_int32_t state[5], const u_int8_t buffer[SHA1_BLOCK_LENGTH])
|
||||||
a = b = c = d = e = 0;
|
a = b = c = d = e = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SHA1Init - Initialize new context
|
* SHA1Init - Initialize new context
|
||||||
*/
|
*/
|
||||||
|
@ -132,7 +131,6 @@ SHA1Init(SHA1_CTX *context)
|
||||||
context->state[4] = 0xC3D2E1F0;
|
context->state[4] = 0xC3D2E1F0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Run your data through this.
|
* Run your data through this.
|
||||||
*/
|
*/
|
||||||
|
@ -155,7 +153,6 @@ SHA1Update(SHA1_CTX *context, const u_int8_t *data, size_t len)
|
||||||
(void)memcpy(&context->buffer[j], &data[i], len - i);
|
(void)memcpy(&context->buffer[j], &data[i], len - i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add padding and return the message digest.
|
* Add padding and return the message digest.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -46,14 +46,12 @@ void rmerror(void);
|
||||||
# define EDITBOXCOLOR (A_BOLD | A_REVERSE)
|
# define EDITBOXCOLOR (A_BOLD | A_REVERSE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define th 1 /* title window height */
|
#define th 1 /* title window height */
|
||||||
#define mh 1 /* main menu height */
|
#define mh 1 /* main menu height */
|
||||||
#define sh 2 /* status window height */
|
#define sh 2 /* status window height */
|
||||||
#define bh (LINES - th - mh - sh) /* body window height */
|
#define bh (LINES - th - mh - sh) /* body window height */
|
||||||
#define bw COLS /* body window width */
|
#define bw COLS /* body window width */
|
||||||
|
|
||||||
|
|
||||||
/******************************* STATIC ************************************/
|
/******************************* STATIC ************************************/
|
||||||
|
|
||||||
static WINDOW *wtitl, *wmain, *wbody, *wstat; /* title, menu, body, status win*/
|
static WINDOW *wtitl, *wmain, *wbody, *wstat; /* title, menu, body, status win*/
|
||||||
|
@ -360,7 +358,6 @@ static void cleanup(void) /* cleanup curses settings */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/******************************* EXTERNAL **********************************/
|
/******************************* EXTERNAL **********************************/
|
||||||
|
|
||||||
void clsbody(void)
|
void clsbody(void)
|
||||||
|
|
|
@ -116,7 +116,6 @@ ScrollBoxClassRec scrollBoxClassRec = {
|
||||||
|
|
||||||
WidgetClass scrollBoxWidgetClass = (WidgetClass)&scrollBoxClassRec;
|
WidgetClass scrollBoxWidgetClass = (WidgetClass)&scrollBoxClassRec;
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
* Private Routines *
|
* Private Routines *
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Class record constants */
|
/* Class record constants */
|
||||||
|
|
||||||
extern WidgetClass scrollBoxWidgetClass;
|
extern WidgetClass scrollBoxWidgetClass;
|
||||||
|
|
|
@ -56,7 +56,6 @@ typedef struct {
|
||||||
XtGeometryMask last_query_mode;
|
XtGeometryMask last_query_mode;
|
||||||
} ScrollBoxPart;
|
} ScrollBoxPart;
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
* Full instance record declaration *
|
* Full instance record declaration *
|
||||||
|
|
|
@ -276,7 +276,6 @@ static char *program_name;
|
||||||
|
|
||||||
#define RCOLOR(name, value) RPIXEL(color##name, Color##name, value)
|
#define RCOLOR(name, value) RPIXEL(color##name, Color##name, value)
|
||||||
|
|
||||||
|
|
||||||
#define RSTRINGP(name1, name2, param) { \
|
#define RSTRINGP(name1, name2, param) { \
|
||||||
#name1, #name2, XtRString, \
|
#name1, #name2, XtRString, \
|
||||||
MAX_PATH, APPDATAOFF(name1), XtRString, (XtPointer)param \
|
MAX_PATH, APPDATAOFF(name1), XtRString, (XtPointer)param \
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
* and: Thomas E. Dickey 1996-on *
|
* and: Thomas E. Dickey 1996-on *
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Id: curses.priv.h,v 1.314 2006/12/10 00:55:14 tom Exp $
|
* $Id: curses.priv.h,v 1.314 2006/12/10 00:55:14 tom Exp $
|
||||||
*
|
*
|
||||||
|
@ -497,7 +496,6 @@ struct screen {
|
||||||
chtype * _acs_map; /* the real alternate-charset map */
|
chtype * _acs_map; /* the real alternate-charset map */
|
||||||
bool * _screen_acs_map;
|
bool * _screen_acs_map;
|
||||||
|
|
||||||
|
|
||||||
/* used in lib_vidattr.c */
|
/* used in lib_vidattr.c */
|
||||||
bool _use_rmso; /* true if we may use 'rmso' */
|
bool _use_rmso; /* true if we may use 'rmso' */
|
||||||
bool _use_rmul; /* true if we may use 'rmul' */
|
bool _use_rmul; /* true if we may use 'rmul' */
|
||||||
|
@ -980,7 +978,6 @@ extern NCURSES_EXPORT(void) name (void); \
|
||||||
}\
|
}\
|
||||||
TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
|
TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
|
||||||
|
|
||||||
|
|
||||||
#define toggle_attr_off(S,at) {\
|
#define toggle_attr_off(S,at) {\
|
||||||
if (PAIR_NUMBER(at) > 0) {\
|
if (PAIR_NUMBER(at) > 0) {\
|
||||||
(S) &= ~(at|A_COLOR);\
|
(S) &= ~(at|A_COLOR);\
|
||||||
|
|
|
@ -106,7 +106,6 @@ typedef struct fieldnode {
|
||||||
NCURSES_FIELD_INTERNALS
|
NCURSES_FIELD_INTERNALS
|
||||||
} FIELD;
|
} FIELD;
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
* FORM *
|
* FORM *
|
||||||
*********/
|
*********/
|
||||||
|
@ -138,7 +137,6 @@ typedef struct formnode {
|
||||||
|
|
||||||
} FORM;
|
} FORM;
|
||||||
|
|
||||||
|
|
||||||
/**************
|
/**************
|
||||||
* FIELDTYPE *
|
* FIELDTYPE *
|
||||||
**************/
|
**************/
|
||||||
|
|
|
@ -132,7 +132,6 @@ typedef struct tagMENU
|
||||||
|
|
||||||
} MENU;
|
} MENU;
|
||||||
|
|
||||||
|
|
||||||
/* Define keys */
|
/* Define keys */
|
||||||
|
|
||||||
#define REQ_LEFT_ITEM (KEY_MAX + 1)
|
#define REQ_LEFT_ITEM (KEY_MAX + 1)
|
||||||
|
@ -170,7 +169,6 @@ typedef struct tagMENU
|
||||||
# define MAX_COMMAND (KEY_MAX + 128)
|
# define MAX_COMMAND (KEY_MAX + 128)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* --------- prototypes for libmenu functions ----------------------------- */
|
/* --------- prototypes for libmenu functions ----------------------------- */
|
||||||
|
|
||||||
extern NCURSES_EXPORT(ITEM **) menu_items (const MENU *);
|
extern NCURSES_EXPORT(ITEM **) menu_items (const MENU *);
|
||||||
|
@ -244,7 +242,6 @@ extern NCURSES_EXPORT(int) menu_request_by_name (const char *);
|
||||||
extern NCURSES_EXPORT(int) set_menu_spacing (MENU *,int,int,int);
|
extern NCURSES_EXPORT(int) set_menu_spacing (MENU *,int,int,int);
|
||||||
extern NCURSES_EXPORT(int) menu_spacing (const MENU *,int *,int *,int *);
|
extern NCURSES_EXPORT(int) menu_spacing (const MENU *,int *,int *,int *);
|
||||||
|
|
||||||
|
|
||||||
extern NCURSES_EXPORT(bool) item_value (const ITEM *);
|
extern NCURSES_EXPORT(bool) item_value (const ITEM *);
|
||||||
extern NCURSES_EXPORT(bool) item_visible (const ITEM *);
|
extern NCURSES_EXPORT(bool) item_visible (const ITEM *);
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,6 @@ extern int errno;
|
||||||
#define MODULE_ID(id) /*nothing*/
|
#define MODULE_ID(id) /*nothing*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Maximum regular 8-bit character code */
|
/* Maximum regular 8-bit character code */
|
||||||
#define MAX_REGULAR_CHARACTER (0xff)
|
#define MAX_REGULAR_CHARACTER (0xff)
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,6 @@ chtype console_acs_map[128] =
|
||||||
// FIXME: Ugly (and insecure!) hack!
|
// FIXME: Ugly (and insecure!) hack!
|
||||||
char sprintf_tmp[1024];
|
char sprintf_tmp[1024];
|
||||||
|
|
||||||
|
|
||||||
int curses_flags = (F_ENABLE_CONSOLE | F_ENABLE_SERIAL);
|
int curses_flags = (F_ENABLE_CONSOLE | F_ENABLE_SERIAL);
|
||||||
|
|
||||||
/* Return bit mask for clearing color pair number if given ch has color */
|
/* Return bit mask for clearing color pair number if given ch has color */
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
#include <libpayload-config.h>
|
#include <libpayload-config.h>
|
||||||
#include <libpayload.h>
|
#include <libpayload.h>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PCs can have either 64 (very old ones), 128, or 256 bytes of CMOS RAM.
|
* PCs can have either 64 (very old ones), 128, or 256 bytes of CMOS RAM.
|
||||||
*
|
*
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* For simplicity sake let's rely on coreboot initializing the UART. */
|
/* For simplicity sake let's rely on coreboot initializing the UART. */
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <libpayload.h>
|
#include <libpayload.h>
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
|
|
||||||
#include "ahci_private.h"
|
#include "ahci_private.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_STATUS
|
#ifdef DEBUG_STATUS
|
||||||
static inline u32 _ahci_clear_status(volatile u32 *const reg,
|
static inline u32 _ahci_clear_status(volatile u32 *const reg,
|
||||||
const char *const r,
|
const char *const r,
|
||||||
|
@ -64,7 +63,6 @@ static inline u32 _ahci_clear_status(volatile u32 *const reg)
|
||||||
#define ahci_clear_status(p, r) _ahci_clear_status(&(p)->r)
|
#define ahci_clear_status(p, r) _ahci_clear_status(&(p)->r)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static inline int ahci_port_is_active(const hba_port_t *const port)
|
static inline int ahci_port_is_active(const hba_port_t *const port)
|
||||||
{
|
{
|
||||||
return (port->sata_status & (HBA_PxSSTS_IPM_MASK | HBA_PxSSTS_DET_MASK))
|
return (port->sata_status & (HBA_PxSSTS_IPM_MASK | HBA_PxSSTS_DET_MASK))
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
|
|
||||||
#include "ahci_private.h"
|
#include "ahci_private.h"
|
||||||
|
|
||||||
|
|
||||||
ssize_t ahci_ata_read_sectors(ata_dev_t *const ata_dev,
|
ssize_t ahci_ata_read_sectors(ata_dev_t *const ata_dev,
|
||||||
const lba_t start, size_t count,
|
const lba_t start, size_t count,
|
||||||
u8 *const buf)
|
u8 *const buf)
|
||||||
|
|
|
@ -35,10 +35,8 @@
|
||||||
#include <storage/ata.h>
|
#include <storage/ata.h>
|
||||||
#include <storage/ahci.h>
|
#include <storage/ahci.h>
|
||||||
|
|
||||||
|
|
||||||
#include "ahci_private.h"
|
#include "ahci_private.h"
|
||||||
|
|
||||||
|
|
||||||
ssize_t ahci_packet_read_cmd(atapi_dev_t *const _dev,
|
ssize_t ahci_packet_read_cmd(atapi_dev_t *const _dev,
|
||||||
const u8 *const cmd, const size_t cmdlen,
|
const u8 *const cmd, const size_t cmdlen,
|
||||||
u8 *const buf, const size_t buflen)
|
u8 *const buf, const size_t buflen)
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
|
|
||||||
#include "ahci_private.h"
|
#include "ahci_private.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_STATUS
|
#ifdef DEBUG_STATUS
|
||||||
static inline u32 _ahci_clear_status(volatile u32 *const reg,
|
static inline u32 _ahci_clear_status(volatile u32 *const reg,
|
||||||
const char *const r,
|
const char *const r,
|
||||||
|
@ -62,7 +61,6 @@ static inline u32 _ahci_clear_status(volatile u32 *const reg)
|
||||||
#define ahci_clear_status(p, r) _ahci_clear_status(&(p)->r)
|
#define ahci_clear_status(p, r) _ahci_clear_status(&(p)->r)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/** Give a buffer with even address. */
|
/** Give a buffer with even address. */
|
||||||
static u8 *ahci_prdbuf_init(ahci_dev_t *const dev,
|
static u8 *ahci_prdbuf_init(ahci_dev_t *const dev,
|
||||||
u8 *const user_buf, const size_t len,
|
u8 *const user_buf, const size_t len,
|
||||||
|
|
|
@ -120,7 +120,6 @@ typedef volatile struct {
|
||||||
#define HBA_CTRL_INTR_EN (1 << 1)
|
#define HBA_CTRL_INTR_EN (1 << 1)
|
||||||
#define HBA_CTRL_RESET (1 << 0)
|
#define HBA_CTRL_RESET (1 << 0)
|
||||||
|
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
u8 dma_setup_fis[28];
|
u8 dma_setup_fis[28];
|
||||||
u8 _reserved0[4];
|
u8 _reserved0[4];
|
||||||
|
@ -229,5 +228,4 @@ ssize_t ahci_ata_read_sectors(ata_dev_t *const ata_dev,
|
||||||
const lba_t start, size_t count,
|
const lba_t start, size_t count,
|
||||||
u8 *const buf);
|
u8 *const buf);
|
||||||
|
|
||||||
|
|
||||||
#endif /* _AHCI_PRIVATE_H */
|
#endif /* _AHCI_PRIVATE_H */
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
|
|
||||||
#include <storage/ata.h>
|
#include <storage/ata.h>
|
||||||
|
|
||||||
|
|
||||||
/** Reads non-sector-aligned blocks of 512 bytes. */
|
/** Reads non-sector-aligned blocks of 512 bytes. */
|
||||||
static ssize_t ata_read_unaligned(ata_dev_t *const dev,
|
static ssize_t ata_read_unaligned(ata_dev_t *const dev,
|
||||||
const lba_t blk_start, size_t blk_count,
|
const lba_t blk_start, size_t blk_count,
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include <storage/ata.h>
|
#include <storage/ata.h>
|
||||||
#include <storage/atapi.h>
|
#include <storage/atapi.h>
|
||||||
|
|
||||||
|
|
||||||
static int atapi_request_sense(atapi_dev_t *const dev)
|
static int atapi_request_sense(atapi_dev_t *const dev)
|
||||||
{
|
{
|
||||||
u8 cdb[12] = { 0, };
|
u8 cdb[12] = { 0, };
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#endif
|
#endif
|
||||||
#include <storage/storage.h>
|
#include <storage/storage.h>
|
||||||
|
|
||||||
|
|
||||||
static storage_dev_t **devices = NULL;
|
static storage_dev_t **devices = NULL;
|
||||||
static size_t devices_length = 0;
|
static size_t devices_length = 0;
|
||||||
static size_t dev_count = 0;
|
static size_t dev_count = 0;
|
||||||
|
|
|
@ -300,7 +300,6 @@ static void start_setup(struct usbdev_ctrl *this, int ep)
|
||||||
udc_handle_setup(this, ep, &dr);
|
udc_handle_setup(this, ep, &dr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void chipidea_enqueue_packet(struct usbdev_ctrl *this, int endpoint,
|
static void chipidea_enqueue_packet(struct usbdev_ctrl *this, int endpoint,
|
||||||
int in_dir, void *data, int len, int zlp, int autofree)
|
int in_dir, void *data, int len, int zlp, int autofree)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <usb/usb.h>
|
#include <usb/usb.h>
|
||||||
#include "generic_hub.h"
|
#include "generic_hub.h"
|
||||||
#include "dwc2_private.h"
|
#include "dwc2_private.h"
|
||||||
|
|
|
@ -426,7 +426,6 @@ oom:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* FIXME: Handle control transfers as 3 QHs, so the 2nd stage can be >0x4000 bytes */
|
/* FIXME: Handle control transfers as 3 QHs, so the 2nd stage can be >0x4000 bytes */
|
||||||
static int ehci_control (usbdev_t *dev, direction_t dir, int drlen, void *setup,
|
static int ehci_control (usbdev_t *dev, direction_t dir, int drlen, void *setup,
|
||||||
int dalen, u8 *src)
|
int dalen, u8 *src)
|
||||||
|
@ -544,7 +543,6 @@ oom:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typedef struct _intr_qtd_t intr_qtd_t;
|
typedef struct _intr_qtd_t intr_qtd_t;
|
||||||
|
|
||||||
struct _intr_qtd_t {
|
struct _intr_qtd_t {
|
||||||
|
|
|
@ -171,7 +171,6 @@ ehci_rh_poll (usbdev_t *dev)
|
||||||
ehci_rh_scanport (dev, port);
|
ehci_rh_scanport (dev, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ehci_rh_init (usbdev_t *dev)
|
ehci_rh_init (usbdev_t *dev)
|
||||||
{
|
{
|
||||||
|
|
|
@ -627,7 +627,6 @@ ohci_bulk (endpoint_t *ep, int dalen, u8 *src, int finalize)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct _intr_queue;
|
struct _intr_queue;
|
||||||
|
|
||||||
struct _intrq_td {
|
struct _intrq_td {
|
||||||
|
|
|
@ -131,8 +131,6 @@ const char *countries[36][2] = {
|
||||||
/* 36 - 255: Reserved */
|
/* 36 - 255: Reserved */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct layout_maps {
|
struct layout_maps {
|
||||||
const char *country;
|
const char *country;
|
||||||
const short map[4][0x80];
|
const short map[4][0x80];
|
||||||
|
@ -247,7 +245,6 @@ static const struct layout_maps keyboard_layouts[] = {
|
||||||
//#endif
|
//#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void usb_hid_keyboard_queue(int ch) {
|
static void usb_hid_keyboard_queue(int ch) {
|
||||||
/* ignore key presses if buffer full */
|
/* ignore key presses if buffer full */
|
||||||
if (keycount < KEYBOARD_BUFFER_SIZE)
|
if (keycount < KEYBOARD_BUFFER_SIZE)
|
||||||
|
@ -316,7 +313,6 @@ usb_hid_process_keyboard_event(usbhid_inst_t *const inst,
|
||||||
if (skip)
|
if (skip)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
/* Mask off KB_MOD_CTRL */
|
/* Mask off KB_MOD_CTRL */
|
||||||
keypress = map->map[modifiers & 0x03][current->keys[i]];
|
keypress = map->map[modifiers & 0x03][current->keys[i]];
|
||||||
|
|
||||||
|
@ -397,7 +393,6 @@ static struct console_input_driver cons = {
|
||||||
.input_type = CONSOLE_INPUT_TYPE_USB,
|
.input_type = CONSOLE_INPUT_TYPE_USB,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static int usb_hid_set_layout (const char *country)
|
static int usb_hid_set_layout (const char *country)
|
||||||
{
|
{
|
||||||
/* FIXME should be per keyboard */
|
/* FIXME should be per keyboard */
|
||||||
|
|
|
@ -613,7 +613,6 @@ usb_msc_init (usbdev_t *dev)
|
||||||
usb_debug (" it uses %s protocol\n",
|
usb_debug (" it uses %s protocol\n",
|
||||||
msc_protocol_strings[interface->bInterfaceProtocol]);
|
msc_protocol_strings[interface->bInterfaceProtocol]);
|
||||||
|
|
||||||
|
|
||||||
if (interface->bInterfaceProtocol != 0x50) {
|
if (interface->bInterfaceProtocol != 0x50) {
|
||||||
usb_debug (" Protocol not supported.\n");
|
usb_debug (" Protocol not supported.\n");
|
||||||
usb_detach_device (dev->controller, dev->address);
|
usb_detach_device (dev->controller, dev->address);
|
||||||
|
|
|
@ -515,7 +515,6 @@ static inline int xhci_ep_id(const endpoint_t *const ep) {
|
||||||
return ((ep->endpoint & 0x7f) * 2) + (ep->direction != OUT);
|
return ((ep->endpoint & 0x7f) * 2) + (ep->direction != OUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef XHCI_DUMPS
|
#ifdef XHCI_DUMPS
|
||||||
void xhci_dump_slotctx(const slotctx_t *);
|
void xhci_dump_slotctx(const slotctx_t *);
|
||||||
void xhci_dump_epctx(const epctx_t *);
|
void xhci_dump_epctx(const epctx_t *);
|
||||||
|
|
|
@ -135,7 +135,6 @@ xhci_rh_enable_port(usbdev_t *const dev, int port)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const generic_hub_ops_t xhci_rh_ops = {
|
static const generic_hub_ops_t xhci_rh_ops = {
|
||||||
.hub_status_changed = xhci_rh_hub_status_changed,
|
.hub_status_changed = xhci_rh_hub_status_changed,
|
||||||
.port_status_changed = xhci_rh_port_status_changed,
|
.port_status_changed = xhci_rh_port_status_changed,
|
||||||
|
|
|
@ -138,7 +138,6 @@ static void corebootfb_putchar(u8 row, u8 col, unsigned int ch)
|
||||||
((((vga_colors[fg] >> 16) & 0xff) >> (8 - fbinfo.red_mask_size)) << fbinfo.red_mask_pos);
|
((((vga_colors[fg] >> 16) & 0xff) >> (8 - fbinfo.red_mask_size)) << fbinfo.red_mask_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dst = FB + ((row * font_height) * fbinfo.bytes_per_line);
|
dst = FB + ((row * font_height) * fbinfo.bytes_per_line);
|
||||||
dst += (col * font_width * (fbinfo.bits_per_pixel >> 3));
|
dst += (col * font_width * (fbinfo.bits_per_pixel >> 3));
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,6 @@ static void init_video_mode(void)
|
||||||
writel(((vga_mode.hactive - 1) << 16) | (vga_mode.vactive - 1),
|
writel(((vga_mode.hactive - 1) << 16) | (vga_mode.vactive - 1),
|
||||||
DC + 0x5C);
|
DC + 0x5C);
|
||||||
|
|
||||||
|
|
||||||
/* Write the VG configuration */
|
/* Write the VG configuration */
|
||||||
|
|
||||||
writel(0x290000F | vga_mode.synccfg, VG + 0x08);
|
writel(0x290000F | vga_mode.synccfg, VG + 0x08);
|
||||||
|
|
|
@ -50,5 +50,4 @@ int tolower(int c);
|
||||||
int toupper(int c);
|
int toupper(int c);
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -456,7 +456,6 @@ static inline int log2(u32 x) { return (int)sizeof(x) * 8 - clz(x) - 1; }
|
||||||
static inline int __ffs(u32 x) { return log2(x & (u32)(-(s32)x)); }
|
static inline int __ffs(u32 x) { return log2(x & (u32)(-(s32)x)); }
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup mmio MMIO helper functions
|
* @defgroup mmio MMIO helper functions
|
||||||
* @{
|
* @{
|
||||||
|
@ -475,7 +474,6 @@ static inline void buffer_to_fifo32(void *buffer, size_t size, void *fifo,
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup hash Hashing functions
|
* @defgroup hash Hashing functions
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -344,7 +344,6 @@ struct { \
|
||||||
#define XSIMPLEQ_EMPTY(head) (XSIMPLEQ_FIRST(head) == XSIMPLEQ_END(head))
|
#define XSIMPLEQ_EMPTY(head) (XSIMPLEQ_FIRST(head) == XSIMPLEQ_END(head))
|
||||||
#define XSIMPLEQ_NEXT(head, elm, field) XSIMPLEQ_XOR(head, ((elm)->field.sqx_next))
|
#define XSIMPLEQ_NEXT(head, elm, field) XSIMPLEQ_XOR(head, ((elm)->field.sqx_next))
|
||||||
|
|
||||||
|
|
||||||
#define XSIMPLEQ_FOREACH(var, head, field) \
|
#define XSIMPLEQ_FOREACH(var, head, field) \
|
||||||
for ((var) = XSIMPLEQ_FIRST(head); \
|
for ((var) = XSIMPLEQ_FIRST(head); \
|
||||||
(var) != XSIMPLEQ_END(head); \
|
(var) != XSIMPLEQ_END(head); \
|
||||||
|
@ -398,7 +397,6 @@ struct { \
|
||||||
XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
|
XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tail queue definitions.
|
* Tail queue definitions.
|
||||||
*/
|
*/
|
||||||
|
@ -442,7 +440,6 @@ struct { \
|
||||||
((tvar) = TAILQ_NEXT(var, field), 1); \
|
((tvar) = TAILQ_NEXT(var, field), 1); \
|
||||||
(var) = (tvar))
|
(var) = (tvar))
|
||||||
|
|
||||||
|
|
||||||
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
|
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
|
||||||
for((var) = TAILQ_LAST(head, headname); \
|
for((var) = TAILQ_LAST(head, headname); \
|
||||||
(var) != TAILQ_END(head); \
|
(var) != TAILQ_END(head); \
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
|
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
|
|
||||||
|
|
||||||
/* ATA commands */
|
/* ATA commands */
|
||||||
enum {
|
enum {
|
||||||
ATA_READ_DMA = 0xc8,
|
ATA_READ_DMA = 0xc8,
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
#include "ata.h"
|
#include "ata.h"
|
||||||
|
|
||||||
|
|
||||||
/* ATAPI commands */
|
/* ATAPI commands */
|
||||||
enum {
|
enum {
|
||||||
ATAPI_TEST_UNIT_READY = 0x00,
|
ATAPI_TEST_UNIT_READY = 0x00,
|
||||||
|
|
|
@ -32,14 +32,12 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
||||||
#if !CONFIG(LP_STORAGE_64BIT_LBA)
|
#if !CONFIG(LP_STORAGE_64BIT_LBA)
|
||||||
typedef u32 lba_t;
|
typedef u32 lba_t;
|
||||||
#else
|
#else
|
||||||
typedef u64 lba_t;
|
typedef u64 lba_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PORT_TYPE_IDE = (1 << 0),
|
PORT_TYPE_IDE = (1 << 0),
|
||||||
PORT_TYPE_SATA = (1 << 1),
|
PORT_TYPE_SATA = (1 << 1),
|
||||||
|
@ -54,7 +52,6 @@ typedef enum {
|
||||||
POLL_MEDIUM_PRESENT = 1,
|
POLL_MEDIUM_PRESENT = 1,
|
||||||
} storage_poll_t;
|
} storage_poll_t;
|
||||||
|
|
||||||
|
|
||||||
struct storage_dev;
|
struct storage_dev;
|
||||||
|
|
||||||
typedef struct storage_dev {
|
typedef struct storage_dev {
|
||||||
|
@ -70,7 +67,6 @@ typedef struct storage_dev {
|
||||||
int storage_device_count(void);
|
int storage_device_count(void);
|
||||||
int storage_attach_device(storage_dev_t *dev);
|
int storage_attach_device(storage_dev_t *dev);
|
||||||
|
|
||||||
|
|
||||||
storage_poll_t storage_probe(size_t dev_num);
|
storage_poll_t storage_probe(size_t dev_num);
|
||||||
ssize_t storage_read_blocks512(size_t dev_num, lba_t start, size_t count, unsigned char *buf);
|
ssize_t storage_read_blocks512(size_t dev_num, lba_t start, size_t count, unsigned char *buf);
|
||||||
|
|
||||||
|
|
|
@ -83,5 +83,4 @@ size_t strlcpy(char *d, const char *s, size_t n);
|
||||||
size_t strlcat(char *d, const char *s, size_t n);
|
size_t strlcat(char *d, const char *s, size_t n);
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -145,7 +145,6 @@ static int default_memcmp(const void *s1, const void *s2, size_t n)
|
||||||
int memcmp(const void *s1, const void *s2, size_t n)
|
int memcmp(const void *s1, const void *s2, size_t n)
|
||||||
__attribute__((weak, alias("default_memcmp")));
|
__attribute__((weak, alias("default_memcmp")));
|
||||||
|
|
||||||
|
|
||||||
void *memchr(const void *s, int c, size_t n)
|
void *memchr(const void *s, int c, size_t n)
|
||||||
{
|
{
|
||||||
unsigned char *p = (unsigned char *)s;
|
unsigned char *p = (unsigned char *)s;
|
||||||
|
|
|
@ -521,7 +521,6 @@ unsigned long int strtoul(const char *ptr, char **endptr, int base)
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the number of leading characters in s that match characters in a
|
* Determine the number of leading characters in s that match characters in a
|
||||||
* @param s A pointer to the string to analyse
|
* @param s A pointer to the string to analyse
|
||||||
|
|
|
@ -33,12 +33,10 @@
|
||||||
#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \
|
#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \
|
||||||
{ int i; for(i = 0; i < 5; i++) { RC_TEST; Code = (Code << 8) | RC_READ_BYTE; }}
|
{ int i; for(i = 0; i < 5; i++) { RC_TEST; Code = (Code << 8) | RC_READ_BYTE; }}
|
||||||
|
|
||||||
|
|
||||||
#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
|
#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
|
||||||
|
|
||||||
#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
|
#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
|
||||||
|
|
||||||
|
|
||||||
#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
|
#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
|
||||||
|
|
||||||
#define IfBit0(p) RC_NORMALIZE; bound = (Range >> kNumBitModelTotalBits) * *(p); if (Code < bound)
|
#define IfBit0(p) RC_NORMALIZE; bound = (Range >> kNumBitModelTotalBits) * *(p); if (Code < bound)
|
||||||
|
@ -56,7 +54,6 @@
|
||||||
do { CProb *cp = probs + res; RC_GET_BIT(cp, res) } while(--i != 0); \
|
do { CProb *cp = probs + res; RC_GET_BIT(cp, res) } while(--i != 0); \
|
||||||
res -= (1 << numLevels); }
|
res -= (1 << numLevels); }
|
||||||
|
|
||||||
|
|
||||||
#define kNumPosBitsMax 4
|
#define kNumPosBitsMax 4
|
||||||
#define kNumPosStatesMax (1 << kNumPosBitsMax)
|
#define kNumPosStatesMax (1 << kNumPosBitsMax)
|
||||||
|
|
||||||
|
@ -74,7 +71,6 @@
|
||||||
#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
|
#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
|
||||||
#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
|
#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
|
||||||
|
|
||||||
|
|
||||||
#define kNumStates 12
|
#define kNumStates 12
|
||||||
#define kNumLitStates 7
|
#define kNumLitStates 7
|
||||||
|
|
||||||
|
@ -143,7 +139,6 @@ int LzmaDecode(CLzmaDecoderState *vs,
|
||||||
UInt32 literalPosMask = (1 << (vs->Properties.lp)) - 1;
|
UInt32 literalPosMask = (1 << (vs->Properties.lp)) - 1;
|
||||||
int lc = vs->Properties.lc;
|
int lc = vs->Properties.lc;
|
||||||
|
|
||||||
|
|
||||||
int state = 0;
|
int state = 0;
|
||||||
UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
|
UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
@ -164,7 +159,6 @@ int LzmaDecode(CLzmaDecoderState *vs,
|
||||||
|
|
||||||
RC_INIT(inStream, inSize);
|
RC_INIT(inStream, inSize);
|
||||||
|
|
||||||
|
|
||||||
while(nowPos < outSize)
|
while(nowPos < outSize)
|
||||||
{
|
{
|
||||||
CProb *prob;
|
CProb *prob;
|
||||||
|
@ -379,7 +373,6 @@ int LzmaDecode(CLzmaDecoderState *vs,
|
||||||
if (rep0 > nowPos)
|
if (rep0 > nowPos)
|
||||||
return LZMA_RESULT_DATA_ERROR;
|
return LZMA_RESULT_DATA_ERROR;
|
||||||
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
previousByte = outStream[nowPos - rep0];
|
previousByte = outStream[nowPos - rep0];
|
||||||
|
@ -391,7 +384,6 @@ int LzmaDecode(CLzmaDecoderState *vs,
|
||||||
}
|
}
|
||||||
RC_NORMALIZE;
|
RC_NORMALIZE;
|
||||||
|
|
||||||
|
|
||||||
*inSizeProcessed = (SizeT)(Buffer - inStream);
|
*inSizeProcessed = (SizeT)(Buffer - inStream);
|
||||||
*outSizeProcessed = nowPos;
|
*outSizeProcessed = nowPos;
|
||||||
return LZMA_RESULT_OK;
|
return LZMA_RESULT_OK;
|
||||||
|
|
|
@ -32,7 +32,6 @@ typedef UInt32 SizeT;
|
||||||
#define LZMA_RESULT_OK 0
|
#define LZMA_RESULT_OK 0
|
||||||
#define LZMA_RESULT_DATA_ERROR 1
|
#define LZMA_RESULT_DATA_ERROR 1
|
||||||
|
|
||||||
|
|
||||||
#define LZMA_BASE_SIZE 1846
|
#define LZMA_BASE_SIZE 1846
|
||||||
#define LZMA_LIT_SIZE 768
|
#define LZMA_LIT_SIZE 768
|
||||||
|
|
||||||
|
@ -56,10 +55,8 @@ typedef struct _CLzmaDecoderState
|
||||||
CLzmaProperties Properties;
|
CLzmaProperties Properties;
|
||||||
CProb *Probs;
|
CProb *Probs;
|
||||||
|
|
||||||
|
|
||||||
} CLzmaDecoderState;
|
} CLzmaDecoderState;
|
||||||
|
|
||||||
|
|
||||||
int LzmaDecode(CLzmaDecoderState *vs,
|
int LzmaDecode(CLzmaDecoderState *vs,
|
||||||
const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
|
const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
|
||||||
unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);
|
unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);
|
||||||
|
|
Loading…
Reference in New Issue