OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 7:37 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: absence of PXE+ structure
PostPosted: Thu Aug 01, 2019 2:08 am 
Offline

Joined: Thu Aug 01, 2019 1:50 am
Posts: 5
Hi,

I faced issue about PXE structure. I couldn't found !PXE in pxe pointer of PXENV+ structure. My structure for PXENV+:
Code:
    // The Signature of the PXENV+ structure - contains "PXENV+".
    uint8_t  Signature[6];

    // The MSB contains the Major version number, while the LSB contains the minor version number.
    uint16_t Version;

    // The Length and the checksum of the structure, used for calculating the checksum.
    uint8_t  Length;
    uint8_t  Checksum;

    // A Far Pointer to the real mode PXE API entry point.
    uint32_t RMEntry;

    // 32-bit offset to the protected mode API entry point. Instead of this, the !PXE structure is recommended.
    uint32_t PMOffset;

    // The rest of the fields don't matter much, and the Specifications can be referred.
    uint16_t PMSelector;
    uint16_t StackSeg;
    uint16_t StackSize;
    uint16_t BCCodeSeg;
    uint16_t BCCodeSize;
    uint16_t BCDataSeg;
    uint16_t BCDataSize;

    uint16_t UNDIDataSeg;
    uint16_t UNDIDataSize;
    uint16_t UNDICodeSeg;
    uint16_t UNDICodeSize;

    // This is a far pointer to the "!PXE" structure, only present when the structure is present.
    uint32_t PXEPtr;

When I was in the Protected mode, I switched to real mode for PXE interrupt. After that es and ebx registers got the address of PXENV+ structure.
Then I want to use PXEPtr that has incorrect address. But there is correct Signature, Length, Checksum in PXENV+ structure but PXEPtr has incorrect address or in VMWare workstation PXEPtr has address of PXENV+ structure.


Top
 Profile  
 
 Post subject: Re: absence of PXE+ structure
PostPosted: Thu Aug 01, 2019 2:50 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Did you tell your compiler that the PXENV+ structure doesn't follow C struct alignment rules?


Top
 Profile  
 
 Post subject: Re: absence of PXE+ structure
PostPosted: Thu Aug 01, 2019 4:15 am 
Offline

Joined: Thu Aug 01, 2019 1:50 am
Posts: 5
Yes, I've configured like this:

Code:
struct __attribute__((__packed__)) PXE_ENV{
    // The Signature of the PXENV+ structure - contains "PXENV+".
    uint8_t  Signature[6];

    // The MSB contains the Major version number, while the LSB contains the minor version number.
    uint16_t Version;

    // The Length and the checksum of the structure, used for calculating the checksum.
    uint8_t  Length;
    uint8_t  Checksum;

    // A Far Pointer to the real mode PXE API entry point.
    uint32_t RMEntry;

    // 32-bit offset to the protected mode API entry point. Instead of this, the !PXE structure is recommended.
    uint32_t PMOffset;

    // The rest of the fields don't matter much, and the Specifications can be referred.
    uint16_t PMSelector;
    uint16_t StackSeg;
    uint16_t StackSize;
    uint16_t BCCodeSeg;
    uint16_t BCCodeSize;
    uint16_t BCDataSeg;
    uint16_t BCDataSize;

    uint16_t UNDIDataSeg;
    uint16_t UNDIDataSize;
    uint16_t UNDICodeSeg;
    uint16_t UNDICodeSize;

    // This is a far pointer to the "!PXE" structure, only present when the structure is present.
    uint32_t PXEPtr;
};


Top
 Profile  
 
 Post subject: Re: absence of PXE+ structure
PostPosted: Thu Aug 01, 2019 4:44 am 
Offline

Joined: Thu Aug 01, 2019 1:50 am
Posts: 5
I found a problem. I have to translate segment:offset to physical address in this field (PXEPtr). That's worked well!

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group