A kind of method of Godson mainboard hard disk handover management
Technical field
The present invention relates to mainboard BIOS, specifically, relate to hardware platform, realize the method that SATA and the work of IDE hard disk are switched based on Godson loongson3A CPU and AMD RS780E combination.
Background technology
Godson (English: Loongson) be universal cpu, adopt lean instruction set, be similar to the MIPS instruction set; The Basic Input or Output System (BIOS) that it adopts is the software of a kind of PMON by name.PMON is an Open Source Code Software that has BIOS and boot loader partial function concurrently, is mainly used in platforms such as MIPS, ARM, PowerPC, is different from the BIOS of X86 framework.
Godson product in the market used two types hard disk, and the one, the IDE hard disk that south bridge IDE controller is direct-connected, the 2nd, change the hard disk that the SATA interface connector connects through IDE.And the situation of on a Godson mainboard, using south bridge IDE controller and SATA controller to be connected hard disk did not separately simultaneously occur; When south bridge IDE controller and SATA controller can be worked simultaneously, work how to consult two kinds of hard disks had just become problem.
Summary of the invention
In order to address the above problem, the present invention proposes the method for the work of a kind of SATA of negotiation controller and IDE controller.
A kind of method of Godson mainboard hard disk handover management; BIOS scans and initialization hard disk controller when starting; Hard disk controller scanning hard disc apparatus; And read the hard disk configuration information of hard disk handover module, configuration information is fed back to BIOS, BIOS according to feedback information from hard disk startup operating system.
Preferably, said BIOS adopts the PMON program.
Preferably, said hard disk controller comprises IDE controller and SATA controller.
Preferably, said handover module is the SMBUS controller.
More preferably, said SMBUS controller is through 0xAD register controlled hard disk startup order.
More preferably, whether set comes the setting harddisk boot sequence through the 4th for said 0xAD register.
More preferably, when the 4th position of said 0xAD register was empty, then the SATA hard disk was a main equipment; During the 4th bit of said 0xAD register, IDE hard disk position main equipment then.
Preferably, added the SET_SATA option in the configuration file of said BIOS and the device file.
More preferably, when said SET_SATA option is selected, then from the SATA hard disk startup; When said SET_SATA option is not selected, then from the IDE hard disk startup.
The present invention can be good at controlling the job order of SATA and IDE through checking, has guaranteed the stable operation of Godson CPU+AMD RS780E mainboard.
Embodiment
This instance based on hardware platform be the Godson blade server.The major part of Godson blade is Godson 3A chip and AMD 780E+SB700 chipset.The main effect of PMON program is the initialization that realizes each functions of the equipments on the Godson blade, guarantees Godson blade operate as normal, and smooth pilot operationp system.
PMON can be divided into three steps substantially to the work of south bridge hard disk controller: one, hard disk controller enables; Two, the scanning of hard disk controller and configuration; Three, the initialization of hard disk controller.Therefore, in PMON, no matter be to SATA controller or IDE controller, their initial method all is the same, that is to say that PMON can be both equality of treatment.
The present invention's 0xAD register through control SMBUS controller in the south bridge device initialize of PMON part solves the IDE device start or from the problem of SATA device start: when putting the 4th of empty this register; It is main equipment that the Godson mainboard will be provided with the SATA hard disk, and from the SATA hard disk startup; When the 4th in this register of set, it is main equipment that the Godson mainboard will be provided with the IDE hard disk, and starts from IDE.In addition; For better this register of control on program, the present invention adds the SET_SATA option in the configuration file of PMON and device file, when this option of selection; The default value that the 0xAD register of maintenance SMBUS is the 4th, it is main equipment that the SATA hard disk is set; When not selecting this, the 4th of the 0xAD of SMBUS is set, making the IDE hard disk is main equipment.