Page 1 of 2

ide_initialize problem

Posted: Wed Jul 07, 2010 11:24 am
by Almamu
Hi, im programming AlphaOs, my own os project. Im trying to add IDE support, i have followed the wiki instructions, i have writed ALL the code by hand in a file called ide.c. When i try to use ide_initialize the machine, simply shuts down... any idea what cause this?
Here is the ide code im not sure if it is completed at 100%:

Code: Select all

#include "../include/ide.h"

unsigned char inb (unsigned short _port)
{
    unsigned char rv;
    __asm__ __volatile__ ("inb %1, %0" : "=a" (rv) : "dN" (_port));
    return rv;
}

void outb (unsigned short _port, unsigned char _data)
{
    __asm__ __volatile__ ("outb %1, %0" : : "dN" (_port), "a" (_data));
}
#define insl(port, buffer, count) \
         __asm__ ("cld; rep; insl" :: "D" (buffer), "d" (port), "c" (count))
void sleep(unsigned long ms){
	int msl = 0;
	while(msl != ms)msl++;
	return;
}

unsigned char ide_read(unsigned char channel, unsigned char reg){
	unsigned char result;
	if( reg > 0x07 && reg < 0x0C)
		ide_write(channel, ATA_REG_CONTROL, 0x80 | channels[channel].nIEN);
	if(reg < 0x08)
		result = inb(channels[channel].base + reg - 0x00);
	else if ( reg < 0x0C )
		result = inb(channels[channel].base + reg - 0x06);
	else if ( reg < 0x0E )
		result = inb(channels[channel].ctrl + reg - 0x0A);
	else if ( reg < 0x16 )
		result = inb(channels[channel].bmide + reg - 0x0E);
	if(reg > 0x07 && reg < 0x0C)
		ide_write(channel, ATA_REG_CONTROL, channels[channel].nIEN);
	return result;
}

void ide_write(unsigned char channel, unsigned char reg, unsigned char data){
	if(reg > 0x07 && reg < 0x0C)
		ide_write(channel, ATA_REG_CONTROL, 0x80 | channels[channel].nIEN);
	if ( reg < 0x08 )
		outb(data, channels[channel].base + reg - 0x00);
	else if( reg < 0x0C )
		outb(data, channels[channel].base + reg - 0x06);
	else if ( reg < 0x0E )
		outb(data, channels[channel].ctrl + reg - 0x0A);
	else if ( reg < 0x16 )
		outb(data, channels[channel].bmide + reg - 0x0E);
	if(reg > 0x07 && reg < 0x0C )
		ide_write(channel, ATA_REG_CONTROL, channels[channel].nIEN);
}

void ide_read_buffer(unsigned char channel, unsigned char reg, unsigned int buffer, unsigned int quads){
	if( reg > 0x07 && reg < 0x0C )
		ide_write(channel, ATA_REG_CONTROL, 0x80 | channels[channel].nIEN);
	asm("pushw %es; movw %ds, %ax; movw %ax, %es");
	if( reg < 0x08 )
		insl(channels[channel].base + reg - 0x00, buffer, quads);
	else if( reg < 0x0C )
		insl(channels[channel].base + reg - 0x06, buffer, quads);
	else if( reg < 0x0E )
		insl(channels[channel].ctrl + reg - 0x0A, buffer, quads);
	else if( reg < 0x016 )
		insl(channels[channel].bmide + reg - 0x0E, buffer, quads);
	asm("popw %es;");
	if( reg > 0x07 && reg < 0x0C )
		ide_write(channel, ATA_REG_CONTROL, channels[channel].nIEN);
}

unsigned char ide_polling(unsigned char channel, unsigned int advanced_check){
	//Esperamos 4 nanosegundos para BSY
	int i = 0;
	for( i = 0; i < 4; i++ )
		ide_read(channel, ATA_REG_ALTSTATUS);

	//Esperar a que BSY este limpio
	while(ide_read(channel, ATA_REG_STATUS)& ATA_SR_BSY);
	
	if( advanced_check ){
		unsigned char state = ide_read(channel, ATA_REG_STATUS);
		//Comprobar si hay errores
		if( state & ATA_SR_ERR )
			return 2;//Error!
		if( state & ATA_SR_DF )
			return 1; //Device Fault
		if (( state & ATA_SR_DRQ) == 0 )
			return 3;//DRQ debe tener valor
	}
	return 0;//Ningun error
}

unsigned char ide_print_error(unsigned int drive, unsigned char err){
	if(err == 0)
		return err;

	printf("IDE:");
	if( err == 1 ) { printf("- Device Fault\n	"); err = 19;}
	else if ( err == 2 ){
		unsigned char st = ide_read(ide_devices[drive].Channel, ATA_REG_ERROR);
		if( st & ATA_ER_AMNF ){printf("- No Address Mark found\n		"); err = 7;}
		if( st & ATA_ER_TK0NF ){printf("- No Media or Media Error\n	"); err = 3;}
		if( st & ATA_ER_ABRT ){printf("- Command Aborted\n	"); err = 20;}
		if( st & ATA_ER_MCR ){printf("- No Media or Media Error\n	"); err = 3;}
		if( st & ATA_ER_IDNF ){printf("- ID Mark not Found\n		"); err = 21;}
		if( st & ATA_ER_MC){printf("- No Media or Media Error\n		"); err = 3;}
		if ( st & ATA_ER_UNC){printf("- Uncorrectable Data Error\n	"); err = 22;}
		if ( st & ATA_ER_BBK){printf("- Bad Sectors\n		"); err = 13;}
	}else if( err == 3 ){printf("- Reads Nothing\n		");err = 23;}
	else if( err == 4 ){printf("- Write Protected\n		");err = 8;}
	printf("- [%s %s] %s\n",
	(const char *[]){"Primary", "Secondary"}[ide_devices[drive].Channel],
	(const char *[]){"Master", "Slave"}[ide_devices[drive].Drive],
	ide_devices[drive].Model);
	return err;
}

void ide_initialize(unsigned int BAR0, unsigned int BAR1, unsigned int BAR2, unsigned int BAR3, unsigned int BAR4){
	int j, i, count = 0;
	
	//1- Detecar puertos de E/S donde esta el controlador IDE:
	channels[ATA_PRIMARY  ].base  = (BAR0 & 0xFFFFFFFC) + 0x1F0 * (!BAR0);
	channels[ATA_PRIMARY  ].ctrl  = (BAR1 & 0xFFFFFFFC) + 0x3F4 * (!BAR1);
	channels[ATA_SECONDARY].base  = (BAR2 & 0xFFFFFFFC) + 0x170 * (!BAR2);
	channels[ATA_SECONDARY].ctrl  = (BAR3 & 0xFFFFFFFC) + 0x374 * (!BAR3);
	channels[ATA_PRIMARY  ].bmide = (BAR4 & 0xFFFFFFFC) + 0; // Bus Master IDE
	channels[ATA_SECONDARY].bmide = (BAR4 & 0xFFFFFFFC) + 8; // Bus Master IDE
	ide_write(ATA_PRIMARY, ATA_REG_CONTROL, 2);
	ide_write(ATA_SECONDARY, ATA_REG_CONTROL, 2);
   // 3- Detect ATA-ATAPI Devices:
   for (i = 0; i < 2; i++)
      for (j = 0; j < 2; j++) {
 
         unsigned char err = 0, type = IDE_ATA, status;
         ide_devices[count].Reserved = 0; // Assuming that no drive here.
 
         // (I) Select Drive:
         ide_write(i, ATA_REG_HDDEVSEL, 0xA0 | (j << 4)); // Select Drive.
         sleep(1); // Wait 1ms for drive select to work.
 
         // (II) Send ATA Identify Command:
         ide_write(i, ATA_REG_COMMAND, ATA_CMD_IDENTIFY);
         sleep(1); // This function should be implemented in your OS. which waits for 1 ms.
                   // it is based on System Timer Device Driver.
 
         // (III) Polling:
         if (ide_read(i, ATA_REG_STATUS) == 0) continue; // If Status = 0, No Device.
 
         while(1) {
            status = ide_read(i, ATA_REG_STATUS);
            if ((status & ATA_SR_ERR)) {err = 1; break;} // If Err, Device is not ATA.
            if (!(status & ATA_SR_BSY) && (status & ATA_SR_DRQ)) break; // Everything is right.
         }
 
         // (IV) Probe for ATAPI Devices:
 
         if (err != 0) {
            unsigned char cl = ide_read(i, ATA_REG_LBA1);
            unsigned char ch = ide_read(i, ATA_REG_LBA2);
 
            if (cl == 0x14 && ch ==0xEB)
               type = IDE_ATAPI;
            else if (cl == 0x69 && ch == 0x96)
               type = IDE_ATAPI;
            else
               continue; // Unknown Type (may not be a device).
 
            ide_write(i, ATA_REG_COMMAND, ATA_CMD_IDENTIFY_PACKET);
            sleep(1);
         }
 
         // (V) Read Identification Space of the Device:
         ide_read_buffer(i, ATA_REG_DATA, (unsigned int) ide_buf, 128);
 
         // (VI) Read Device Parameters:
         ide_devices[count].Reserved     = 1;
         ide_devices[count].Type         = type;
         ide_devices[count].Channel      = i;
         ide_devices[count].Drive        = j;
         ide_devices[count].Signature    = ((unsigned short *)(ide_buf + ATA_IDENT_DEVICETYPE));
         ide_devices[count].Capabilities = ((unsigned short *)(ide_buf + ATA_IDENT_CAPABILITIES));
         ide_devices[count].CommandSets  = ((unsigned int *)(ide_buf + ATA_IDENT_COMMANDSETS));
 
         // (VII) Get Size:
         if (ide_devices[count].CommandSets & (1 << 26))
            // Device uses 48-Bit Addressing:
            ide_devices[count].Size   = ((unsigned int *)(ide_buf + ATA_IDENT_MAX_LBA_EXT));
         else
            // Device uses CHS or 28-bit Addressing:
            ide_devices[count].Size   = ((unsigned int *)(ide_buf + ATA_IDENT_MAX_LBA));
 
         // (VIII) String indicates model of device (like Western Digital HDD and SONY DVD-RW...):
	int k = 0;
         for(k = 0; k < 40; k += 2) {
            ide_devices[count].Model[k] = ide_buf[ATA_IDENT_MODEL + k + 1];
            ide_devices[count].Model[k + 1] = ide_buf[ATA_IDENT_MODEL + k];}
         ide_devices[count].Model[40] = 0; // Terminate String.
 
         count++;
      }
 
   // 4- Print Summary:
   for (i = 0; i < 4; i++)
      if (ide_devices[i].Reserved == 1) {
         printf(" Found %s Drive %dGB - %s\n",
            (const char *[]){"ATA", "ATAPI"}[ide_devices[i].Type],         /* Type */
            ide_devices[i].Size / 1024 / 1024 / 2,               /* Size */
            ide_devices[i].Model);
      }
}

And this is ide.h file:

Code: Select all

#ifndef __IDE_H__
#define __IDE_H__

#include "kasm.h"
#include "defs.h"
#include "klib.h"
#include "string.h"
#include "io.h"
#include "keyboard.h"
#include "kernel.h"
#include "cpuid.h"
#include "gralprotection.h"

void ide_write(unsigned char channel, unsigned char reg, unsigned char data);
unsigned char ide_read(unsigned char channel, unsigned char reg);
void ide_read_buffer(unsigned char channel, unsigned char reg, unsigned int buffer, unsigned int quads);
unsigned char ide_polling(unsigned char channel, unsigned int advanced_check);
unsigned char ide_print_error(unsigned int drive, unsigned char err);
void ide_initialize(unsigned int BAR0, unsigned int BAR1, unsigned int BAR2, unsigned int BAR3, unsigned int BAR4);
void sleep(unsigned long ms);

#define ATA_SR_BSY	0x80
#define ATA_SR_DRDY	0x40
#define ATA_SR_DF	0x20
#define ATA_SR_DSC	0x10
#define ATA_SR_DRQ	0x08
#define ATA_SR_CORR	0x04
#define ATA_SR_IDX	0x02
#define ATA_SR_ERR	0x01

#define ATA_ER_BBK	0x80
#define ATA_ER_UNC	0x40
#define ATA_ER_MC	0x20
#define ATA_ER_IDNF	0x10
#define ATA_ER_MCR	0x08
#define ATA_ER_ABRT	0x04
#define ATA_ER_TK0NF	0x02
#define ATA_ER_AMNF	0x01

#define ATA_CMD_READ_PIO	0x20
#define ATA_CMD_READ_PIO_EXT	0x24
#define ATA_CMD_READ_DMA	0xC8
#define ATA_CMD_READ_DMA_EXT	0x25
#define ATA_CMD_WRITE_PIO	0x30
#define ATA_CMD_WRITE_PIO_EXT	0x34
#define ATA_CMD_WRITE_DMA	0xCA
#define ATA_CMD_WRITE_DMA_EXT	0x34
#define ATA_CMD_CACHE_FLUSH	0xE7
#define ATA_CMD_CACHE_FLUSH_EXT	0xEA
#define ATA_CMD_PACKET		0xA0
#define ATA_CMD_IDENTIFY_PACKET	0xA1
#define ATA_CMD_IDENTIFY	0xEC

#define ATAPI_CMD_READ	0xA8
#define ATAPI_CMD_EJECT	0x1B

#define ATA_IDENT_DEVICETYPE	0
#define ATA_IDENT_CYLINDERS	2
#define ATA_IDENT_HEADS		6
#define ATA_IDENT_SECTORS	12
#define ATA_IDENT_SERIAL	20
#define ATA_IDENT_MODEL		54
#define ATA_IDENT_CAPABILITIES	98
#define ATA_IDENT_FIELDVALID	106
#define ATA_IDENT_MAX_LBA	120
#define ATA_IDENT_COMMANDSETS	164
#define ATA_IDENT_MAX_LBA_EXT	200

#define IDE_ATA		0x00
#define IDE_ATAPI	0x01

#define ATA_MASTER	0x00
#define ATA_SLAVE	0x01

#define ATA_REG_DATA		0x00
#define ATA_REG_ERROR		0x01
#define ATA_REG_FEATURES	0x01
#define ATA_REG_SECCOUNT0	0x02
#define ATA_REG_LBA0		0x03
#define ATA_REG_LBA1		0x04
#define ATA_REG_LBA2		0x05
#define ATA_REG_HDDEVSEL	0x06
#define ATA_REG_COMMAND		0x07
#define ATA_REG_STATUS		0x07
#define ATA_REG_SECCOUNT1	0x08
#define ATA_REG_LBA3		0x09
#define ATA_REG_LBA4		0x0A
#define ATA_REG_LBA5		0x0B
#define ATA_REG_CONTROL		0x0C
#define ATA_REG_ALTSTATUS	0x0C
#define ATA_REG_DEVADDRESS	0x0D

#define ATA_PRIMARY	0x00
#define ATA_SECONDARY	0x01

#define ATA_READ	0x00
#define ATA_WRITE	0x01

struct IDEChannelRegisters {
	unsigned short base;
	unsigned short ctrl;
	unsigned short bmide;
	unsigned char nIEN;
} channels[2];

unsigned char ide_buf[2048] = {0};
unsigned static char ide_irq_invoked = 0;
unsigned static char atapi_packet[12] = {0xA8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

struct ide_device {
	unsigned char Reserved;
	unsigned char Channel;
	unsigned char Drive;
	unsigned short Type;
	unsigned short Signature;
	unsigned short Capabilities;
	unsigned int CommandSets;
	unsigned int Size;
	unsigned char Model[41];
} ide_devices[4];

#endif //__IDE_H__
Thanks in advanced...

Re: ide_initialize problem

Posted: Thu Jul 08, 2010 9:57 pm
by bewing
The problem with the code is not obvious. You are going to need to either run your code in an emulator (and look at the log file), or add some debugging so that we can see all the IO ports being accessed, or both.

Re: ide_initialize problem

Posted: Fri Jul 09, 2010 4:20 am
by Almamu
bewing wrote:The problem with the code is not obvious. You are going to need to either run your code in an emulator (and look at the log file), or add some debugging so that we can see all the IO ports being accessed, or both.
Ok. This is the virtualbox debugging log:

Code: Select all

00:00:00.600 VirtualBox 3.2.6 r63112 linux.x86 (Jun 25 2010 14:03:15) release log
00:00:00.600 Log opened 2010-07-09T10:19:13.782472000Z
00:00:00.600 OS Product: Linux
00:00:00.600 OS Release: 2.6.32-23-generic
00:00:00.600 OS Version: #37-Ubuntu SMP Fri Jun 11 07:54:58 UTC 2010
00:00:00.600 DMI Product Name: System Product Name
00:00:00.600 DMI Product Version: System Version
00:00:00.602 Host RAM: 3023MB RAM, available: 2672MB
00:00:00.602 Executable: /usr/lib/virtualbox/VirtualBox
00:00:00.602 Process ID: 7313
00:00:00.602 Package type: LINUX_32BITS_UBUNTU_10_04
00:00:00.683 SUP: Loaded VMMR0.r0 (/usr/lib/virtualbox/VMMR0.r0) at 0xf89f5020 - ModuleInit at 00000000f8a095f0 and ModuleTerm at 00000000f8a095d0
00:00:00.684 SUP: VMMR0EntryEx located at 00000000f8a094b0, VMMR0EntryFast at 00000000f8a08670 and VMMR0EntryInt at 00000000f8a084c0
00:00:00.740 File system of '/home/almamu/.VirtualBox/HardDisks/AlphaOS Test.vdi' is ext4
00:00:00.781 VBoxSharedClipboard mode: Bidirectional
00:00:00.790 ************************* CFGM dump *************************
00:00:00.790 [/] (level 0)
00:00:00.790   CSAMEnabled     <integer> = 0x0000000000000001 (1)
00:00:00.790   EnablePAE       <integer> = 0x0000000000000000 (0)
00:00:00.790   HwVirtExtForced <integer> = 0x0000000000000000 (0)
00:00:00.790   MemBalloonSize  <integer> = 0x0000000000000000 (0)
00:00:00.790   Name            <string>  = "AlphaOS Test" (cb=13)
00:00:00.790   NumCPUs         <integer> = 0x0000000000000001 (1)
00:00:00.790   PATMEnabled     <integer> = 0x0000000000000001 (1)
00:00:00.790   PageFusion      <integer> = 0x0000000000000000 (0)
00:00:00.790   RamHoleSize     <integer> = 0x0000000020000000 (536870912)
00:00:00.790   RamSize         <integer> = 0x0000000004000000 (67108864)
00:00:00.790   RawR0Enabled    <integer> = 0x0000000000000001 (1)
00:00:00.790   RawR3Enabled    <integer> = 0x0000000000000001 (1)
00:00:00.790   SyntheticCpu    <integer> = 0x0000000000000000 (0)
00:00:00.790   TimerMillies    <integer> = 0x000000000000000a (10)
00:00:00.790   UUID            <bytes>   = "45 be 9a eb 59 3a 09 49 b6 1a c9 32 9c 31 03 cd" (cb=16)
00:00:00.790 
00:00:00.790 [/Devices/] (level 1)
00:00:00.790 
00:00:00.790 [/Devices/8237A/] (level 2)
00:00:00.790 
00:00:00.790 [/Devices/8237A/0/] (level 3)
00:00:00.790   Trusted <integer> = 0x0000000000000001 (1)
00:00:00.790 
00:00:00.790 [/Devices/AudioSniffer/] (level 2)
00:00:00.790 
00:00:00.790 [/Devices/AudioSniffer/0/] (level 3)
00:00:00.790 
00:00:00.790 [/Devices/AudioSniffer/0/Config/] (level 4)
00:00:00.790 
00:00:00.791 [/Devices/AudioSniffer/0/LUN#0/] (level 4)
00:00:00.791   Driver <string>  = "MainAudioSniffer" (cb=17)
00:00:00.791 
00:00:00.791 [/Devices/AudioSniffer/0/LUN#0/Config/] (level 5)
00:00:00.791   Object <integer> = 0x000000000982ee38 (159575608)
00:00:00.791 
00:00:00.791 [/Devices/VMMDev/] (level 2)
00:00:00.791 
00:00:00.791 [/Devices/VMMDev/0/] (level 3)
00:00:00.791   PCIDeviceNo   <integer> = 0x0000000000000004 (4)
00:00:00.791   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:00.791   Trusted       <integer> = 0x0000000000000001 (1)
00:00:00.791 
00:00:00.791 [/Devices/VMMDev/0/Config/] (level 4)
00:00:00.792 
00:00:00.792 [/Devices/VMMDev/0/LUN#0/] (level 4)
00:00:00.792   Driver <string>  = "HGCM" (cb=5)
00:00:00.792 
00:00:00.792 [/Devices/VMMDev/0/LUN#0/Config/] (level 5)
00:00:00.792   Object <integer> = 0x00000000098967e0 (159999968)
00:00:00.792 
00:00:00.792 [/Devices/VMMDev/0/LUN#999/] (level 4)
00:00:00.792   Driver <string>  = "MainStatus" (cb=11)
00:00:00.792 
00:00:00.792 [/Devices/VMMDev/0/LUN#999/Config/] (level 5)
00:00:00.792   First   <integer> = 0x0000000000000000 (0)
00:00:00.792   Last    <integer> = 0x0000000000000000 (0)
00:00:00.792   papLeds <integer> = 0x00000000098965bc (159999420)
00:00:00.792 
00:00:00.792 [/Devices/acpi/] (level 2)
00:00:00.792 
00:00:00.792 [/Devices/acpi/0/] (level 3)
00:00:00.792   PCIDeviceNo   <integer> = 0x0000000000000007 (7)
00:00:00.792   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:00.792   Trusted       <integer> = 0x0000000000000001 (1)
00:00:00.792 
00:00:00.792 [/Devices/acpi/0/Config/] (level 4)
00:00:00.792   CpuHotPlug  <integer> = 0x0000000000000000 (0)
00:00:00.792   FdcEnabled  <integer> = 0x0000000000000001 (1)
00:00:00.792   HpetEnabled <integer> = 0x0000000000000000 (0)
00:00:00.792   IOAPIC      <integer> = 0x0000000000000000 (0)
00:00:00.792   NumCPUs     <integer> = 0x0000000000000001 (1)
00:00:00.792   RamHoleSize <integer> = 0x0000000020000000 (536870912)
00:00:00.792   RamSize     <integer> = 0x0000000004000000 (67108864)
00:00:00.792   ShowCpu     <integer> = 0x0000000000000000 (0)
00:00:00.792   ShowRtc     <integer> = 0x0000000000000000 (0)
00:00:00.792   SmcEnabled  <integer> = 0x0000000000000000 (0)
00:00:00.792 
00:00:00.792 [/Devices/acpi/0/LUN#0/] (level 4)
00:00:00.792   Driver <string>  = "ACPIHost" (cb=9)
00:00:00.792 
00:00:00.792 [/Devices/acpi/0/LUN#0/Config/] (level 5)
00:00:00.792 
00:00:00.792 [/Devices/apic/] (level 2)
00:00:00.793 
00:00:00.793 [/Devices/apic/0/] (level 3)
00:00:00.793   Trusted <integer> = 0x0000000000000001 (1)
00:00:00.793 
00:00:00.793 [/Devices/apic/0/Config/] (level 4)
00:00:00.793   IOAPIC  <integer> = 0x0000000000000000 (0)
00:00:00.793   NumCPUs <integer> = 0x0000000000000001 (1)
00:00:00.793 
00:00:00.793 [/Devices/e1000/] (level 2)
00:00:00.795 
00:00:00.795 [/Devices/i82078/] (level 2)
00:00:00.795 
00:00:00.795 [/Devices/i82078/0/] (level 3)
00:00:00.795   Trusted <integer> = 0x0000000000000001 (1)
00:00:00.795 
00:00:00.795 [/Devices/i82078/0/Config/] (level 4)
00:00:00.795   DMA       <integer> = 0x0000000000000002 (2)
00:00:00.795   IOBase    <integer> = 0x00000000000003f0 (1008)
00:00:00.795   IRQ       <integer> = 0x0000000000000006 (6)
00:00:00.795   MemMapped <integer> = 0x0000000000000000 (0)
00:00:00.795 
00:00:00.795 [/Devices/i82078/0/LUN#0/] (level 4)
00:00:00.795   Driver <string>  = "Block" (cb=6)
00:00:00.795 
00:00:00.796 [/Devices/i82078/0/LUN#0/AttachedDriver/] (level 5)
00:00:00.796   Driver <string>  = "VD" (cb=3)
00:00:00.796 
00:00:00.796 [/Devices/i82078/0/LUN#0/AttachedDriver/Config/] (level 6)
00:00:00.796   Format <string>  = "RAW" (cb=4)
00:00:00.796   Path   <string>  = "/home/almamu/Descargas/grub.img" (cb=32)
00:00:00.796 
00:00:00.796 [/Devices/i82078/0/LUN#0/Config/] (level 5)
00:00:00.796   Mountable <integer> = 0x0000000000000001 (1)
00:00:00.796   Type      <string>  = "Floppy 1.44" (cb=12)
00:00:00.796 
00:00:00.796 [/Devices/i82078/0/LUN#999/] (level 4)
00:00:00.796   Driver <string>  = "MainStatus" (cb=11)
00:00:00.796 
00:00:00.796 [/Devices/i82078/0/LUN#999/Config/] (level 5)
00:00:00.796   First   <integer> = 0x0000000000000000 (0)
00:00:00.796   Last    <integer> = 0x0000000000000000 (0)
00:00:00.796   papLeds <integer> = 0x00000000098964b0 (159999152)
00:00:00.796 
00:00:00.796 [/Devices/i8254/] (level 2)
00:00:00.796 
00:00:00.796 [/Devices/i8254/0/] (level 3)
00:00:00.796 
00:00:00.796 [/Devices/i8254/0/Config/] (level 4)
00:00:00.796 
00:00:00.796 [/Devices/i8259/] (level 2)
00:00:00.796 
00:00:00.796 [/Devices/i8259/0/] (level 3)
00:00:00.796   Trusted <integer> = 0x0000000000000001 (1)
00:00:00.796 
00:00:00.796 [/Devices/i8259/0/Config/] (level 4)
00:00:00.796 
00:00:00.796 [/Devices/ichac97/] (level 2)
00:00:00.796 
00:00:00.797 [/Devices/ichac97/0/] (level 3)
00:00:00.797   PCIDeviceNo   <integer> = 0x0000000000000005 (5)
00:00:00.797   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:00.797   Trusted       <integer> = 0x0000000000000001 (1)
00:00:00.797 
00:00:00.797 [/Devices/ichac97/0/Config/] (level 4)
00:00:00.797 
00:00:00.797 [/Devices/ichac97/0/LUN#0/] (level 4)
00:00:00.797   Driver <string>  = "AUDIO" (cb=6)
00:00:00.797 
00:00:00.797 [/Devices/ichac97/0/LUN#0/Config/] (level 5)
00:00:00.797   AudioDriver <string>  = "pulse" (cb=6)
00:00:00.797   StreamName  <string>  = "AlphaOS Test" (cb=13)
00:00:00.797 
00:00:00.797 [/Devices/mc146818/] (level 2)
00:00:00.797 
00:00:00.797 [/Devices/mc146818/0/] (level 3)
00:00:00.797 
00:00:00.797 [/Devices/mc146818/0/Config/] (level 4)
00:00:00.797   UseUTC <integer> = 0x0000000000000000 (0)
00:00:00.797 
00:00:00.797 [/Devices/parallel/] (level 2)
00:00:00.797 
00:00:00.797 [/Devices/pcarch/] (level 2)
00:00:00.797 
00:00:00.797 [/Devices/pcarch/0/] (level 3)
00:00:00.797   Trusted <integer> = 0x0000000000000001 (1)
00:00:00.798 
00:00:00.798 [/Devices/pcarch/0/Config/] (level 4)
00:00:00.798 
00:00:00.798 [/Devices/pcbios/] (level 2)
00:00:00.798 
00:00:00.798 [/Devices/pcbios/0/] (level 3)
00:00:00.798   Trusted <integer> = 0x0000000000000001 (1)
00:00:00.798 
00:00:00.798 [/Devices/pcbios/0/Config/] (level 4)
00:00:00.798   BootDevice0    <string>  = "FLOPPY" (cb=7)
00:00:00.798   BootDevice1    <string>  = "DVD" (cb=4)
00:00:00.798   BootDevice2    <string>  = "IDE" (cb=4)
00:00:00.798   BootDevice3    <string>  = "NONE" (cb=5)
00:00:00.798   FloppyDevice   <string>  = "i82078" (cb=7)
00:00:00.798   HardDiskDevice <string>  = "piix3ide" (cb=9)
00:00:00.798   IOAPIC         <integer> = 0x0000000000000000 (0)
00:00:00.798   NumCPUs        <integer> = 0x0000000000000001 (1)
00:00:00.798   PXEDebug       <integer> = 0x0000000000000000 (0)
00:00:00.798   RamHoleSize    <integer> = 0x0000000020000000 (536870912)
00:00:00.798   RamSize        <integer> = 0x0000000004000000 (67108864)
00:00:00.798   UUID           <bytes>   = "45 be 9a eb 59 3a 09 49 b6 1a c9 32 9c 31 03 cd" (cb=16)
00:00:00.798 
00:00:00.798 [/Devices/pcbios/0/Config/NetBoot/] (level 5)
00:00:00.798 
00:00:00.798 [/Devices/pcbios/0/Config/NetBoot/0/] (level 6)
00:00:00.798   NIC           <integer> = 0x0000000000000000 (0)
00:00:00.798   PCIDeviceNo   <integer> = 0x0000000000000003 (3)
00:00:00.798   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:00.798 
00:00:00.798 [/Devices/pci/] (level 2)
00:00:00.798 
00:00:00.798 [/Devices/pci/0/] (level 3)
00:00:00.798   Trusted <integer> = 0x0000000000000001 (1)
00:00:00.798 
00:00:00.799 [/Devices/pci/0/Config/] (level 4)
00:00:00.799   IOAPIC <integer> = 0x0000000000000000 (0)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/] (level 2)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/] (level 3)
00:00:00.799   Trusted <integer> = 0x0000000000000001 (1)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/Config/] (level 4)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/LUN#0/] (level 4)
00:00:00.799   Driver <string>  = "KeyboardQueue" (cb=14)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/LUN#0/AttachedDriver/] (level 5)
00:00:00.799   Driver <string>  = "MainKeyboard" (cb=13)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/LUN#0/AttachedDriver/Config/] (level 6)
00:00:00.799   Object <integer> = 0x00000000098968d0 (160000208)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/LUN#0/Config/] (level 5)
00:00:00.799   QueueSize <integer> = 0x0000000000000040 (64)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/LUN#1/] (level 4)
00:00:00.799   Driver <string>  = "MouseQueue" (cb=11)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/LUN#1/AttachedDriver/] (level 5)
00:00:00.799   Driver <string>  = "MainMouse" (cb=10)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/LUN#1/AttachedDriver/Config/] (level 6)
00:00:00.799   Object <integer> = 0x0000000009896978 (160000376)
00:00:00.799 
00:00:00.799 [/Devices/pckbd/0/LUN#1/Config/] (level 5)
00:00:00.800   QueueSize <integer> = 0x0000000000000080 (128)
00:00:00.800 
00:00:00.800 [/Devices/pcnet/] (level 2)
00:00:00.800 
00:00:00.800 [/Devices/pcnet/0/] (level 3)
00:00:00.800   PCIDeviceNo   <integer> = 0x0000000000000003 (3)
00:00:00.800   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:00.800   Trusted       <integer> = 0x0000000000000001 (1)
00:00:00.800 
00:00:00.800 [/Devices/pcnet/0/Config/] (level 4)
00:00:00.800   Am79C973       <integer> = 0x0000000000000001 (1)
00:00:00.800   CableConnected <integer> = 0x0000000000000001 (1)
00:00:00.800   LineSpeed      <integer> = 0x0000000000000000 (0)
00:00:00.800   MAC            <bytes>   = "08 00 27 59 3e ec" (cb=6)
00:00:00.800 
00:00:00.800 [/Devices/pcnet/0/LUN#0/] (level 4)
00:00:00.800   Driver <string>  = "NAT" (cb=4)
00:00:00.800 
00:00:00.800 [/Devices/pcnet/0/LUN#0/Config/] (level 5)
00:00:00.800   AliasMode       <integer> = 0x0000000000000000 (0)
00:00:00.800   BootFile        <string>  = "AlphaOS Test.pxe" (cb=17)
00:00:00.800   DNSProxy        <integer> = 0x0000000000000000 (0)
00:00:00.800   Network         <string>  = "10.0.2.0/24" (cb=12)
00:00:00.800   PassDomain      <integer> = 0x0000000000000001 (1)
00:00:00.800   TFTPPrefix      <string>  = "/home/almamu/.VirtualBox/TFTP" (cb=30)
00:00:00.800   UseHostResolver <integer> = 0x0000000000000000 (0)
00:00:00.800 
00:00:00.800 [/Devices/pcnet/0/LUN#999/] (level 4)
00:00:00.800   Driver <string>  = "MainStatus" (cb=11)
00:00:00.800 
00:00:00.800 [/Devices/pcnet/0/LUN#999/Config/] (level 5)
00:00:00.800   papLeds <integer> = 0x000000000989659c (159999388)
00:00:00.800 
00:00:00.800 [/Devices/piix3ide/] (level 2)
00:00:00.800 
00:00:00.800 [/Devices/piix3ide/0/] (level 3)
00:00:00.801   PCIDeviceNo   <integer> = 0x0000000000000001 (1)
00:00:00.801   PCIFunctionNo <integer> = 0x0000000000000001 (1)
00:00:00.801   Trusted       <integer> = 0x0000000000000001 (1)
00:00:00.801 
00:00:00.801 [/Devices/piix3ide/0/Config/] (level 4)
00:00:00.801   Type <string>  = "PIIX4" (cb=6)
00:00:00.801 
00:00:00.801 [/Devices/piix3ide/0/LUN#0/] (level 4)
00:00:00.801   Driver <string>  = "Block" (cb=6)
00:00:00.801 
00:00:00.801 [/Devices/piix3ide/0/LUN#0/AttachedDriver/] (level 5)
00:00:00.801   Driver <string>  = "VD" (cb=3)
00:00:00.801 
00:00:00.801 [/Devices/piix3ide/0/LUN#0/AttachedDriver/Config/] (level 6)
00:00:00.801   Format <string>  = "VDI" (cb=4)
00:00:00.802   Path   <string>  = "/home/almamu/.VirtualBox/HardDisks/AlphaOS Test.vdi" (cb=52)
00:00:00.802 
00:00:00.802 [/Devices/piix3ide/0/LUN#0/Config/] (level 5)
00:00:00.802   Mountable <integer> = 0x0000000000000000 (0)
00:00:00.802   Type      <string>  = "HardDisk" (cb=9)
00:00:00.802 
00:00:00.802 [/Devices/piix3ide/0/LUN#999/] (level 4)
00:00:00.802   Driver <string>  = "MainStatus" (cb=11)
00:00:00.802 
00:00:00.802 [/Devices/piix3ide/0/LUN#999/Config/] (level 5)
00:00:00.802   First   <integer> = 0x0000000000000000 (0)
00:00:00.802   Last    <integer> = 0x0000000000000003 (3)
00:00:00.802   papLeds <integer> = 0x00000000098964b4 (159999156)
00:00:00.802 
00:00:00.802 [/Devices/serial/] (level 2)
00:00:00.802 
00:00:00.802 [/Devices/usb-ehci/] (level 2)
00:00:00.802 
00:00:00.802 [/Devices/usb-ehci/0/] (level 3)
00:00:00.802   PCIDeviceNo   <integer> = 0x000000000000000b (11)
00:00:00.802   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:00.802   Trusted       <integer> = 0x0000000000000001 (1)
00:00:00.802 
00:00:00.802 [/Devices/usb-ehci/0/Config/] (level 4)
00:00:00.802 
00:00:00.802 [/Devices/usb-ehci/0/LUN#0/] (level 4)
00:00:00.802   Driver <string>  = "VUSBRootHub" (cb=12)
00:00:00.802 
00:00:00.802 [/Devices/usb-ehci/0/LUN#0/Config/] (level 5)
00:00:00.802 
00:00:00.802 [/Devices/usb-ehci/0/LUN#999/] (level 4)
00:00:00.802   Driver <string>  = "MainStatus" (cb=11)
00:00:00.802 
00:00:00.802 [/Devices/usb-ehci/0/LUN#999/Config/] (level 5)
00:00:00.803   First   <integer> = 0x0000000000000000 (0)
00:00:00.803   Last    <integer> = 0x0000000000000000 (0)
00:00:00.803   papLeds <integer> = 0x00000000098965c4 (159999428)
00:00:00.803 
00:00:00.803 [/Devices/usb-ohci/] (level 2)
00:00:00.803 
00:00:00.803 [/Devices/usb-ohci/0/] (level 3)
00:00:00.803   PCIDeviceNo   <integer> = 0x0000000000000006 (6)
00:00:00.803   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:00.803   Trusted       <integer> = 0x0000000000000001 (1)
00:00:00.803 
00:00:00.803 [/Devices/usb-ohci/0/Config/] (level 4)
00:00:00.804 
00:00:00.804 [/Devices/usb-ohci/0/LUN#0/] (level 4)
00:00:00.804   Driver <string>  = "VUSBRootHub" (cb=12)
00:00:00.804 
00:00:00.804 [/Devices/usb-ohci/0/LUN#0/Config/] (level 5)
00:00:00.804 
00:00:00.804 [/Devices/usb-ohci/0/LUN#999/] (level 4)
00:00:00.804   Driver <string>  = "MainStatus" (cb=11)
00:00:00.804 
00:00:00.804 [/Devices/usb-ohci/0/LUN#999/Config/] (level 5)
00:00:00.804   First   <integer> = 0x0000000000000000 (0)
00:00:00.804   Last    <integer> = 0x0000000000000000 (0)
00:00:00.804   papLeds <integer> = 0x00000000098965c0 (159999424)
00:00:00.804 
00:00:00.804 [/Devices/vga/] (level 2)
00:00:00.804 
00:00:00.804 [/Devices/vga/0/] (level 3)
00:00:00.804   PCIDeviceNo   <integer> = 0x0000000000000002 (2)
00:00:00.804   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:00.804   Trusted       <integer> = 0x0000000000000001 (1)
00:00:00.804 
00:00:00.804 [/Devices/vga/0/Config/] (level 4)
00:00:00.804   CustomVideoModes <integer> = 0x0000000000000000 (0)
00:00:00.804   FadeIn           <integer> = 0x0000000000000001 (1)
00:00:00.804   FadeOut          <integer> = 0x0000000000000001 (1)
00:00:00.804   HeightReduction  <integer> = 0x0000000000000000 (0)
00:00:00.804   LogoFile         <string>  = "" (cb=1)
00:00:00.804   LogoTime         <integer> = 0x0000000000000000 (0)
00:00:00.804   MonitorCount     <integer> = 0x0000000000000001 (1)
00:00:00.804   ShowBootMenu     <integer> = 0x0000000000000002 (2)
00:00:00.804   VRamSize         <integer> = 0x0000000000500000 (5242880)
00:00:00.804 
00:00:00.804 [/Devices/vga/0/LUN#0/] (level 4)
00:00:00.804   Driver <string>  = "MainDisplay" (cb=12)
00:00:00.805 
00:00:00.805 [/Devices/vga/0/LUN#0/Config/] (level 5)
00:00:00.805   Object <integer> = 0x0000000009896a30 (160000560)
00:00:00.805 
00:00:00.805 [/Devices/virtio-net/] (level 2)
00:00:00.805 
00:00:00.805 [/HWVirtExt/] (level 1)
00:00:00.805   64bitEnabled       <integer> = 0x0000000000000000 (0)
00:00:00.805   EnableLargePages   <integer> = 0x0000000000000000 (0)
00:00:00.805   EnableNestedPaging <integer> = 0x0000000000000001 (1)
00:00:00.805   EnableVPID         <integer> = 0x0000000000000001 (1)
00:00:00.805   Enabled            <integer> = 0x0000000000000001 (1)
00:00:00.805   Exclusive          <integer> = 0x0000000000000001 (1)
00:00:00.805 
00:00:00.805 [/PDM/] (level 1)
00:00:00.805 
00:00:00.805 [/PDM/AsyncCompletion/] (level 2)
00:00:00.805 
00:00:00.805 [/PDM/AsyncCompletion/File/] (level 3)
00:00:00.805   CacheEnabled <integer> = 0x0000000000000001 (1)
00:00:00.805   CacheSize    <integer> = 0x0000000000500000 (5242880)
00:00:00.805 
00:00:00.805 [/PDM/Drivers/] (level 2)
00:00:00.805 
00:00:00.805 [/PDM/Drivers/VBoxC/] (level 3)
00:00:00.805   Path <string>  = "/usr/lib/virtualbox/components/VBoxC" (cb=37)
00:00:00.805 
00:00:00.805 [/TM/] (level 1)
00:00:00.805   UTCOffset <integer> = 0x0000000000000000 (0)
00:00:00.805 
00:00:00.805 [/USB/] (level 1)
00:00:00.805 
00:00:00.805 [/USB/USBProxy/] (level 2)
00:00:00.805 
00:00:00.805 [/USB/USBProxy/GlobalConfig/] (level 3)
00:00:00.805 
00:00:00.805 ********************* End of CFGM dump **********************
00:00:00.805 MM: cbHyperHeap=0x140000 (1310720)
00:00:00.807 Logical host processors: 2, processor active mask: 0000000000000003
00:00:00.807 ************************* CPUID dump ************************
00:00:00.807          RAW Standard CPUIDs
00:00:00.807      Function  eax      ebx      ecx      edx
00:00:00.807 Gst: 00000000  00000005 756e6547 6c65746e 49656e69
00:00:00.807 Hst:           00000006 756e6547 6c65746e 49656e69
00:00:00.807 Gst: 00000001  00000f65 00000800 00000009 078bf1bf
00:00:00.807 Hst:           00000f65 01020800 0000e49d bfebfbff
00:00:00.807 Gst: 00000002  605b5101 00000000 00000000 007d7040
00:00:00.807 Hst:           605b5101 00000000 00000000 007d7040
00:00:00.807 Gst: 00000003  00000000 00000000 00000000 00000000
00:00:00.807 Hst:           00000000 00000000 00000000 00000000
00:00:00.807 Gst: 00000004  00000000 00000000 00000000 00000000
00:00:00.807 Hst:           04000121 01c0003f 0000001f 00000000
00:00:00.807 Gst: 00000005  00000040 00000040 00000000 00000000
00:00:00.807 Hst:           00000040 00000040 00000000 00000000
00:00:00.807 Name:                            GenuineIntel
00:00:00.807 Supports:                        0-5
00:00:00.807 Family:                          15  	Extended: 0 	Effective: 15
00:00:00.807 Model:                           6  	Extended: 0 	Effective: 6
00:00:00.807 Stepping:                        5
00:00:00.807 Type:                            0 (primary)
00:00:00.807 APIC ID:                         0x00
00:00:00.807 Logical CPUs:                    0
00:00:00.807 CLFLUSH Size:                    8
00:00:00.807 Brand ID:                        0x00
00:00:00.807 Mnemonic - Description                 = guest (host)
00:00:00.807 FPU - x87 FPU on Chip                  = 1 (1)
00:00:00.807 VME - Virtual 8086 Mode Enhancements   = 1 (1)
00:00:00.807 DE - Debugging extensions              = 1 (1)
00:00:00.807 PSE - Page Size Extension              = 1 (1)
00:00:00.807 TSC - Time Stamp Counter               = 1 (1)
00:00:00.807 MSR - Model Specific Registers         = 1 (1)
00:00:00.807 PAE - Physical Address Extension       = 0 (1)
00:00:00.807 MCE - Machine Check Exception          = 1 (1)
00:00:00.807 CX8 - CMPXCHG8B instruction            = 1 (1)
00:00:00.807 APIC - APIC On-Chip                    = 0 (1)
00:00:00.807 Reserved                               = 0 (0)
00:00:00.807 SEP - SYSENTER and SYSEXIT             = 0 (1)
00:00:00.807 MTRR - Memory Type Range Registers     = 1 (1)
00:00:00.807 PGE - PTE Global Bit                   = 1 (1)
00:00:00.807 MCA - Machine Check Architecture       = 1 (1)
00:00:00.807 CMOV - Conditional Move Instructions   = 1 (1)
00:00:00.807 PAT - Page Attribute Table             = 1 (1)
00:00:00.807 PSE-36 - 36-bit Page Size Extention    = 1 (1)
00:00:00.807 PSN - Processor Serial Number          = 0 (0)
00:00:00.807 CLFSH - CLFLUSH Instruction.           = 1 (1)
00:00:00.807 Reserved                               = 0 (0)
00:00:00.807 DS - Debug Store                       = 0 (1)
00:00:00.807 ACPI - Thermal Mon. & Soft. Clock Ctrl.= 0 (1)
00:00:00.807 MMX - Intel MMX Technology             = 1 (1)
00:00:00.807 FXSR - FXSAVE and FXRSTOR Instructions = 1 (1)
00:00:00.807 SSE - SSE Support                      = 1 (1)
00:00:00.807 SSE2 - SSE2 Support                    = 1 (1)
00:00:00.807 SS - Self Snoop                        = 0 (1)
00:00:00.807 HTT - Hyper-Threading Technolog        = 0 (1)
00:00:00.807 TM - Thermal Monitor                   = 0 (1)
00:00:00.807 30 - Reserved                          = 0 (0)
00:00:00.807 PBE - Pending Break Enable             = 0 (1)
00:00:00.807 Supports SSE3 or not                   = 1 (1)
00:00:00.807 Reserved                               = 0 (0)
00:00:00.807 DS Area 64-bit layout                  = 0 (1)
00:00:00.807 Supports MONITOR/MWAIT                 = 1 (1)
00:00:00.807 CPL-DS - CPL Qualified Debug Store     = 0 (1)
00:00:00.807 VMX - Virtual Machine Technology       = 0 (0)
00:00:00.807 SMX - Safer Mode Extensions            = 0 (0)
00:00:00.807 Enhanced SpeedStep Technology          = 0 (1)
00:00:00.807 Terminal Monitor 2                     = 0 (0)
00:00:00.807 Supports Supplemental SSE3 or not      = 0 (0)
00:00:00.807 L1 Context ID                          = 0 (1)
00:00:00.807 FMA                                    = 0 (0)
00:00:00.807 Reserved                               = 0 (0)
00:00:00.807 CMPXCHG16B                             = 0 (1)
00:00:00.807 xTPR Update Control                    = 0 (1)
00:00:00.807 Perf/Debug Capability MSR              = 0 (1)
00:00:00.807 Reserved                               = 0x0 (0x0)
00:00:00.807 Direct Cache Access                    = 0 (0)
00:00:00.807 Supports SSE4_1 or not                 = 0 (0)
00:00:00.807 Supports SSE4_2 or not                 = 0 (0)
00:00:00.807 Supports the x2APIC extensions         = 0 (0)
00:00:00.807 Supports MOVBE                         = 0 (0)
00:00:00.807 Supports POPCNT                        = 0 (0)
00:00:00.807 Reserved                               = 0x0 (0x0)
00:00:00.808 Supports XSAVE                         = 0 (0)
00:00:00.808 Supports OSXSAVE                       = 0 (0)
00:00:00.808 Reserved                               = 0x0 (0x0)
00:00:00.808 
00:00:00.808          RAW Extended CPUIDs
00:00:00.808      Function  eax      ebx      ecx      edx
00:00:00.808 Gst: 80000000  80000008 00000000 00000000 00000000
00:00:00.808 Hst:           80000008 00000000 00000000 00000000
00:00:00.808 Gst: 80000001  00000000 00000000 00000000 00000000
00:00:00.808 Hst:           00000000 00000000 00000001 20100000
00:00:00.808 Gst: 80000002  20202020 20202020 20202020 6e492020
00:00:00.808 Hst:           20202020 20202020 20202020 6e492020
00:00:00.808 Gst: 80000003  286c6574 50202952 69746e65 52286d75
00:00:00.808 Hst:           286c6574 50202952 69746e65 52286d75
00:00:00.808 Gst: 80000004  20442029 20555043 30302e33 007a4847
00:00:00.808 Hst:           20442029 20555043 30302e33 007a4847
00:00:00.808 Gst: 80000005  00000000 00000000 00000000 00000000
00:00:00.808 Hst:           00000000 00000000 00000000 00000000
00:00:00.808 Gst: 80000006  00000000 00000000 08006040 00000000
00:00:00.808 Hst:           00000000 00000000 08006040 00000000
00:00:00.808 Gst: 80000007  00000000 00000000 00000000 00000000
00:00:00.808 Hst:           00000000 00000000 00000000 00000000
00:00:00.808 Gst: 80000008  00003024 00000000 00000000 00000000
00:00:00.808 Hst:           00003024 00000000 00000000 00000000
00:00:00.808 Gst: 80000009  00000000 00000000 00000000 00000000*
00:00:00.808 Hst:           00000000 00000000 00000000 00000000
00:00:00.808 Ext Name:                        
00:00:00.808 Ext Supports:                    0x80000000-0x80000008
00:00:00.808 Family:                          0  	Extended: 0 	Effective: 0
00:00:00.808 Model:                           0  	Extended: 0 	Effective: 0
00:00:00.808 Stepping:                        0
00:00:00.808 Brand ID:                        0x000
00:00:00.808 Mnemonic - Description                 = guest (host)
00:00:00.808 FPU - x87 FPU on Chip                  = 0 (0)
00:00:00.808 VME - Virtual 8086 Mode Enhancements   = 0 (0)
00:00:00.808 DE - Debugging extensions              = 0 (0)
00:00:00.808 PSE - Page Size Extension              = 0 (0)
00:00:00.808 TSC - Time Stamp Counter               = 0 (0)
00:00:00.808 MSR - K86 Model Specific Registers     = 0 (0)
00:00:00.808 PAE - Physical Address Extension       = 0 (0)
00:00:00.808 MCE - Machine Check Exception          = 0 (0)
00:00:00.808 CX8 - CMPXCHG8B instruction            = 0 (0)
00:00:00.808 APIC - APIC On-Chip                    = 0 (0)
00:00:00.808 10 - Reserved                          = 0 (0)
00:00:00.808 SEP - SYSCALL and SYSRET               = 0 (0)
00:00:00.808 MTRR - Memory Type Range Registers     = 0 (0)
00:00:00.808 PGE - PTE Global Bit                   = 0 (0)
00:00:00.808 MCA - Machine Check Architecture       = 0 (0)
00:00:00.808 CMOV - Conditional Move Instructions   = 0 (0)
00:00:00.808 PAT - Page Attribute Table             = 0 (0)
00:00:00.808 PSE-36 - 36-bit Page Size Extention    = 0 (0)
00:00:00.808 18 - Reserved                          = 0 (0)
00:00:00.808 19 - Reserved                          = 0 (0)
00:00:00.808 NX - No-Execute Page Protection        = 0 (1)
00:00:00.808 DS - Debug Store                       = 0 (0)
00:00:00.808 AXMMX - AMD Extensions to MMX Instr.   = 0 (0)
00:00:00.808 MMX - Intel MMX Technology             = 0 (0)
00:00:00.808 FXSR - FXSAVE and FXRSTOR Instructions = 0 (0)
00:00:00.808 25 - AMD fast FXSAVE and FXRSTOR Instr.= 0 (0)
00:00:00.808 26 - 1 GB large page support           = 0 (0)
00:00:00.808 27 - RDTSCP instruction                = 0 (0)
00:00:00.808 28 - Reserved                          = 0 (0)
00:00:00.808 29 - AMD Long Mode                     = 0 (1)
00:00:00.808 30 - AMD Extensions to 3DNow           = 0 (0)
00:00:00.808 31 - AMD 3DNow                         = 0 (0)
00:00:00.808 LahfSahf - LAHF/SAHF in 64-bit mode    = 0 (1)
00:00:00.808 CmpLegacy - Core MP legacy mode (depr) = 0 (0)
00:00:00.808 SVM - AMD VM Extensions                = 0 (0)
00:00:00.808 APIC registers starting at 0x400       = 0 (0)
00:00:00.808 AltMovCR8 - LOCK MOV CR0 means MOV CR8 = 0 (0)
00:00:00.808 Advanced bit manipulation              = 0 (0)
00:00:00.808 SSE4A instruction support              = 0 (0)
00:00:00.808 Misaligned SSE mode                    = 0 (0)
00:00:00.808 PREFETCH and PREFETCHW instruction     = 0 (0)
00:00:00.808 OS visible workaround                  = 0 (0)
00:00:00.808 Instruction based sampling             = 0 (0)
00:00:00.808 SSE5 support                           = 0 (0)
00:00:00.808 SKINIT, STGI, and DEV support          = 0 (0)
00:00:00.808 Watchdog timer support.                = 0 (0)
00:00:00.808 31:14 - Reserved                       = 0x0 (0x0)
00:00:00.808 Full Name:                                     Intel(R) Pentium(R) D CPU 3.00GHz
00:00:00.808 TLB 2/4M Instr/Uni:              res0     0 entries
00:00:00.808 TLB 2/4M Data:                   res0     0 entries
00:00:00.808 TLB 4K Instr/Uni:                res0     0 entries
00:00:00.808 TLB 4K Data:                     res0     0 entries
00:00:00.808 L1 Instr Cache Line Size:        0 bytes
00:00:00.808 L1 Instr Cache Lines Per Tag:    0
00:00:00.808 L1 Instr Cache Associativity:    res0  
00:00:00.808 L1 Instr Cache Size:             0 KB
00:00:00.808 L1 Data Cache Line Size:         0 bytes
00:00:00.808 L1 Data Cache Lines Per Tag:     0
00:00:00.808 L1 Data Cache Associativity:     res0  
00:00:00.808 L1 Data Cache Size:              0 KB
00:00:00.808 L2 TLB 2/4M Instr/Uni:           off       0 entries
00:00:00.808 L2 TLB 2/4M Data:                off       0 entries
00:00:00.808 L2 TLB 4K Instr/Uni:             off       0 entries
00:00:00.808 L2 TLB 4K Data:                  off       0 entries
00:00:00.808 L2 Cache Line Size:              0 bytes
00:00:00.808 L2 Cache Lines Per Tag:          0
00:00:00.808 L2 Cache Associativity:          off   
00:00:00.808 L2 Cache Size:                   0 KB
00:00:00.808 APM Features:                   
00:00:00.808 Physical Address Width:          36 bits
00:00:00.808 Virtual Address Width:           48 bits
00:00:00.808 Guest Physical Address Width:    0 bits
00:00:00.808 Physical Core Count:             0
00:00:00.808 
00:00:00.808          RAW Centaur CPUIDs
00:00:00.808      Function  eax      ebx      ecx      edx
00:00:00.808 Gst: c0000000  00000000 00000000 00000000 00000000
00:00:00.808 Hst:           00000000 00000000 00000000 00000000
00:00:00.809 Gst: c0000001  00000000 00000000 00000000 00000000*
00:00:00.809 Hst:           00000000 00000000 00000000 00000000
00:00:00.809 Gst: c0000002  00000000 00000000 00000000 00000000*
00:00:00.809 Hst:           00000000 00000000 00000000 00000000
00:00:00.809 Gst: c0000003  00000000 00000000 00000000 00000000*
00:00:00.809 Hst:           00000000 00000000 00000000 00000000
00:00:00.809 Centaur Supports:                0xc0000000-0x00000000
00:00:00.809 
00:00:00.809 ******************** End of CPUID dump **********************
00:00:00.811 REM: VBoxREM32
00:00:00.812 TM: GIP - u32Mode=1 (SyncTSC) u32UpdateHz=83
00:00:00.845 TM: cTSCTicksPerSecond=0x76b979a1 (1 991 866 785) fTSCVirtualized=true  fTSCUseRealTSC=false
00:00:00.845 TM: fMaybeUseOffsettedHostTSC=true  TSCTiedToExecution=false TSCNotTiedToHalt=false
00:00:00.845 CoreCode: R3=00b84000 R0=f8158000 RC=a0225000 Phys=000000003499a000 cb=0x2000
00:00:00.851 AIOMgr: Default manager type is "Async"
00:00:00.851 AIOMgr: Default file backend is "NonBuffered"
00:00:00.851 AIOMgr: Cache successfully initialised. Cache size is 5242880 bytes
00:00:00.851 AIOMgr: Cache commit interval is 10000 ms
00:00:00.851 AIOMgr: Cache commit threshold is 2621440 bytes
00:00:00.851 AIOMgr: I/O bandwidth not limited
00:00:00.857 [SMP] BIOS with 1 CPUs
00:00:00.884 SUP: Loaded VBoxDDR0.r0 (/usr/lib/virtualbox/VBoxDDR0.r0) at 0xf8b9e020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
00:00:00.888 SUP: Loaded VBoxDD2R0.r0 (/usr/lib/virtualbox/VBoxDD2R0.r0) at 0xf8165020 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000
00:00:00.888 Activating Local APIC
00:00:00.888 CPUMSetGuestCpuIdFeature: Enabled APIC
00:00:00.888 CPUMSetGuestCpuIdFeature: Disabled x2APIC
00:00:00.889 PIT: mode=3 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:00.895 Shared Folders service loaded.
00:00:00.901 DrvBlock: Flushes will be ignored
00:00:00.901 DrvBlock: Async flushes will be passed to the disk
00:00:00.901 VDInit finished
00:00:00.902 DrvBlock: Flushes will be ignored
00:00:00.902 DrvBlock: Async flushes will be passed to the disk
00:00:00.902 PIIX3 ATA: LUN#0: disk, PCHS=4161/16/63, total number of sectors 4194304
00:00:00.902 PIIX3 ATA: LUN#1: no unit
00:00:00.902 PIIX3 ATA: LUN#2: no unit
00:00:00.902 PIIX3 ATA: LUN#3: no unit
00:00:00.902 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:00.902 PIIX3 ATA: Ctl#1: finished processing RESET
00:00:00.939 NAT: value of BindIP has been ignored
00:00:00.940 Audio: Trying driver 'pulse'.
00:00:00.945 Audio: set_record_source ars=0 als=0 (not implemented)
00:00:00.945 Pulse: open PCM_IN rate=44100Hz channels=2 format=s16le
00:00:00.945 Pulse: Requested record buffer attributes: maxlength=26460 fragsize=17640
00:00:00.961 Pulse:  Obtained record buffer attributes: maxlength=26460 fragsize=8820
00:00:00.962 Pulse: open PCM_OUT rate=44100Hz channels=2 format=s16le
00:00:00.962 Pulse: Requested playback buffer attributes: maxlength=26460 tlength=17640 prebuf=-1 minreq=-1
00:00:00.994 Pulse:  Obtained playback buffer attributes: maxlength=26460 tlength=12348 prebuf=8824 minreq=3528
00:00:00.996 DevPcBios: ATA LUN#0 LCHS=520/128/63
00:00:00.996 PGMR3InitFinalize: 4 MB PSE mask 0000000fffffffff
00:00:01.016 HWACCM: No VT-x or AMD-V CPU extension found. Reason VERR_VMX_NO_VMX
00:00:01.016 HWACCM: VMX MSR_IA32_FEATURE_CONTROL=0
00:00:01.037 VM: Halt method global1 (5)
00:00:01.037 Changing the VM state from 'CREATING' to 'CREATED'.
00:00:01.038 Changing the VM state from 'CREATED' to 'POWERING_ON'.
00:00:01.038 Changing the VM state from 'POWERING_ON' to 'RUNNING'.
00:00:01.050 Guest Log: BIOS: VirtualBox 3.2.6
00:00:01.050 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:01.160 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:01.161 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:01.165 Guest Log: BIOS: ata0-0: PCHS=4161/16/63 LCHS=520/128/63
00:00:01.169 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:01.189 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=08051000 w=640 h=480 bpp=32 cbLine=0xA00
00:00:01.344 2D video acceleration is disabled.
00:00:03.655 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=00000000 w=720 h=400 bpp=0 cbLine=0x0
00:00:03.662 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:03.666 Guest Log: BIOS: Booting from Floppy...
00:00:03.686 Guest Log: BIOS: int13_harddisk: function 41, unmapped device for ELDL=81
00:00:03.686 Guest Log: BIOS: int13_harddisk: function 08, unmapped device for ELDL=81
00:00:08.868 
00:00:08.868 !!Assertion Failed!!
00:00:08.868 Expression: <NULL>
00:00:08.868 Location  : /home/vbox/vbox-3.2.6/src/VBox/Devices/PC/DevPIC.cpp(482) int pic_ioport_write(void*, uint32_t, uint32_t)
00:00:08.868 single mode not supported

Re: ide_initialize problem

Posted: Fri Jul 09, 2010 4:23 am
by Combuster
00:00:08.868 Location : /home/vbox/vbox-3.2.6/src/VBox/Devices/PC/DevPIC.cpp(482) int pic_ioport_write(void*, uint32_t, uint32_t)
00:00:08.868 single mode not supported
bewing asked you to look at the log file, not posting it :wink:

Re: ide_initialize problem

Posted: Fri Jul 09, 2010 4:25 am
by Almamu
The problem is im runing the OS on single mode ?

Re: ide_initialize problem

Posted: Tue Jul 13, 2010 8:46 am
by Almamu
I cant get it fixed, i have tried a lot of things, i'm using ide_initialize:

Code: Select all

ide_initialize(0x1F0, 0x3F4, 0x170, 0x374, 0x000);
Im runing it on protected mode...
Please help me..... [-o<

P.D: Sorry for double-posting...

Re: ide_initialize problem

Posted: Tue Jul 13, 2010 9:19 am
by gerryg400
Have you ever debugged software before ? You need to develop some techniques for finding and fixing problems like this.

Can you think of any way to find exactly (or even approximately) where the problem is ?

Re: ide_initialize problem

Posted: Mon Jul 19, 2010 12:10 pm
by Almamu
gerryg400 wrote:Have you ever debugged software before ? You need to develop some techniques for finding and fixing problems like this.

Can you think of any way to find exactly (or even approximately) where the problem is ?
Can these warnings cause the error?:

Code: Select all

./src/kernel/ide.c:180: warning: assignment makes integer from pointer without a cast
./src/kernel/ide.c:181: warning: assignment makes integer from pointer without a cast
./src/kernel/ide.c:182: warning: assignment makes integer from pointer without a cast
./src/kernel/ide.c:187: warning: assignment makes integer from pointer without a cast
./src/kernel/ide.c:190: warning: assignment makes integer from pointer without a cast
180-182:

Code: Select all

         ide_devices[count].Signature    = ((unsigned short *)(ide_buf + ATA_IDENT_DEVICETYPE));
         ide_devices[count].Capabilities = ((unsigned short *)(ide_buf + ATA_IDENT_CAPABILITIES));
         ide_devices[count].CommandSets  = ((unsigned int *)(ide_buf + ATA_IDENT_COMMANDSETS));
187:

Code: Select all

ide_devices[count].Size   = ((unsigned int *)(ide_buf + ATA_IDENT_MAX_LBA_EXT));
190:

Code: Select all

ide_devices[count].Size   = ((unsigned int *)(ide_buf + ATA_IDENT_MAX_LBA));
I have a exception handler, but it seems to not return any exception... Im using VirtualBox to emulate the OS.

Re: ide_initialize problem

Posted: Mon Jul 19, 2010 1:22 pm
by Combuster
You missed the point. What gerryg was saying is that you (as per forum rules) should know how to do basic things in your language. The error here is obvious for any trained eye. Let alone when the compiler is complaining loudly about it. And even without the warning message, a simple print would've been able to pinpoint the error. Listen to GCC and you'll find your problem.

That said, the required knowledge exists for a reason. Please, learn to program before trying to write an OS.

Re: ide_initialize problem

Posted: Mon Jul 19, 2010 2:00 pm
by Almamu
Combuster wrote:You missed the point. What gerryg was saying is that you (as per forum rules) should know how to do basic things in your language. The error here is obvious for any trained eye. Let alone when the compiler is complaining loudly about it. And even without the warning message, a simple print would've been able to pinpoint the error. Listen to GCC and you'll find your problem.

That said, the required knowledge exists for a reason. Please, learn to program before trying to write an OS.
I have programmed C programms for a lot of platforms in 2 years, and i've never had problems like this, never... so this is the first time i have this problem..., the problem of adding some Printf's is that the machine simply shutdowns when i use this function.

Coming back to this:
The function ide_initialize is writed exactly as the Wiki says, so i cant see the problem of the function, and the line

Code: Select all

ide_initialize(0x1F0, 0x3F4, 0x170, 0x374, 0x000);
its too from the wiki... I have added some printfs with info and some for of aprox 50000 ms and i cant see any message...
I have an exception Handler and timer to the OS, but these two seem to not work correctly...

EDIT: Fixed all the warnings and still the same error...

Re: ide_initialize problem

Posted: Mon Jul 19, 2010 2:06 pm
by Combuster
So all this time you just copy and pasted code and expected it to work? :roll:

EDIT: and you seem to have posted a lie:
i have writed ALL the code by hand in a file called ide.c.

Re: ide_initialize problem

Posted: Mon Jul 19, 2010 2:12 pm
by Almamu
Combuster wrote:So all this time you just copy and pasted code and expected it to work? :roll:

EDIT: and you seem to have posted a lie:
i have writed ALL the code by hand in a file called ide.c.
Its no a lie, i have written all the code by hand, yes, but reading, at the same time the Wiki and the code examples... :|

Re: ide_initialize problem

Posted: Mon Jul 19, 2010 3:23 pm
by Almamu
Ok, i got the problem, it is on these lines:

Code: Select all

channels[ATA_PRIMARY  ].base  = (BAR0 & 0xFFFFFFFC) + 0x1F0 * (!BAR0);
channels[ATA_SECONDARY].base  = (BAR2 & 0xFFFFFFFC) + 0x170 * (!BAR2);
Im not sure whats wrong, all the struct has the same variable types(unsigned short)(excluding unsigned char nIEN)...
Any idea of whats wrong with this?

P.D: I have no used debug messages, only comenting some lines and i got it working... Sorry for double post...

Re: ide_initialize problem

Posted: Mon Jul 19, 2010 5:17 pm
by gerryg400
You have

Code: Select all

ide_devices[count].Signature    = ((unsigned short *)(ide_buf + ATA_IDENT_DEVICETYPE));
Do you mean...
a)

Code: Select all

ide_devices[count].Signature    = *((unsigned short *)(ide_buf + ATA_IDENT_DEVICETYPE));
or
b)

Code: Select all

ide_devices[count].Signature    = ((unsigned short)(ide_buf + ATA_IDENT_DEVICETYPE));
or something else ?

Re: ide_initialize problem

Posted: Tue Jul 20, 2010 3:47 am
by Almamu
gerryg400 wrote:You have

Code: Select all

ide_devices[count].Signature    = ((unsigned short *)(ide_buf + ATA_IDENT_DEVICETYPE));
Do you mean...
a)

Code: Select all

ide_devices[count].Signature    = *((unsigned short *)(ide_buf + ATA_IDENT_DEVICETYPE));
or
b)

Code: Select all

ide_devices[count].Signature    = ((unsigned short)(ide_buf + ATA_IDENT_DEVICETYPE));
or something else ?

Code: Select all

ide_devices[count].Signature    = (unsigned int)ide_buf + ATA_IDENT_DEVICETYPE;
ide_buf is unsigned char, and the define is already in this type, so the warning, now, doesn't exists. But the problem is in the two lines:

Code: Select all

channels[ATA_PRIMARY  ].base  = (BAR0 & 0xFFFFFFFC) + 0x1F0 * (!BAR0);
channels[ATA_SECONDARY].base  = (BAR2 & 0xFFFFFFFC) + 0x170 * (!BAR2);
or on the ide_write and ide_read_buffer...