VirtualBox

Changeset 36877 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
Apr 28, 2011 7:38:13 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71455
Message:

BIOS: AHCI driver skeleton

Location:
trunk/src/VBox/Devices/PC/BIOS
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk

    r35380 r36877  
    5858                $(PATH_SUB_CURRENT)/apmbios.S $(if $(VBOX_WITH_SCSI),$(PATH_SUB_CURRENT)/scsi.c) \
    5959                $(PATH_SUB_CURRENT)/../DevPcBios.h $(PATH_ROOT)/include/VBox/bioslogo.h \
     60                $(if $(VBOX_WITH_BIOS_AHCI),$(PATH_SUB_CURRENT)/ahci.c) \
    6061                $(VBOX_VERSION_STAMP) | $$(dir $$@)
    6162        $(call MSG_TOOL,cpp,PcBiosBin,$<,$@)
     
    6364                -I$(PcBiosBin_0_OUTDIR) -I$(VBOX_PATH_DEVICES_SRC)/PC -I$(PATH_ROOT)/include -I$(PATH_OUT) \
    6465                -DBX_SMP_PROCESSORS=1 -DVBOX -DVBOX_PC_BIOS $(addprefix -D,$(DEFS) $(DEFS.$(KBUILD_TYPE))) \
    65                 $(if $(VBOX_WITH_SCSI),-DVBOX_WITH_SCSI) \
     66                $(if $(VBOX_WITH_SCSI),-DVBOX_WITH_SCSI) $(if $(VBOX_WITH_BIOS_AHCI),-DVBOX_WITH_BIOS_AHCI) \
    6667                -P -o $@ $<
    6768
  • trunk/src/VBox/Devices/PC/BIOS/rombios.c

    r36731 r36877  
    778778#endif
    779779
     780#ifdef VBOX_WITH_BIOS_AHCI
     781  typedef struct {
     782    Bit16u iobase;
     783    } ahci_t;
     784#endif
     785
    780786  // for access to EBDA area
    781787  //     The EBDA structure should conform to
     
    805811    scsi_t scsi;
    806812# endif
     813
     814#ifdef VBOX_WITH_BIOS_AHCI
     815    ahci_t ahci;
     816#endif
    807817
    808818    unsigned char uForceBootDrive;
     
    928938static void           outb_cmos();
    929939static Bit16u         inw();
     940#ifdef VBOX_WITH_BIOS_AHCI
     941static Bit32u         inl();
     942#endif
    930943static void           outw();
     944#ifdef VBOX_WITH_BIOS_AHCI
     945static void           outl();
     946#endif
    931947static void           init_rtc();
    932948static bx_bool        rtc_updating();
     
    12651281#endif
    12661282
     1283#ifdef VBOX_WITH_BIOS_AHCI
     1284  Bit32u
     1285inl(port)
     1286  Bit16u port;
     1287{
     1288ASM_START
     1289  push bp
     1290  mov  bp, sp
     1291
     1292    push dx
     1293    mov  dx, 4[bp]
     1294    in   eax, dx
     1295    pop  dx
     1296
     1297  pop  bp
     1298ASM_END
     1299}
     1300#endif
     1301
    12671302  void
    12681303outb(port, val)
     
    13031338    pop  dx
    13041339    pop  ax
     1340
     1341  pop  bp
     1342ASM_END
     1343}
     1344#endif
     1345
     1346#ifdef VBOX_WITH_BIOS_AHCI
     1347  void
     1348outl(port, val)
     1349  Bit16u port;
     1350  Bit32u  val;
     1351{
     1352ASM_START
     1353  push bp
     1354  mov  bp, sp
     1355
     1356    push eax
     1357    push dx
     1358    mov  dx, _outl.port + 2[bp]
     1359    mov  eax, _outl.val + 2[bp]
     1360    out  dx, eax
     1361    pop  dx
     1362    pop  eax
    13051363
    13061364  pop  bp
     
    38163874#ifdef VBOX_WITH_SCSI
    38173875#  include "scsi.c"
     3876#endif
     3877
     3878#ifdef VBOX_WITH_BIOS_AHCI
     3879#  include "ahci.c"
    38183880#endif
    38193881
     
    1166011722#endif
    1166111723
     11724#ifdef VBOX_WITH_BIOS_AHCI
     11725  ;;
     11726  ;; AHCI driver setup
     11727  ;;
     11728  call _ahci_init
     11729  ;;
     11730#endif
     11731
    1166211732  call _print_bios_banner
    1166311733
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette