iPXE
Defines | Functions | Variables
vram_settings.c File Reference

Video RAM dump. More...

#include <ipxe/uaccess.h>
#include <ipxe/settings.h>

Go to the source code of this file.

Defines

#define VRAM_BASE   0xb8000
 Video RAM base address.
#define VRAM_LEN   ( 80 /* columns */ * 25 /* rows */ * 2 /* bytes per character */ )
 Video RAM length.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static int vram_fetch (void *data, size_t len)
 Fetch video RAM setting.
struct setting vram_setting __setting (SETTING_MISC, vram)
 Video RAM setting.

Variables

struct builtin_setting
vram_builtin_setting 
__builtin_setting
 Video RAM built-in setting.

Detailed Description

Video RAM dump.

Definition in file vram_settings.c.


Define Documentation

#define VRAM_BASE   0xb8000

Video RAM base address.

Definition at line 36 of file vram_settings.c.

Referenced by vram_fetch().

#define VRAM_LEN   ( 80 /* columns */ * 25 /* rows */ * 2 /* bytes per character */ )

Video RAM length.

Definition at line 39 of file vram_settings.c.

Referenced by vram_fetch().


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static int vram_fetch ( void *  data,
size_t  len 
) [static]

Fetch video RAM setting.

Parameters:
dataBuffer to fill with setting data
lenLength of buffer
Return values:
lenLength of setting data, or negative error

Definition at line 49 of file vram_settings.c.

References copy_from_user(), phys_to_user(), VRAM_BASE, and VRAM_LEN.

                                                 {
        userptr_t vram = phys_to_user ( VRAM_BASE );

        /* Copy video RAM */
        if ( len > VRAM_LEN )
                len = VRAM_LEN;
        copy_from_user ( data, vram, 0, len );

        return VRAM_LEN;
}
struct setting vram_setting __setting ( SETTING_MISC  ,
vram   
) [read]

Video RAM setting.


Variable Documentation

struct builtin_setting vram_builtin_setting __builtin_setting
Initial value:
 {
        .setting = &vram_setting,
        .fetch = vram_fetch,
}

Video RAM built-in setting.

Definition at line 69 of file vram_settings.c.