Changeset 5185


Ignore:
Timestamp:
Mar 5, 2010, 11:03:50 AM (5 years ago)
Author:
stepan
Message:

This patch is from 2009-10-20

Convert all DEBUG_SMBUS, DEBUG_SMI, and DEBUG_RAM_SETUP custom and
local #defines into globally configurable kconfig options (and Options.lb
options for as long as newconfig still exists) which can be enabled
by the user in the "Debugging" menu.

The respective menu items only appear if a board is selected where the
chipset code actually provides such additional DEBUG output.

All three variables default to 0 / off for now.

Also, drop a small chunk of dead/useless code in the
src/northbridge/via/cn700/raminit.c file, which would otherwise break
compilation.

Signed-off-by: Uwe Hermann <uwe@…>

Reworked to still apply to trunk, added X86EMU_DEBUG (and make the x86emu/yabel
code only work printf instead of a redefined version of printk and
Acked-by: Stefan Reinauer <stepan@…>

Location:
trunk
Files:
54 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Kconfig

    r5182 r5185  
    610610          See src/arch/i386/lib/c_start.S for details.
    611611
     612config DEBUG_RAM_SETUP
     613        bool "Output verbose RAM init debug messages"
     614        default n
     615        depends on (NORTHBRIDGE_AMD_AMDFAM10 \
     616                 || NORTHBRIDGE_AMD_AMDK8 \
     617                 || NORTHBRIDGE_VIA_CN700 \
     618                 || NORTHBRIDGE_VIA_CX700 \
     619                 || NORTHBRIDGE_VIA_VX800 \
     620                 || NORTHBRIDGE_INTEL_E7501 \
     621                 || NORTHBRIDGE_INTEL_I440BX \
     622                 || NORTHBRIDGE_INTEL_I82810 \
     623                 || NORTHBRIDGE_INTEL_I82830 \
     624                 || NORTHBRIDGE_INTEL_I945)
     625        help
     626          This option enables additional RAM init related debug messages.
     627          It is recommended to enable this when debugging issues on your
     628          board which might be RAM init related.
     629
     630          Note: This option will increase the size of the coreboot image.
     631
     632          If unsure, say N.
     633
     634config DEBUG_SMBUS
     635        bool "Output verbose SMBus debug messages"
     636        default n
     637        depends on (SOUTHBRIDGE_VIA_VT8237R \
     638                 || NORTHBRIDGE_VIA_VX800 \
     639                 || NORTHBRIDGE_VIA_CX700 \
     640                 || NORTHBRIDGE_AMD_AMDK8)
     641        help
     642          This option enables additional SMBus (and SPD) debug messages.
     643
     644          Note: This option will increase the size of the coreboot image.
     645
     646          If unsure, say N.
     647
     648config DEBUG_SMI
     649        bool "Output verbose SMI debug messages"
     650        default n
     651        depends on HAVE_SMI_HANDLER
     652        help
     653          This option enables additional SMI related debug messages.
     654
     655          Note: This option will increase the size of the coreboot image.
     656
     657          If unsure, say N.
     658
     659config X86EMU_DEBUG
     660        bool "Output verbose x86emu debug messages"
     661        default n
     662        depends on PCI_OPTION_ROM_RUN_YABEL
     663        help
     664          This option enables additional x86emu related debug messages.
     665
     666          Note: This option will increase the size of the coreboot image.
     667
     668          If unsure, say N.
     669
     670config X86EMU_DEBUG_JMP
     671        bool "Trace JMP/RETF"
     672        default n
     673        depends on X86EMU_DEBUG
     674        help
     675          Print information about JMP and RETF opcodes from x86emu.
     676
     677          Note: This option will increase the size of the coreboot image.
     678
     679          If unsure, say N.
     680
     681config X86EMU_DEBUG_TRACE
     682        bool "Trace all opcodes"
     683        default n
     684        depends on X86EMU_DEBUG
     685        help
     686          Print _all_ opcodes that are executed by x86emu.
     687         
     688          WARNING: This will produce a LOT of output and take a long time.
     689
     690          Note: This option will increase the size of the coreboot image.
     691
     692          If unsure, say N.
     693
     694config X86EMU_DEBUG_PNP
     695        bool "Log Plug&Play accesses"
     696        default n
     697        depends on X86EMU_DEBUG
     698        help
     699          Print Plug And Play accesses made by option ROMs.
     700
     701          Note: This option will increase the size of the coreboot image.
     702
     703          If unsure, say N.
     704
     705config X86EMU_DEBUG_DISK
     706        bool "Log Disk I/O"
     707        default n
     708        depends on X86EMU_DEBUG
     709        help
     710          Print Disk I/O related messages.
     711
     712          Note: This option will increase the size of the coreboot image.
     713
     714          If unsure, say N.
     715
     716config X86EMU_DEBUG_PMM
     717        bool "Log PMM"
     718        default n
     719        depends on X86EMU_DEBUG
     720        help
     721          Print messages related to POST Memory Manager (PMM).
     722
     723          Note: This option will increase the size of the coreboot image.
     724
     725          If unsure, say N.
     726
     727
     728config X86EMU_DEBUG_VBE
     729        bool "Debug VESA BIOS Extensions"
     730        default n
     731        depends on X86EMU_DEBUG
     732        help
     733          Print messages related to VESA BIOS Extension (VBE) functions.
     734
     735          Note: This option will increase the size of the coreboot image.
     736
     737          If unsure, say N.
     738
     739config X86EMU_DEBUG_INT10
     740        bool "Redirect INT10 output to console"
     741        default n
     742        depends on X86EMU_DEBUG
     743        help
     744          Let INT10 (i.e. character output) calls print messages to debug output.
     745
     746          Note: This option will increase the size of the coreboot image.
     747
     748          If unsure, say N.
     749
     750config X86EMU_DEBUG_INTERRUPTS
     751        bool "Log intXX calls"
     752        default n
     753        depends on X86EMU_DEBUG
     754        help
     755          Print messages related to interrupt handling.
     756
     757          Note: This option will increase the size of the coreboot image.
     758
     759          If unsure, say N.
     760
     761config X86EMU_DEBUG_CHECK_VMEM_ACCESS
     762        bool "Log special memory accesses"
     763        default n
     764        depends on X86EMU_DEBUG
     765        help
     766          Print messages related to accesses to certain areas of the virtual
     767          memory (e.g. BDA (BIOS Data Area) or interrupt vectors)
     768
     769          Note: This option will increase the size of the coreboot image.
     770
     771          If unsure, say N.
     772
     773config X86EMU_DEBUG_MEM
     774        bool "Log all memory accesses"
     775        default n
     776        depends on X86EMU_DEBUG
     777        help
     778          Print memory accesses made by option ROM.
     779          Note: This also includes accesses to fetch instructions.
     780
     781          Note: This option will increase the size of the coreboot image.
     782
     783          If unsure, say N.
     784
     785config X86EMU_DEBUG_IO
     786        bool "Log IO accesses"
     787        default n
     788        depends on X86EMU_DEBUG
     789        help
     790          Print I/O accesses made by option ROM.
     791
     792          Note: This option will increase the size of the coreboot image.
     793
     794          If unsure, say N.
     795
    612796endmenu
    613797
  • trunk/src/console/printk.c

    r4939 r5185  
    2020
    2121int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
    22 int default_message_loglevel = DEFAULT_MESSAGE_LOGLEVEL;
    23 int minimum_console_loglevel = MINIMUM_CONSOLE_LOGLEVEL;
    2422int default_console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
    2523
  • trunk/src/cpu/x86/smm/smihandler.c

    r5145 r5185  
    2727
    2828void southbridge_smi_set_eos(void);
    29 
    30 /* To enable SMI define DEBUG_SMI in smiutil.c */
    3129
    3230typedef enum { SMI_LOCKED, SMI_UNLOCKED } smi_semaphore;
  • trunk/src/cpu/x86/smm/smiutil.c

    r4840 r5185  
    2525#include <cpu/x86/cache.h>
    2626#include <cpu/x86/smm.h>
    27 
    28 // #define DEBUG_SMI
    2927
    3028/* ********************* smi_util ************************* */
     
    120118void console_init(void)
    121119{
    122 #ifdef DEBUG_SMI
     120#if CONFIG_DEBUG_SMI
    123121        console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
    124122        uart_init();
  • trunk/src/devices/Kconfig

    r5177 r5185  
    7575endchoice
    7676
    77 # TODO: Describe better, and/or make a "choice" selection for this.
    78 config YABEL_DEBUG_FLAGS
    79         prompt "Hex value for YABEL debug flags"
    80         hex
    81         default 0x0
    82         depends on PCI_OPTION_ROM_RUN_YABEL
    83         help
    84           CONFIG_YABEL_DEBUG_FLAGS is a binary switch that allows you
    85           to select the following items to debug. 1=on 0=off. After you
    86           decide what you want to debug create the binary value, convert to
    87           hex and set the option.
    88 
    89           Example for "debug all":
    90             CONFIG_YABEL_DEBUG_FLAGS = 0x31FF
    91 
    92           |-DEBUG_JMP - Print info about JMP and RETF opcodes from x86emu
    93           ||-DEBUG_TRACE_X86EMU - Print _all_ opcodes that are executed by
    94           ||                      x86emu (WARNING: this will produce a LOT
    95           ||                      of output)
    96           |||-Currently unused
    97           ||||-Currently unused
    98           |||||-Currently unused
    99           ||||||-DEBUG_PNP - Print Plug And Play accesses made by option ROM
    100           |||||||-DEBUG_DISK - Print Disk I/O related messages, currently unused
    101           ||||||||-DEBUG_PMM - Print messages related to POST Memory
    102           ||||||||             Manager (PMM)
    103           |||||||||-DEBUG_VBE - Print messages related to VESA BIOS Extension
    104           |||||||||             (VBE) functions
    105           ||||||||||-DEBUG_PRINT_INT10 - Let INT10 (i.e. character output)
    106           ||||||||||                     calls print messages to debug output
    107           |||||||||||-DEBUG_INTR - Print messages related to interrupt handling
    108           ||||||||||||-DEBUG_CHECK_VMEM_ACCESS - Print messages related to
    109           ||||||||||||                           accesses to certain areas of
    110           ||||||||||||                           the virtual memory (e.g. BDA
    111           ||||||||||||                           (BIOS Data Area) or interrupt
    112           ||||||||||||                           vectors)
    113           |||||||||||||-DEBUG_MEM - Print memory accesses made by option ROM
    114           |||||||||||||             (NOTE: this also includes accesses to
    115           |||||||||||||             fetch instructions)
    116           ||||||||||||||-DEBUG_IO - Print I/O accesses made by option ROM
    117           11000111111111 - Maximum binary value, i.e. "debug all"
    118                            (WARNING: This could run for hours)
    119 
    120           DEBUG_IO                      0x0001
    121           DEBUG_MEM                     0x0002
    122           DEBUG_CHECK_VMEM_ACCESS       0x0004
    123           DEBUG_INTR                    0x0008
    124           DEBUG_PRINT_INT10             0x0010
    125           DEBUG_VBE                     0x0020
    126           DEBUG_PMM                     0x0040
    127           DEBUG_DISK                    0x0080
    128           DEBUG_PNP                     0x0100
    129           DEBUG_TRACE_X86EMU            0x1000
    130           DEBUG_JMP                     0x2000
    131 
    132           See debug.h for values. 0 is no debug output, 0x31ff is _verbose_.
    133 
    13477config YABEL_PCI_ACCESS_OTHER_DEVICES
    13578        prompt "Allow option ROMs to access other devices"
     
    15093          YABEL requires 1MB memory for its CPU emulation. This memory is
    15194          normally located at 16MB.
     95
     96config YABEL_VIRTMEM_LOCATION
     97        hex
     98        depends on PCI_OPTION_ROM_RUN_YABEL && !EXPERT
     99        default 0x1000000
    152100
    153101config YABEL_DIRECTHW
  • trunk/src/mainboard/amd/dbm690t/romstage.c

    r5092 r5185  
    5858#include "cpu/x86/lapic/boot_cpu.c"
    5959#include "northbridge/amd/amdk8/reset_test.c"
    60 #include "northbridge/amd/amdk8/debug.c"
    6160#include "superio/ite/it8712f/it8712f_early_serial.c"
    6261
     
    6867#include "southbridge/amd/rs690/rs690_early_setup.c"
    6968#include "southbridge/amd/sb600/sb600_early_setup.c"
     69#include "northbridge/amd/amdk8/debug.c" /* After sb600_early_setup.c! */
    7070
    7171/* CAN'T BE REMOVED! crt0.S will use it. I don't know WHY!*/
  • trunk/src/mainboard/amd/pistachio/romstage.c

    r5092 r5185  
    5252#include "cpu/x86/lapic/boot_cpu.c"
    5353#include "northbridge/amd/amdk8/reset_test.c"
    54 #include "northbridge/amd/amdk8/debug.c"
    5554#include "superio/ite/it8712f/it8712f_early_serial.c"
    5655
     
    6261#include "southbridge/amd/rs690/rs690_early_setup.c"
    6362#include "southbridge/amd/sb600/sb600_early_setup.c"
     63#include "northbridge/amd/amdk8/debug.c" /* After sb600_early_setup.c! */
    6464
    6565/* CAN'T BE REMOVED! crt0.S will use it. I don't know WHY!*/
  • trunk/src/mainboard/amd/serengeti_cheetah_fam10/romstage.c

    r5138 r5185  
    3030#define CACHE_AS_RAM_ADDRESS_DEBUG 1
    3131
    32 #define DEBUG_SMBUS 1
    33 
    3432#define SET_NB_CFG_54 1
    3533
  • trunk/src/mainboard/asus/a8n_e/romstage.c

    r5092 r5185  
    3030/* Used by raminit. */
    3131#define QRANK_DIMM_SUPPORT 1
    32 
    33 /* Turn this on for SMBus debugging output. */
    34 #define DEBUG_SMBUS 0
    3532
    3633#if CONFIG_LOGICAL_CPUS == 1
  • trunk/src/mainboard/asus/a8v-e_se/romstage.c

    r5092 r5185  
    4141#define K8_SET_FIDVID_CORE0_ONLY 1
    4242
    43 /* #define DEBUG_SMBUS 1 */
    44 
    4543#include <stdint.h>
    4644#include <string.h>
     
    6058#include "cpu/x86/lapic/boot_cpu.c"
    6159#include "northbridge/amd/amdk8/reset_test.c"
    62 #include "northbridge/amd/amdk8/debug.c"
    6360#include "northbridge/amd/amdk8/early_ht.c"
    6461#include "superio/winbond/w83627ehg/w83627ehg_early_serial.c"
    6562#include "southbridge/via/vt8237r/vt8237r_early_smbus.c"
     63#include "northbridge/amd/amdk8/debug.c" /* After vt8237r_early_smbus.c! */
    6664#include "cpu/amd/mtrr/amd_earlymtrr.c"
    6765#include "cpu/x86/bist.h"
  • trunk/src/mainboard/asus/m2v-mx_se/romstage.c

    r5092 r5185  
    4444#define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
    4545#endif
    46 
    47 /* #define DEBUG_SMBUS 1 */
    4846
    4947#include <stdint.h>
  • trunk/src/mainboard/kontron/986lcd-m/romstage.c

    r5182 r5185  
    446446#if !CONFIG_HAVE_ACPI_RESUME
    447447#if CONFIG_DEFAULT_CONSOLE_LOGLEVEL > 8
    448 #if defined(DEBUG_RAM_SETUP)
     448#if CONFIG_DEBUG_RAM_SETUP
    449449        sdram_dump_mchbar_registers();
    450450#endif
  • trunk/src/mainboard/msi/ms7135/romstage.c

    r5092 r5185  
    3030/* Used by raminit. */
    3131#define QRANK_DIMM_SUPPORT 1
    32 
    33 /* Turn this on for SMBus debugging output. */
    34 #define DEBUG_SMBUS 0
    3532
    3633#if CONFIG_LOGICAL_CPUS == 1
  • trunk/src/mainboard/msi/ms7260/romstage.c

    r5092 r5185  
    2525
    2626// #define CACHE_AS_RAM_ADDRESS_DEBUG 1
    27 // #define DEBUG_SMBUS 1
    2827// #define RAM_TIMING_DEBUG 1
    2928// #define DQS_TRAIN_DEBUG 1
  • trunk/src/mainboard/msi/ms9185/romstage.c

    r5092 r5185  
    4242//if we want to wait for core1 done before DQS training, set it to 0
    4343#define K8_SET_FIDVID_CORE0_ONLY 1
    44 
    45 #define DEBUG_SMBUS 1
    4644
    4745#include <stdint.h>
  • trunk/src/mainboard/msi/ms9282/romstage.c

    r5092 r5185  
    3838//if we want to wait for core1 done before DQS training, set it to 0
    3939#define K8_SET_FIDVID_CORE0_ONLY 1
    40 
    41 #define DEBUG_SMBUS 1
    4240
    4341#include <stdint.h>
  • trunk/src/northbridge/amd/amdfam10/debug.c

    r5092 r5185  
    221221}
    222222
    223 #ifndef DEBUG_SMBUS
    224 #define DEBUG_SMBUS 0
    225 #endif
    226 
    227 #if DEBUG_SMBUS == 1
     223#if CONFIG_DEBUG_SMBUS
    228224
    229225static void dump_spd_registers(const struct mem_controller *ctrl)
  • trunk/src/northbridge/amd/amdfam10/raminit_amdmct.c

    r4562 r5185  
    2424}
    2525
    26 
    27 #define RAMINIT_DEBUG 1
    28 
    29 
    3026static  void print_tx(const char *strval, u32 val)
    3127{
    32 #if RAMINIT_DEBUG == 1
     28#if CONFIG_DEBUG_RAM_SETUP
    3329        print_raminit(strval, val);
    3430#endif
    3531}
    3632
    37 
    3833static  void print_t(const char *strval)
    3934{
    40 #if RAMINIT_DEBUG == 1
     35#if CONFIG_DEBUG_RAM_SETUP
    4136        print_debug(strval);
    4237#endif
  • trunk/src/northbridge/amd/amdk8/debug.c

    r5092 r5185  
    135135}
    136136
    137 #ifndef DEBUG_SMBUS
    138 #define DEBUG_SMBUS 0
    139 #endif
    140 
    141 #if DEBUG_SMBUS == 1
     137#if CONFIG_DEBUG_SMBUS
     138
    142139static void dump_spd_registers(const struct mem_controller *ctrl)
    143140{
  • trunk/src/northbridge/amd/amdk8/raminit_f.c

    r4890 r5185  
    3535#endif
    3636
    37 #define RAM_TIMING_DEBUG 0
    38 
    39 #if RAM_TIMING_DEBUG == 1
     37#if DEBUG_RAM_SETUP
    4038#define printk_raminit printk_debug
    4139#else
  • trunk/src/northbridge/intel/e7501/raminit.c

    r5155 r5185  
    2323//#define VALIDATE_DIMM_COMPATIBILITY
    2424
    25 // Uncomment this to enable local debugging messages
    26 //#define DEBUG_RAM_CONFIG
    27 
    28 #if defined(DEBUG_RAM_CONFIG)
     25#if CONFIG_DEBUG_RAM_SETUP
    2926#define RAM_DEBUG_MESSAGE(x)    print_debug(x)
    3027#define RAM_DEBUG_HEX32(x)              print_debug_hex32(x)
  • trunk/src/northbridge/intel/i440bx/raminit.c

    r3807 r5185  
    2929-----------------------------------------------------------------------------*/
    3030
    31 /* Uncomment this to enable debugging output. */
    32 #define DEBUG_RAM_SETUP 1
    33 
    3431/* Debugging macros. */
    35 #if defined(DEBUG_RAM_SETUP)
     32#if CONFIG_DEBUG_RAM_SETUP
    3633#define PRINT_DEBUG(x)          print_debug(x)
    3734#define PRINT_DEBUG_HEX8(x)     print_debug_hex8(x)
  • trunk/src/northbridge/intel/i82810/raminit.c

    r4809 r5185  
    3030-----------------------------------------------------------------------------*/
    3131
    32 /* Uncomment this to enable debugging output. */
    33 // #define DEBUG_RAM_SETUP 1
    34 
    3532/* Debugging macros. */
    36 #if defined(DEBUG_RAM_SETUP)
     33#if CONFIG_DEBUG_RAM_SETUP
    3734#define PRINT_DEBUG(x)          print_debug(x)
    3835#define PRINT_DEBUG_HEX8(x)     print_debug_hex8(x)
  • trunk/src/northbridge/intel/i82830/raminit.c

    r5177 r5185  
    3030-----------------------------------------------------------------------------*/
    3131
    32 /* Uncomment this to enable debugging output. */
    33 /* #define DEBUG_RAM_SETUP 1 */
    34 
    3532/* Debugging macros. */
    36 #if defined(DEBUG_RAM_SETUP)
     33#if CONFIG_DEBUG_RAM_SETUP
    3734#define PRINT_DEBUG(x)          print_debug(x)
    3835#define PRINT_DEBUG_HEX8(x)     print_debug_hex8(x)
  • trunk/src/northbridge/intel/i945/raminit.c

    r5136 r5185  
    2525#include "i945.h"
    2626
    27 #define DEBUG_RAM_SETUP
    28 
    2927/* Debugging macros. */
    30 #if defined(DEBUG_RAM_SETUP)
     28#if CONFIG_DEBUG_RAM_SETUP
    3129#define PRINTK_DEBUG(x...)      printk_debug(x)
    3230#else
     
    7472}
    7573
    76 #ifdef DEBUG_RAM_SETUP
     74#if CONFIG_DEBUG_RAM_SETUP
    7775static void sdram_dump_mchbar_registers(void)
    7876{
  • trunk/src/northbridge/via/cn700/raminit.c

    r3644 r5185  
    2626#include "cn700.h"
    2727
    28 // #define DEBUG_RAM_SETUP 1
    29 
    30 #ifdef DEBUG_RAM_SETUP
     28#ifdef CONFIG_DEBUG_RAM_SETUP
    3129#define PRINT_DEBUG_MEM(x)              print_debug(x)
    3230#define PRINT_DEBUG_MEM_HEX8(x)         print_debug_hex8(x)
     
    5250        reg |= command;
    5351        pci_write_config8(dev, DRAM_MISC_CTL, reg);
    54 
    55         PRINT_DEBUG_MEM("    Sending RAM command 0x");
    56         PRINT_DEBUG_MEM_HEX8(reg);
    57         PRINT_DEBUG_MEM(" to 0x");
    58         PRINT_DEBUG_MEM_HEX32(0 + addr_offset);
    59         PRINT_DEBUG_MEM("\r\n");
    6052}
    6153
  • trunk/src/northbridge/via/cx700/cx700_early_smbus.c

    r5092 r5185  
    4949
    5050/* Debugging macros. */
    51 
    52 // #define DEBUG_SMBUS 1
    53 
    54 #ifdef DEBUG_SMBUS
     51#if CONFIG_DEBUG_SMBUS
    5552#define PRINT_DEBUG(x)          print_debug(x)
    5653#define PRINT_DEBUG_HEX16(x)    print_debug_hex16(x)
     
    103100                ++loops;
    104101        }
    105 #ifdef DEBUG_SMBUS
     102#if CONFIG_DEBUG_SMBUS
    106103        /* Some systems seem to have a flakey SMBus. No need to spew a lot of
    107104         * errors on those, once we know that SMBus access is principally
     
    235232
    236233/* Debugging Function */
    237 #ifdef DEBUG_SMBUS
     234#ifdef CONFIG_DEBUG_SMBUS
    238235static void dump_spd_data(const struct mem_controller *ctrl)
    239236{
  • trunk/src/northbridge/via/cx700/raminit.c

    r4126 r5185  
    2525#include "cx700_registers.h"
    2626
    27 // #define DEBUG_RAM_SETUP 1
    28 
    2927/* Debugging macros. */
    30 #if defined(DEBUG_RAM_SETUP)
     28#if CONFIG_DEBUG_RAM_SETUP
    3129#define PRINTK_DEBUG(x...)      printk_debug(x)
    3230#else
  • trunk/src/northbridge/via/vx800/raminit.c

    r4397 r5185  
    2222#include <delay.h>
    2323
    24 #define DEBUG_RAM_SETUP 1
    25 
    26 #ifdef DEBUG_RAM_SETUP
     24#if CONFIG_DEBUG_RAM_SETUP
    2725#define PRINT_DEBUG_MEM(x)              print_debug(x)
    2826#define PRINT_DEBUG_MEM_HEX8(x)         print_debug_hex8(x)
  • trunk/src/northbridge/via/vx800/vx800_early_smbus.c

    r4397 r5185  
    5050#define SMBUS_DELAY()           outb(0x80, 0x80)
    5151
    52 /* Debugging macros. Only necessary if something isn't working right */
    53 
    54 #define DEBUG_SMBUS 1
    55 
    56 #ifdef DEBUG_SMBUS
     52#ifdef CONFIG_DEBUG_SMBUS
    5753#define PRINT_DEBUG(x)          print_debug(x)
    5854#define PRINT_DEBUG_HEX16(x)    print_debug_hex16(x)
     
    290286
    291287/* Debugging Function */
    292 #ifdef DEBUG_SMBUS
     288#if CONFIG_DEBUG_SMBUS
    293289static void dump_spd_data(void)
    294290{
  • trunk/src/southbridge/intel/i82801gx/i82801gx_smihandler.c

    r5136 r5185  
    2828#include <device/pci_def.h>
    2929#include "i82801gx.h"
    30 
    31 #define DEBUG_SMI
    3230
    3331#define APM_CNT         0xb2
  • trunk/src/southbridge/via/vt8237r/vt8237r.h

    r5127 r5185  
    6666#define CLOCK_SLAVE_ADDRESS             0x69
    6767
    68 #if DEBUG_SMBUS == 1
     68#if CONFIG_DEBUG_SMBUS
    6969#define PRINT_DEBUG(x)          print_debug(x)
    7070#define PRINT_DEBUG_HEX16(x)    print_debug_hex16(x)
  • trunk/util/x86emu/include/x86emu/fpu_regs.h

    r5131 r5185  
    103103#endif /* X86_FPU_SUPPORT */
    104104
    105 #ifdef DEBUG
     105#if CONFIG_X86EMU_DEBUG
    106106# define DECODE_PRINTINSTR32(t,mod,rh,rl)       \
    107107        DECODE_PRINTF(t[(mod<<3)+(rh)]);
  • trunk/util/x86emu/include/x86emu/regs.h

    r5131 r5185  
    280280    volatile int                intr;   /* mask of pending interrupts */
    281281    volatile int                         debug;
    282 #ifdef DEBUG
     282#if CONFIG_X86EMU_DEBUG
    283283    int                         check;
    284284    u16                         saved_ip;
     
    366366#define X86_DH M.x86.R_DH
    367367
    368                
    369 /*-------------------------- Function Prototypes --------------------------*/
    370 
    371 /* Function to log information at runtime */
    372 
    373 //void  printk(const char *fmt, ...);
    374 
    375368#ifdef  __cplusplus
    376369}                                               /* End of "C" linkage for C++           */
  • trunk/util/x86emu/include/x86emu/x86emu.h

    r5131 r5185  
    4343#define __X86EMU_X86EMU_H
    4444
    45 /* FIXME: redefine printk for the moment */
    4645#include <stddef.h>
    4746#include <console/console.h>
    48 #undef printk
    49 #define printk(x...) do_printk(BIOS_DEBUG, x)
    50 #if defined(CONFIG_YABEL_DEBUG_FLAGS) && (CONFIG_YABEL_DEBUG_FLAGS != 0)
     47#if CONFIG_X86EMU_DEBUG
    5148#define DEBUG
    52 #else
    53 #undef DEBUG
    5449#endif
    5550
    56 #ifdef SCITECH
    57 #include "scitech.h"
    58 #define X86API  _ASMAPI
    59 #define X86APIP _ASMAPIP
    60 typedef int X86EMU_pioAddr;
    61 #else
    6251#include "types.h"
    6352#define X86API
    6453#define X86APIP *
    65 #endif
    6654#include "regs.h"
    6755
     
    167155void    X86EMU_halt_sys(void);
    168156
    169 #ifdef  DEBUG
     157#if CONFIG_X86EMU_DEBUG
    170158#define HALT_SYS()      \
    171         printk("halt_sys: in %s\n", __func__);  \
     159        printf("halt_sys: in %s\n", __func__);  \
    172160        X86EMU_halt_sys();
    173161#else
  • trunk/util/x86emu/x86.c

    r5040 r5185  
    2424#include <arch/registers.h>
    2525#include <console/console.h>
    26 #define printk(x...) do_printk(x)
    27 
    2826#include <arch/interrupt.h>
    2927
  • trunk/util/x86emu/x86_interrupts.c

    r5040 r5185  
    2727#include <arch/io.h>
    2828#include <arch/registers.h>
    29 #define printk(x...) do_printk(x)
    3029
    3130enum {
  • trunk/util/x86emu/x86emu/debug.c

    r5131 r5185  
    3939
    4040#include "x86emui.h"
    41 // #include <stdarg.h>
    4241
    4342/*----------------------------- Implementation ----------------------------*/
     
    6059    }
    6160    if (DEBUG_DECODE() && ! DEBUG_DECODE_NOPRINT()) {
    62         printk("%04x:%04x ",M.x86.saved_cs, M.x86.saved_ip);
     61        printf("%04x:%04x ",M.x86.saved_cs, M.x86.saved_ip);
    6362        print_encoded_bytes( M.x86.saved_cs, M.x86.saved_ip);
    6463        print_decoded_instruction();
     
    7978     * of a hack!
    8079     */
    81     printk("%04x:%04x ",M.x86.saved_cs, M.x86.saved_ip);
     80    printf("%04x:%04x ",M.x86.saved_cs, M.x86.saved_ip);
    8281    print_encoded_bytes( M.x86.saved_cs, M.x86.saved_ip);
    8382    print_decoded_instruction();
     
    163162}
    164163
    165 void x86emu_decode_printf (char *x)
     164void x86emu_decode_printf (const char *x)
    166165{
    167166    sprintf(M.x86.decoded_buf+M.x86.enc_str_pos,"%s",x);
     
    169168}
    170169
    171 void x86emu_decode_printf2 (char *x, int y)
     170void x86emu_decode_printf2 (const char *x, int y)
    172171{
    173172    char temp[100];
     
    190189        sprintf(buf1+2*i,"%02x", fetch_data_byte_abs(s,o+i));
    191190    }
    192     printk("%-20s ",buf1);
     191    printf("%-20s ",buf1);
    193192}
    194193
    195194static void print_decoded_instruction (void)
    196195{
    197     printk("%s", M.x86.decoded_buf);
     196    printf("%s", M.x86.decoded_buf);
    198197}
    199198
     
    205204    seg   = fetch_data_word_abs(0,iv*4);
    206205    off   = fetch_data_word_abs(0,iv*4+2);
    207     printk("%04x:%04x ", seg, off);
     206    printf("%04x:%04x ", seg, off);
    208207}
    209208
     
    217216    current = start;
    218217    while (end <= off + amt) {
    219         printk("%04x:%04x ", seg, start);
     218        printf("%04x:%04x ", seg, start);
    220219        for (i=start; i< off; i++)
    221           printk("   ");
     220          printf("   ");
    222221        for (       ; i< end; i++)
    223           printk("%02x ", fetch_data_byte_abs(seg,i));
    224         printk("\n");
     222          printf("%02x ", fetch_data_byte_abs(seg,i));
     223        printf("\n");
    225224        start = end;
    226225        end = start + 16;
     
    257256    offset = M.x86.saved_ip;
    258257    while (!done) {
    259         printk("-");
     258        printf("-");
    260259        p = fgets(s, 1023, stdin);
    261260        cmd = parse_line(s, ps, &ntok);
     
    311310      case 'P':
    312311          noDecode = (noDecode)?0:1;
    313           printk("Toggled decoding to %s\n",(noDecode)?"FALSE":"TRUE");
     312          printf("Toggled decoding to %s\n",(noDecode)?"FALSE":"TRUE");
    314313          break;
    315314          case 't':
     
    369368void x86emu_dump_regs (void)
    370369{
    371     printk("\tAX=%04x  ", M.x86.R_AX );
    372     printk("BX=%04x  ", M.x86.R_BX );
    373     printk("CX=%04x  ", M.x86.R_CX );
    374     printk("DX=%04x  ", M.x86.R_DX );
    375     printk("SP=%04x  ", M.x86.R_SP );
    376     printk("BP=%04x  ", M.x86.R_BP );
    377     printk("SI=%04x  ", M.x86.R_SI );
    378     printk("DI=%04x\n", M.x86.R_DI );
    379     printk("\tDS=%04x  ", M.x86.R_DS );
    380     printk("ES=%04x  ", M.x86.R_ES );
    381     printk("SS=%04x  ", M.x86.R_SS );
    382     printk("CS=%04x  ", M.x86.R_CS );
    383     printk("IP=%04x   ", M.x86.R_IP );
    384     if (ACCESS_FLAG(F_OF))    printk("OV ");     /* CHECKED... */
    385     else                        printk("NV ");
    386     if (ACCESS_FLAG(F_DF))    printk("DN ");
    387     else                        printk("UP ");
    388     if (ACCESS_FLAG(F_IF))    printk("EI ");
    389     else                        printk("DI ");
    390     if (ACCESS_FLAG(F_SF))    printk("NG ");
    391     else                        printk("PL ");
    392     if (ACCESS_FLAG(F_ZF))    printk("ZR ");
    393     else                        printk("NZ ");
    394     if (ACCESS_FLAG(F_AF))    printk("AC ");
    395     else                        printk("NA ");
    396     if (ACCESS_FLAG(F_PF))    printk("PE ");
    397     else                        printk("PO ");
    398     if (ACCESS_FLAG(F_CF))    printk("CY ");
    399     else                        printk("NC ");
    400     printk("\n");
     370    printf("\tAX=%04x  ", M.x86.R_AX );
     371    printf("BX=%04x  ", M.x86.R_BX );
     372    printf("CX=%04x  ", M.x86.R_CX );
     373    printf("DX=%04x  ", M.x86.R_DX );
     374    printf("SP=%04x  ", M.x86.R_SP );
     375    printf("BP=%04x  ", M.x86.R_BP );
     376    printf("SI=%04x  ", M.x86.R_SI );
     377    printf("DI=%04x\n", M.x86.R_DI );
     378    printf("\tDS=%04x  ", M.x86.R_DS );
     379    printf("ES=%04x  ", M.x86.R_ES );
     380    printf("SS=%04x  ", M.x86.R_SS );
     381    printf("CS=%04x  ", M.x86.R_CS );
     382    printf("IP=%04x   ", M.x86.R_IP );
     383    if (ACCESS_FLAG(F_OF))    printf("OV ");     /* CHECKED... */
     384    else                        printf("NV ");
     385    if (ACCESS_FLAG(F_DF))    printf("DN ");
     386    else                        printf("UP ");
     387    if (ACCESS_FLAG(F_IF))    printf("EI ");
     388    else                        printf("DI ");
     389    if (ACCESS_FLAG(F_SF))    printf("NG ");
     390    else                        printf("PL ");
     391    if (ACCESS_FLAG(F_ZF))    printf("ZR ");
     392    else                        printf("NZ ");
     393    if (ACCESS_FLAG(F_AF))    printf("AC ");
     394    else                        printf("NA ");
     395    if (ACCESS_FLAG(F_PF))    printf("PE ");
     396    else                        printf("PO ");
     397    if (ACCESS_FLAG(F_CF))    printf("CY ");
     398    else                        printf("NC ");
     399    printf("\n");
    401400}
    402401
    403402void x86emu_dump_xregs (void)
    404403{
    405     printk("\tEAX=%08x  ", M.x86.R_EAX );
    406     printk("EBX=%08x  ", M.x86.R_EBX );
    407     printk("ECX=%08x  ", M.x86.R_ECX );
    408     printk("EDX=%08x  \n", M.x86.R_EDX );
    409     printk("\tESP=%08x  ", M.x86.R_ESP );
    410     printk("EBP=%08x  ", M.x86.R_EBP );
    411     printk("ESI=%08x  ", M.x86.R_ESI );
    412     printk("EDI=%08x\n", M.x86.R_EDI );
    413     printk("\tDS=%04x  ", M.x86.R_DS );
    414     printk("ES=%04x  ", M.x86.R_ES );
    415     printk("SS=%04x  ", M.x86.R_SS );
    416     printk("CS=%04x  ", M.x86.R_CS );
    417     printk("EIP=%08x\n\t", M.x86.R_EIP );
    418     if (ACCESS_FLAG(F_OF))    printk("OV ");     /* CHECKED... */
    419     else                        printk("NV ");
    420     if (ACCESS_FLAG(F_DF))    printk("DN ");
    421     else                        printk("UP ");
    422     if (ACCESS_FLAG(F_IF))    printk("EI ");
    423     else                        printk("DI ");
    424     if (ACCESS_FLAG(F_SF))    printk("NG ");
    425     else                        printk("PL ");
    426     if (ACCESS_FLAG(F_ZF))    printk("ZR ");
    427     else                        printk("NZ ");
    428     if (ACCESS_FLAG(F_AF))    printk("AC ");
    429     else                        printk("NA ");
    430     if (ACCESS_FLAG(F_PF))    printk("PE ");
    431     else                        printk("PO ");
    432     if (ACCESS_FLAG(F_CF))    printk("CY ");
    433     else                        printk("NC ");
    434     printk("\n");
    435 }
     404    printf("\tEAX=%08x  ", M.x86.R_EAX );
     405    printf("EBX=%08x  ", M.x86.R_EBX );
     406    printf("ECX=%08x  ", M.x86.R_ECX );
     407    printf("EDX=%08x  \n", M.x86.R_EDX );
     408    printf("\tESP=%08x  ", M.x86.R_ESP );
     409    printf("EBP=%08x  ", M.x86.R_EBP );
     410    printf("ESI=%08x  ", M.x86.R_ESI );
     411    printf("EDI=%08x\n", M.x86.R_EDI );
     412    printf("\tDS=%04x  ", M.x86.R_DS );
     413    printf("ES=%04x  ", M.x86.R_ES );
     414    printf("SS=%04x  ", M.x86.R_SS );
     415    printf("CS=%04x  ", M.x86.R_CS );
     416    printf("EIP=%08x\n\t", M.x86.R_EIP );
     417    if (ACCESS_FLAG(F_OF))    printf("OV ");     /* CHECKED... */
     418    else                        printf("NV ");
     419    if (ACCESS_FLAG(F_DF))    printf("DN ");
     420    else                        printf("UP ");
     421    if (ACCESS_FLAG(F_IF))    printf("EI ");
     422    else                        printf("DI ");
     423    if (ACCESS_FLAG(F_SF))    printf("NG ");
     424    else                        printf("PL ");
     425    if (ACCESS_FLAG(F_ZF))    printf("ZR ");
     426    else                        printf("NZ ");
     427    if (ACCESS_FLAG(F_AF))    printf("AC ");
     428    else                        printf("NA ");
     429    if (ACCESS_FLAG(F_PF))    printf("PE ");
     430    else                        printf("PO ");
     431    if (ACCESS_FLAG(F_CF))    printf("CY ");
     432    else                        printf("NC ");
     433    printf("\n");
     434}
  • trunk/util/x86emu/x86emu/debug.h

    r5131 r5185  
    4141#define __X86EMU_DEBUG_H
    4242
    43 //#define DEBUG 0
    44 //#undef DEBUG
    4543/*---------------------- Macros and type definitions ----------------------*/
     44
     45/* printf is not available in coreboot... use printk */
     46#define printf(x...) printk(BIOS_DEBUG, x)
    4647
    4748/* checks to be enabled for "runtime" */
     
    173174                x86emu_dump_regs();                                     \
    174175        if (DEBUG_TRACECALL())                                          \
    175                 printk("%04x:%04x: CALL %s%04x:%04x\n", u , v, s, w, x);
     176                printf("%04x:%04x: CALL %s%04x:%04x\n", u , v, s, w, x);
    176177# define RETURN_TRACE(u,v,w,x,s)                                    \
    177178        if (DEBUG_TRACECALLREGS())                                                                      \
    178179                x86emu_dump_regs();                                     \
    179180        if (DEBUG_TRACECALL())                                          \
    180                 printk("%04x:%04x: RET %s %04x:%04x\n",u,v,s,w,x);
     181                printf("%04x:%04x: RET %s %04x:%04x\n",u,v,s,w,x);
    181182# define  JMP_TRACE(u,v,w,x,s)                                 \
    182183   if (DEBUG_TRACEJMPREGS()) \
    183184      x86emu_dump_regs(); \
    184185   if (DEBUG_TRACEJMP()) \
    185       printk("%04x:%04x: JMP %s%04x:%04x\n", u , v, s, w, x);
     186      printf("%04x:%04x: JMP %s%04x:%04x\n", u , v, s, w, x);
    186187#else
    187188# define CALL_TRACE(u,v,w,x,s)
     
    202203#endif
    203204
    204 extern void x86emu_inc_decoded_inst_len (int x);
    205 extern void x86emu_decode_printf (char *x);
    206 extern void x86emu_decode_printf2 (char *x, int y);
    207 extern void x86emu_just_disassemble (void);
    208 extern void x86emu_single_step (void);
    209 extern void x86emu_end_instr (void);
    210 extern void x86emu_dump_regs (void);
    211 extern void x86emu_dump_xregs (void);
    212 extern void x86emu_print_int_vect (u16 iv);
    213 extern void x86emu_instrument_instruction (void);
    214 extern void x86emu_check_ip_access (void);
    215 extern void x86emu_check_sp_access (void);
    216 extern void x86emu_check_mem_access (u32 p);
    217 extern void x86emu_check_data_access (uint s, uint o);
     205void x86emu_inc_decoded_inst_len (int x);
     206void x86emu_decode_printf (const char *x);
     207void x86emu_decode_printf2 (const char *x, int y);
     208void x86emu_just_disassemble (void);
     209void x86emu_single_step (void);
     210void x86emu_end_instr (void);
     211void x86emu_dump_regs (void);
     212void x86emu_dump_xregs (void);
     213void x86emu_print_int_vect (u16 iv);
     214void x86emu_instrument_instruction (void);
     215void x86emu_check_ip_access (void);
     216void x86emu_check_sp_access (void);
     217void x86emu_check_mem_access (u32 p);
     218void x86emu_check_data_access (uint s, uint o);
     219
     220void disassemble_forward (u16 seg, u16 off, int n);
    218221
    219222#ifdef  __cplusplus
  • trunk/util/x86emu/x86emu/decode.c

    r5131 r5185  
    7878    u8 intrnum)
    7979{
    80     printk("%s, rasing execption %x\n", __func__, intrnum);
     80    printf("%s, raising exeception %x\n", __func__, intrnum);
    8181    x86emu_dump_regs();
    8282    M.x86.intno = intrnum;
     
    106106            if (M.x86.intr & INTR_HALTED) {
    107107DB(             if (M.x86.R_SP != 0) {
    108                     printk("halted\n");
     108                    printf("halted\n");
    109109                    X86EMU_trace_regs();
    110110                    }
    111111                else {
    112112                    if (M.x86.debug)
    113                         printk("Service completed successfully\n");
     113                        printf("Service completed successfully\n");
    114114                    })
    115115                return;
     
    287287      default:
    288288#ifdef  DEBUG
    289         printk("error: should not happen:  multiple overrides.\n");
     289        printf("error: should not happen:  multiple overrides.\n");
    290290#endif
    291291        HALT_SYS();
  • trunk/util/x86emu/x86emu/fpu.c

    r5131 r5185  
    5353#ifdef DEBUG
    5454
    55 static char *x86emu_fpu_op_d9_tab[] = {
     55static const char *x86emu_fpu_op_d9_tab[] = {
    5656    "FLD\tDWORD PTR ", "ESC_D9\t", "FST\tDWORD PTR ", "FSTP\tDWORD PTR ",
    5757    "FLDENV\t", "FLDCW\t", "FSTENV\t", "FSTCW\t",
     
    6464};
    6565
    66 static char *x86emu_fpu_op_d9_tab1[] = {
     66static const char *x86emu_fpu_op_d9_tab1[] = {
    6767    "FLD\t", "FLD\t", "FLD\t", "FLD\t",
    6868    "FLD\t", "FLD\t", "FLD\t", "FLD\t",
     
    297297#ifdef DEBUG
    298298
    299 char *x86emu_fpu_op_da_tab[] = {
     299static const char *x86emu_fpu_op_da_tab[] = {
    300300    "FIADD\tDWORD PTR ", "FIMUL\tDWORD PTR ", "FICOM\tDWORD PTR ",
    301301    "FICOMP\tDWORD PTR ",
     
    387387#ifdef DEBUG
    388388
    389 char *x86emu_fpu_op_db_tab[] = {
     389static const char *x86emu_fpu_op_db_tab[] = {
    390390    "FILD\tDWORD PTR ", "ESC_DB\t19", "FIST\tDWORD PTR ", "FISTP\tDWORD PTR ",
    391391    "ESC_DB\t1C", "FLD\tTBYTE PTR ", "ESC_DB\t1E", "FSTP\tTBYTE PTR ",
     
    506506
    507507#ifdef DEBUG
    508 char *x86emu_fpu_op_dc_tab[] = {
     508static const char *x86emu_fpu_op_dc_tab[] = {
    509509    "FADD\tQWORD PTR ", "FMUL\tQWORD PTR ", "FCOM\tQWORD PTR ",
    510510    "FCOMP\tQWORD PTR ",
     
    621621#ifdef DEBUG
    622622
    623 static char *x86emu_fpu_op_dd_tab[] = {
     623static const char *x86emu_fpu_op_dd_tab[] = {
    624624    "FLD\tQWORD PTR ", "ESC_DD\t29,", "FST\tQWORD PTR ", "FSTP\tQWORD PTR ",
    625625    "FRSTOR\t", "ESC_DD\t2D,", "FSAVE\t", "FSTSW\t",
     
    721721#ifdef DEBUG
    722722
    723 static char *x86emu_fpu_op_de_tab[] =
     723static const char *x86emu_fpu_op_de_tab[] =
    724724{
    725725    "FIADD\tWORD PTR ", "FIMUL\tWORD PTR ", "FICOM\tWORD PTR ",
     
    840840#ifdef DEBUG
    841841
    842 static char *x86emu_fpu_op_df_tab[] = {
     842static const char *x86emu_fpu_op_df_tab[] = {
    843843    /* mod == 00 */
    844844    "FILD\tWORD PTR ", "ESC_DF\t39\n", "FIST\tWORD PTR ", "FISTP\tWORD PTR ",
  • trunk/util/x86emu/x86emu/ops.c

    r5131 r5185  
    7878
    7979#ifdef DEBUG
    80 static char *x86emu_GenOpName[8] = {
     80static const char *x86emu_GenOpName[8] = {
    8181    "ADD", "OR", "ADC", "SBB", "AND", "SUB", "XOR", "CMP"};
    8282#endif
     
    160160#ifdef DEBUG
    161161
    162 static char *opF6_names[8] =
     162static const char *opF6_names[8] =
    163163  { "TEST\t", "", "NOT\t", "NEG\t", "MUL\t", "IMUL\t", "DIV\t", "IDIV\t" };
    164164
     
    179179        DECODE_PRINTF("ILLEGAL X86 OPCODE\n");
    180180        TRACE_REGS();
    181         DB( printk("%04x:%04x: %02X ILLEGAL X86 OPCODE!\n",
     181        DB( printf("%04x:%04x: %02X ILLEGAL X86 OPCODE!\n",
    182182            M.x86.R_CS, M.x86.R_IP-1,op1));
    183183        HALT_SYS();
  • trunk/util/x86emu/x86emu/ops2.c

    r4906 r5185  
    5555    DECODE_PRINTF("ILLEGAL EXTENDED X86 OPCODE\n");
    5656    TRACE_REGS();
    57     printk("%04x:%04x: %02X ILLEGAL EXTENDED X86 OPCODE!\n",
     57    printf("%04x:%04x: %02X ILLEGAL EXTENDED X86 OPCODE!\n",
    5858        M.x86.R_CS, M.x86.R_IP-2, op2);
    5959    HALT_SYS();
     
    106106    DECODE_PRINTF("ILLEGAL EXTENDED X86 OPCODE IN 0F 01\n");
    107107    TRACE_REGS();
    108     printk("%04x:%04x: %02X ILLEGAL EXTENDED X86 OPCODE!\n",
     108    printf("%04x:%04x: %02X ILLEGAL EXTENDED X86 OPCODE!\n",
    109109        M.x86.R_CS, M.x86.R_IP-2, op2);
    110110    HALT_SYS();
     
    12731273        DECODE_PRINTF("ILLEGAL EXTENDED X86 OPCODE\n");
    12741274        TRACE_REGS();
    1275         printk("%04x:%04x: %02X%02X ILLEGAL EXTENDED X86 OPCODE EXTENSION!\n",
     1275        printf("%04x:%04x: %02X%02X ILLEGAL EXTENDED X86 OPCODE EXTENSION!\n",
    12761276                M.x86.R_CS, M.x86.R_IP-3,op2, (mod<<6)|(rh<<3)|rl);
    12771277        HALT_SYS();
  • trunk/util/x86emu/x86emu/sys.c

    r5040 r5185  
    4242/* $XFree86: xc/extras/x86emu/src/x86emu/sys.c,v 1.5 2000/08/23 22:10:01 tsi Exp $ */
    4343
     44#include <arch/io.h>
    4445#include <x86emu/x86emu.h>
    4546#include <x86emu/regs.h>
    4647#include "debug.h"
    4748#include "prim_ops.h"
    48 #if 1 /* Coreboot needs to map prinkf to printk. */
    49 #include "arch/io.h"
    50 #else
    51 #include <sys/io.h>
    52 #endif
    5349
    5450#ifdef IN_MODULE
     
    7066
    7167        if (addr > M.mem_size - size) {
    72                 DB(printk("mem_ptr: address %#x out of range!\n", addr);)
     68                DB(printf("mem_ptr: address %#x out of range!\n", addr);)
    7369                    HALT_SYS();
    7470        }
    7571        if (addr < 0x200) {
    76                 //printk("%x:%x updating int vector 0x%x\n",
     72                //printf("%x:%x updating int vector 0x%x\n",
    7773                //       M.x86.R_CS, M.x86.R_IP, addr >> 2);
    7874        }
     
    10197        val = *ptr;
    10298        DB(if (DEBUG_MEM_TRACE())
    103            printk("%#08x 1 -> %#x\n", addr, val);)
     99           printf("%#08x 1 -> %#x\n", addr, val);)
    104100                return val;
    105101}
     
    124120
    125121        DB(if (DEBUG_MEM_TRACE())
    126            printk("%#08x 2 -> %#x\n", addr, val);)
     122           printf("%#08x 2 -> %#x\n", addr, val);)
    127123        return val;
    128124}
     
    146142
    147143        DB(if (DEBUG_MEM_TRACE())
    148            printk("%#08x 4 -> %#x\n", addr, val);)
     144           printf("%#08x 4 -> %#x\n", addr, val);)
    149145        return val;
    150146}
     
    166162
    167163        DB(if (DEBUG_MEM_TRACE())
    168            printk("%#08x 1 <- %#x\n", addr, val);)
     164           printf("%#08x 1 <- %#x\n", addr, val);)
    169165}
    170166
     
    185181
    186182        DB(if (DEBUG_MEM_TRACE())
    187            printk("%#08x 2 <- %#x\n", addr, val);)
     183           printf("%#08x 2 <- %#x\n", addr, val);)
    188184}
    189185
     
    204200
    205201        DB(if (DEBUG_MEM_TRACE())
    206            printk("%#08x 4 <- %#x\n", addr, val);)
     202           printf("%#08x 4 <- %#x\n", addr, val);)
    207203
    208204
     
    220216{
    221217        DB(if (DEBUG_IO_TRACE())
    222                 printk("inb %#04x \n", addr);)
     218                printf("inb %#04x \n", addr);)
    223219        return inb(addr);
    224220}
     
    235231{
    236232        DB(if (DEBUG_IO_TRACE())
    237                 printk("inw %#04x \n", addr);)
     233                printf("inw %#04x \n", addr);)
    238234        return inw(addr);
    239235}
     
    250246{
    251247        DB(if (DEBUG_IO_TRACE())
    252                 printk("inl %#04x \n", addr);)
     248                printf("inl %#04x \n", addr);)
    253249        return inl(addr);
    254250}
     
    264260{
    265261        DB(if (DEBUG_IO_TRACE())
    266                 printk("outb %#02x -> %#04x \n", val, addr);)
     262                printf("outb %#02x -> %#04x \n", val, addr);)
    267263        outb(val, addr);
    268264        return;
     
    279275{
    280276        DB(if (DEBUG_IO_TRACE())
    281                 printk("outw %#04x -> %#04x \n", val, addr);)
     277                printf("outw %#04x -> %#04x \n", val, addr);)
    282278        outw(val, addr);
    283279        return;
     
    294290{
    295291        DB(if (DEBUG_IO_TRACE())
    296                printk("outl %#08x -> %#04x \n", val, addr);)
     292               printf("outl %#08x -> %#04x \n", val, addr);)
    297293
    298294        outl(val, addr);
  • trunk/util/x86emu/x86emu/x86emui.h

    r4532 r5185  
    7575#include <xf86_ansic.h>
    7676#else
    77 //#include <stdio.h>
    78 //#include <stdlib.h>
    7977#include <string.h>
    8078#endif                                                                                           
  • trunk/util/x86emu/yabel/biosemu.c

    r5135 r5185  
    22 * Copyright (c) 2004, 2008 IBM Corporation
    33 * Copyright (c) 2008, 2009 Pattrick Hueper <phueper@hueper.net>
     4 * Copyright (c) 2010 coresystems GmbH
    45 * All rights reserved.
    56 * This program and the accompanying materials
     
    1314
    1415#include <string.h>
    15 
    1616#include <types.h>
    1717
     
    2929#include "pmm.h"
    3030
     31#include <device/device.h>
    3132#include "compat/rtas.h"
    32 
    33 #include <device/device.h>
    3433
    3534static X86EMU_memFuncs my_mem_funcs = {
     
    5857        u8 *rom_image;
    5958        int i = 0;
    60 #ifdef DEBUG
    61         debug_flags = 0;//DEBUG_PRINT_INT10 | DEBUG_PNP | DEBUG_INTR | DEBUG_CHECK_VMEM_ACCESS | DEBUG_MEM | DEBUG_IO;
    62                 // | DEBUG_CHECK_VMEM_ACCESS | DEBUG_MEM | DEBUG_IO;
    63                 // | DEBUG_TRACE_X86EMU | DEBUG_JMP;
    64 
    65         /* use CONFIG_YABEL_DEBUG_FLAGS, too... */
    66         debug_flags |= CONFIG_YABEL_DEBUG_FLAGS;
     59#if CONFIG_X86EMU_DEBUG
     60        debug_flags = 0;
     61#if defined(CONFIG_X86EMU_DEBUG_JMP) && CONFIG_X86EMU_DEBUG_JMP
     62        debug_flags |= DEBUG_JMP;
     63#endif
     64#if defined(CONFIG_X86EMU_DEBUG_TRACE) && CONFIG_X86EMU_DEBUG_TRACE
     65        debug_flags |= DEBUG_TRACE_X86EMU;
     66#endif
     67#if defined(CONFIG_X86EMU_DEBUG_PNP) && CONFIG_X86EMU_DEBUG_PNP
     68        debug_flags |= DEBUG_PNP;
     69#endif
     70#if defined(CONFIG_X86EMU_DEBUG_DISK) && CONFIG_X86EMU_DEBUG_DISK
     71        debug_flags |= DEBUG_DISK;
     72#endif
     73#if defined(CONFIG_X86EMU_DEBUG_PMM) && CONFIG_X86EMU_DEBUG_PMM
     74        debug_flags |= DEBUG_PMM;
     75#endif
     76#if defined(CONFIG_X86EMU_DEBUG_VBE) && CONFIG_X86EMU_DEBUG_VBE
     77        debug_flags |= DEBUG_VBE;
     78#endif
     79#if defined(CONFIG_X86EMU_DEBUG_INT10) && CONFIG_X86EMU_DEBUG_INT10
     80        debug_flags |= DEBUG_PRINT_INT10;
     81#endif
     82#if defined(CONFIG_X86EMU_DEBUG_INTERRUPTS) && CONFIG_X86EMU_DEBUG_INTERRUPTS
     83        debug_flags |= DEBUG_INTR;
     84#endif
     85#if defined(CONFIG_X86EMU_DEBUG_CHECK_VMEM_ACCESS) && CONFIG_X86EMU_DEBUG_CHECK_VMEM_ACCESS
     86        debug_flags |= DEBUG_CHECK_VMEM_ACCESS;
     87#endif
     88#if defined(CONFIG_X86EMU_DEBUG_MEM) && CONFIG_X86EMU_DEBUG_MEM
     89        debug_flags |= DEBUG_MEM;
     90#endif
     91#if defined(CONFIG_X86EMU_DEBUG_IO) && CONFIG_X86EMU_DEBUG_IO
     92        debug_flags |= DEBUG_IO;
     93#endif
     94
    6795#endif
    6896        if (biosmem_size < MIN_REQUIRED_VMEM_SIZE) {
     
    201229
    202230        // setup  original ROM BIOS Area (F000:xxxx)
    203         char *date = "06/11/99";
     231        const char *date = "06/11/99";
    204232        for (i = 0; date[i]; i++)
    205233                my_wrb(0xffff5 + i, date[i]);
    206234        // set up eisa ident string
    207         char *ident = "PCI_ISA";
     235        const char *ident = "PCI_ISA";
    208236        for (i = 0; ident[i]; i++)
    209237                my_wrb(0xfffd9 + i, ident[i]);
     
    251279        // any return will pop the pointer and jump to the HLT, thus
    252280        // exiting (more or less) cleanly
    253         push_word(0xf4f4);      //F4=HLT
     281        push_word(0xf4f4);      // F4=HLT
    254282        push_word(M.x86.R_SS);
    255283        push_word(M.x86.R_SP + 2);
     
    257285        CHECK_DBG(DEBUG_TRACE_X86EMU) {
    258286                X86EMU_trace_on();
     287#if 0
    259288        } else {
    260 #ifdef DEBUG
    261289                M.x86.debug |= DEBUG_SAVE_IP_CS_F;
    262290                M.x86.debug |= DEBUG_DECODE_F;
     
    269297                M.x86.debug |= DEBUG_TRACECALL_F;
    270298                M.x86.debug |= DEBUG_TRACECALL_REGS_F;
    271                 }
     299        }
    272300
    273301        DEBUG_PRINTF("Executing Initialization Vector...\n");
     
    279307         */
    280308        DEBUG_PRINTF_CS_IP("Option ROM Exit Status: %04x\n", M.x86.R_AX);
    281 #ifdef DEBUG
     309#if defined(CONFIG_X86EMU_DEBUG) && CONFIG_X86EMU_DEBUG
    282310        DEBUG_PRINTF("Exit Status Decode:\n");
    283311        if (M.x86.R_AX & 0x100) {       // bit 8
     
    345373                DEBUG_PRINTF("Stack is clean, initialization successfull!\n");
    346374        } else {
    347                 DEBUG_PRINTF
    348                     ("Stack unclean, initialization probably NOT COMPLETE!!\n");
     375                printf("Stack unclean, initialization probably NOT COMPLETE!\n");
    349376                DEBUG_PRINTF("SS:SP = %04x:%04x, expected: %04x:%04x\n",
    350377                             M.x86.R_SS, M.x86.R_SP, STACK_SEGMENT,
    351378                             STACK_START_OFFSET);
    352379        }
    353 
    354380
    355381        // TODO: according to the BIOS Boot Spec initializations may be ended using INT18h and setting
  • trunk/util/x86emu/yabel/biosemu.h

    r4532 r5185  
    4747extern yabel_handleIntFunc yabel_intFuncArray[256];
    4848
     49struct device;
     50
     51u32 biosemu(u8 *biosmem, u32 biosmem_size, struct device *dev, unsigned long rom_addr);
    4952#endif
  • trunk/util/x86emu/yabel/compat/functions.c

    r5135 r5185  
    1818#include <device/device.h>
    1919#include "../debug.h"
     20#include "../biosemu.h"
    2021
    2122#define VMEM_SIZE (1024 * 1024) /* 1 MB */
     
    3132#endif
    3233
    33 u32 biosemu(u8 *biosmem, u32 biosmem_size, struct device *dev,
    34             unsigned long rom_addr);
    3534#if CONFIG_BOOTSPLASH
    3635void vbe_set_graphics(void);
     
    4746
    4847        if (vmem != NULL) {
    49                 printf("Copying legacy memory from 0x%08x to the lower 1MB\n", vmem);
    50                 memcpy(0x00000, vmem + 0x00000, 0x400);         // IVT
    51                 memcpy(0x00400, vmem + 0x00400, 0x100);         // BDA
    52                 memcpy(0xc0000, vmem + 0xc0000, 0x10000);       // VGA OPROM
     48                printf("Copying legacy memory from %p to the lower 1MB\n", vmem);
     49                memcpy((void *)0x00000, vmem + 0x00000, 0x400);         // IVT
     50                memcpy((void *)0x00400, vmem + 0x00400, 0x100);         // BDA
     51                memcpy((void *)0xc0000, vmem + 0xc0000, 0x10000);       // VGA OPROM
    5352        }
    5453}
  • trunk/util/x86emu/yabel/debug.h

    r5131 r5185  
    2222/* printf is not available in coreboot... use printk */
    2323#include <console/console.h>
    24 /* uurgs... yuck... x86emu/x86emu.h is redefining printk... we include it here
    25  * and use its redefinition of printk
    26  * TODO: FIX!!!! */
    2724#include "x86emu/x86emu.h"
    28 #define printf printk
     25#define printf(x...) printk(BIOS_DEBUG, x)
    2926
    3027/* PH: empty versions of set/clr_ci
     
    3330static inline void set_ci(void) {};
    3431
    35 /* Set CONFIG_YABEL_DEBUG_FLAGS is a binary switch that allows you
    36  * to select the following items to debug. 1=on 0=off. After you
    37  * decide what you want to debug create the binary value, convert to hex
    38  * and set the Option (Ex. CONFIG_YABEL_DEBUG_FLAGS = 0x31FF //Debug All).
     32/* debug_flags is a binary switch that allows you to select the following items
     33 * to debug. 1=on 0=off. After you decide what you want to debug create the
     34 * binary value, convert to hex and set the option. These options can be
     35 * selected in Kconfig.
    3936 *
    4037 * |-DEBUG_JMP - print info about JMP and RETF opcodes from x86emu
     
    7067#define DEBUG_JMP 0x2000
    7168
    72 //#define DEBUG
    73 //#undef DEBUG
    74 #ifdef DEBUG
     69#if defined(CONFIG_X86EMU_DEBUG) && CONFIG_X86EMU_DEBUG
    7570
    7671#define CHECK_DBG(_flag) if (debug_flags & _flag)
  • trunk/util/x86emu/yabel/device.c

    r5131 r5185  
    4141/* coreboot version */
    4242
    43 void
     43static void
    4444biosemu_dev_get_addr_info(void)
    4545{
     
    113113        // store last entry index of translate_address_array
    114114        taa_last_entry = taa_index - 1;
    115 #ifdef DEBUG
     115#if defined(CONFIG_X86EMU_DEBUG) && CONFIG_X86EMU_DEBUG
    116116        //dump translate_address_array
    117117        printf("translate_address_array: \n");
     
    196196        // store last entry index of translate_address_array
    197197        taa_last_entry = taa_index - 1;
    198 #ifdef DEBUG
     198#if defined(CONFIG_X86EMU_DEBUG) && CONFIG_X86EMU_DEBUG
    199199        //dump translate_address_array
    200200        printf("translate_address_array: \n");
     
    211211#endif
    212212
     213#ifndef CONFIG_PCI_OPTION_ROM_RUN_YABEL
    213214// to simulate accesses to legacy VGA Memory (0xA0000-0xBFFFF)
    214215// we look for the first prefetchable memory BAR, if no prefetchable BAR found,
    215216// we use the first memory BAR
    216217// dev_translate_addr will translate accesses to the legacy VGA Memory into the found vmem BAR
    217 void
     218static void
    218219biosemu_dev_find_vmem_addr(void)
    219220{
     
    258259}
    259260
    260 #ifndef CONFIG_PCI_OPTION_ROM_RUN_YABEL
    261261void
    262262biosemu_dev_get_puid(void)
     
    268268#endif
    269269
    270 void
     270static void
    271271biosemu_dev_get_device_vendor_id(void)
    272272{
     
    335335                       sizeof(pci_ds));
    336336                clr_ci();
    337 #ifdef DEBUG
     337#if defined(CONFIG_X86EMU_DEBUG) && CONFIG_X86EMU_DEBUG
    338338                DEBUG_PRINTF("PCI Data Structure @%lx:\n",
    339339                             rom_base_addr + pci_ds_offset);
  • trunk/util/x86emu/yabel/interrupt.c

    r5040 r5185  
    1212 *****************************************************************************/
    1313
     14#include <types.h>
    1415#include "compat/rtas.h"
    1516
     
    1920#include "debug.h"
    2021#include "pmm.h"
     22#include "interrupt.h"
    2123
    2224#include <x86emu/x86emu.h>
  • trunk/util/x86emu/yabel/io.c

    r5135 r5185  
    1818#include "debug.h"
    1919#include <x86emu/x86emu.h>
     20#include "io.h"
    2021
    2122#ifdef CONFIG_PCI_OPTION_ROM_RUN_YABEL
     
    8889
    8990        val = inb(addr);
    90 #ifdef CONFIG_DEBUG
    91         if ((debug_flags & DEBUG_IO) && (addr != 0x40))
    92             printk("inb(0x%04x) = 0x%02x\n", addr, val);
    93 #endif
     91        DEBUG_PRINTF_IO("inb(0x%04x) = 0x%02x\n", addr, val);
    9492
    9593        return val;
     
    10199
    102100        val = inw(addr);
    103 
    104 #ifdef CONFIG_DEBUG
    105         if (debug_flags & DEBUG_IO)
    106                 printk("inw(0x%04x) = 0x%04x\n", addr, val);
    107 #endif
     101        DEBUG_PRINTF_IO("inw(0x%04x) = 0x%04x\n", addr, val);
     102
    108103        return val;
    109104}
     
    114109
    115110        val = inl(addr);
    116 
    117 #ifdef CONFIG_DEBUG
    118         if (debug_flags & DEBUG_IO)
    119                 printk("inl(0x%04x) = 0x%08x\n", addr, val);
    120 #endif
     111        DEBUG_PRINTF_IO("inl(0x%04x) = 0x%08x\n", addr, val);
     112
    121113        return val;
    122114}
     
    124116void my_outb(X86EMU_pioAddr addr, u8 val)
    125117{
    126 #ifdef CONFIG_DEBUG
    127         if ((debug_flags & DEBUG_IO) && (addr != 0x43))
    128                 printk("outb(0x%02x, 0x%04x)\n", val, addr);
    129 #endif
     118        DEBUG_PRINTF_IO("outb(0x%02x, 0x%04x)\n", val, addr);
    130119        outb(val, addr);
    131120}
     
    133122void my_outw(X86EMU_pioAddr addr, u16 val)
    134123{
    135 #ifdef CONFIG_DEBUG
    136         if (debug_flags & DEBUG_IO)
    137                 printk("outw(0x%04x, 0x%04x)\n", val, addr);
    138 #endif
     124        DEBUG_PRINTF_IO("outw(0x%04x, 0x%04x)\n", val, addr);
    139125        outw(val, addr);
    140126}
     
    142128void my_outl(X86EMU_pioAddr addr, u32 val)
    143129{
    144 #ifdef CONFIG_DEBUG
    145         if (debug_flags & DEBUG_IO)
    146                 printk("outl(0x%08x, 0x%04x)\n", val, addr);
    147 #endif
     130        DEBUG_PRINTF_IO("outl(0x%08x, 0x%04x)\n", val, addr);
    148131        outl(val, addr);
    149132}
  • trunk/util/x86emu/yabel/mem.c

    r5135 r5185  
    1717#include "x86emu/x86emu.h"
    1818#include "biosemu.h"
     19#include "mem.h"
    1920#include "compat/time.h"
    2021
    2122// define a check for access to certain (virtual) memory regions (interrupt handlers, BIOS Data Area, ...)
    22 #ifdef DEBUG
     23#if CONFIG_X86EMU_DEBUG
    2324static u8 in_check = 0; // to avoid recursion...
    2425u16 ebda_segment;
     
    2728//TODO: these macros have grown so large, that they should be changed to an inline function,
    2829//just for the sake of readability...
    29 
    30 //declare prototypes of the functions to follow, for use in DEBUG_CHECK_VMEM_ACCESS
    31 u8 my_rdb(u32);
    32 u16 my_rdw(u32);
    33 u32 my_rdl(u32);
    3430
    3531#define DEBUG_CHECK_VMEM_READ(_addr, _rval) \
  • trunk/util/x86emu/yabel/vbe.c

    r5177 r5185  
    155155
    156156// VBE Function 00h
    157 u8
     157static u8
    158158vbe_info(vbe_info_t * info)
    159159{
     
    224224
    225225// VBE Function 01h
    226 u8
     226static u8
    227227vbe_get_mode_info(vbe_mode_info_t * mode_info)
    228228{
     
    265265
    266266// VBE Function 02h
    267 u8
     267static u8
    268268vbe_set_mode(vbe_mode_info_t * mode_info)
    269269{
     
    302302
    303303//VBE Function 08h
    304 u8
     304static u8
    305305vbe_set_palette_format(u8 format)
    306306{
     
    338338
    339339// VBE Function 09h
    340 u8
     340static u8
    341341vbe_set_color(u16 color_number, u32 color_value)
    342342{
     
    380380}
    381381
    382 u8
     382static u8
    383383vbe_get_color(u16 color_number, u32 * color_value)
    384384{
     
    423423
    424424// VBE Function 15h
    425 u8
     425static u8
    426426vbe_get_ddc_info(vbe_ddc_info_t * ddc_info)
    427427{
     
    497497}
    498498
    499 u32
     499static u32
    500500vbe_get_info(void)
    501501{
     
    572572#endif
    573573        if (*((u64 *) ddc_info.edid_block_zero) !=
    574             (u64) 0x00FFFFFFFFFFFF00) {
     574            (u64) 0x00FFFFFFFFFFFF00ULL) {
    575575                // invalid EDID signature... probably no monitor
    576576
     
    600600                DEBUG_PRINTF_VBE("Video Mode 0x%04x available, %s\n",
    601601                                 mode_info.video_mode,
    602                                  (mode_info.attributes & 0x1) ==
     602                                 (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x1) ==
    603603                                 0 ? "not supported" : "supported");
    604604                DEBUG_PRINTF_VBE("\tTTY: %s\n",
    605                                  (mode_info.attributes & 0x4) ==
     605                                 (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x4) ==
    606606                                 0 ? "no" : "yes");
    607607                DEBUG_PRINTF_VBE("\tMode: %s %s\n",
    608                                  (mode_info.attributes & 0x8) ==
     608                                 (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x8) ==
    609609                                 0 ? "monochrome" : "color",
    610                                  (mode_info.attributes & 0x10) ==
     610                                 (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x10) ==
    611611                                 0 ? "text" : "graphics");
    612612                DEBUG_PRINTF_VBE("\tVGA: %s\n",
    613                                  (mode_info.attributes & 0x20) ==
     613                                 (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x20) ==
    614614                                 0 ? "compatible" : "not compatible");
    615615                DEBUG_PRINTF_VBE("\tWindowed Mode: %s\n",
    616                                  (mode_info.attributes & 0x40) ==
     616                                 (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x40) ==
    617617                                 0 ? "yes" : "no");
    618618                DEBUG_PRINTF_VBE("\tFramebuffer: %s\n",
    619                                  (mode_info.attributes & 0x80) ==
     619                                 (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x80) ==
    620620                                 0 ? "no" : "yes");
    621621                DEBUG_PRINTF_VBE("\tResolution: %dx%d\n",
    622                                  mode_info.x_resolution,
    623                                  mode_info.y_resolution);
     622                                 le16_to_cpu(mode_info.vesa.x_resolution),
     623                                 le16_to_cpu(mode_info.vesa.y_resolution));
    624624                DEBUG_PRINTF_VBE("\tChar Size: %dx%d\n",
    625                                  mode_info.x_charsize, mode_info.y_charsize);
     625                                 mode_info.vesa.x_charsize, mode_info.vesa.y_charsize);
    626626                DEBUG_PRINTF_VBE("\tColor Depth: %dbpp\n",
    627                                  mode_info.bits_per_pixel);
     627                                 mode_info.vesa.bits_per_pixel);
    628628                DEBUG_PRINTF_VBE("\tMemory Model: 0x%x\n",
    629                                  mode_info.memory_model);
     629                                 mode_info.vesa.memory_model);
    630630                DEBUG_PRINTF_VBE("\tFramebuffer Offset: %08x\n",
    631                                  mode_info.framebuffer_address);
     631                                 le32_to_cpu(mode_info.vesa.phys_base_ptr));
    632632
    633633                if ((mode_info.vesa.bits_per_pixel == input.color_depth)
     
    648648                    ("Best Video Mode found: 0x%x, %dx%d, %dbpp, framebuffer_address: 0x%x\n",
    649649                     best_mode_info.video_mode,
    650                      best_mode_info.x_resolution,
    651                      best_mode_info.y_resolution,
    652                      best_mode_info.bits_per_pixel,
    653                      best_mode_info.framebuffer_address);
     650                     best_mode_info.vesa.x_resolution,
     651                     best_mode_info.vesa.y_resolution,
     652                     best_mode_info.vesa.bits_per_pixel,
     653                     le32_to_cpu(best_mode_info.vesa.phys_base_ptr));
    654654
    655655                //printf("Mode Info Dump:");
Note: See TracChangeset for help on using the changeset viewer.