iPXE
Macros | 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.

Macros

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

Functions

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

Variables

struct builtin_setting vram_builtin_setting __builtin_setting
 Video RAM built-in setting. More...
 

Detailed Description

Video RAM dump.

Definition in file vram_settings.c.

Macro Definition Documentation

◆ VRAM_BASE

#define VRAM_BASE   0xb8000

Video RAM base address.

Definition at line 36 of file vram_settings.c.

◆ VRAM_LEN

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

Video RAM length.

Definition at line 39 of file vram_settings.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ vram_fetch()

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.

49  {
50  userptr_t vram = phys_to_user ( VRAM_BASE );
51 
52  /* Copy video RAM */
53  if ( len > VRAM_LEN )
54  len = VRAM_LEN;
55  copy_from_user ( data, vram, 0, len );
56 
57  return VRAM_LEN;
58 }
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
Definition: uaccess.h:337
userptr_t phys_to_user(unsigned long phys_addr)
Convert physical address to user pointer.
uint32_t len
Length.
Definition: ena.h:14
#define VRAM_BASE
Video RAM base address.
Definition: vram_settings.c:36
#define VRAM_LEN
Video RAM length.
Definition: vram_settings.c:39
struct arbelprm_port_state_change_st data
Message.
Definition: arbel.h:12
unsigned long userptr_t
A pointer to a user buffer.
Definition: uaccess.h:33

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

◆ __setting()

const struct setting vram_setting __setting ( SETTING_MISC  ,
vram   
)

Video RAM setting.

Variable Documentation

◆ __builtin_setting

struct builtin_setting vram_builtin_setting __builtin_setting
Initial value:
= {
.setting = &vram_setting,
.fetch = vram_fetch,
}
static int vram_fetch(void *data, size_t len)
Fetch video RAM setting.
Definition: vram_settings.c:49

Video RAM built-in setting.

Definition at line 69 of file vram_settings.c.