VirtualBox

Changeset 82162 in vbox


Ignore:
Timestamp:
Nov 25, 2019 10:30:40 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134972
Message:

PC/BIOS: Move cdb_rw10 and cdb_rw16 into the generic SCSI header so it can be used from other drivers as well

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/scsi.c

    r81412 r82162  
    5353#define SCSI_TXDIR_FROM_DEVICE 0
    5454#define SCSI_TXDIR_TO_DEVICE   1
    55 
    56 #pragma pack(1)
    57 
    58 /* READ_10/WRITE_10 CDB layout. */
    59 typedef struct {
    60     uint16_t    command;    /* Command. */
    61     uint32_t    lba;        /* LBA, MSB first! */
    62     uint8_t     pad1;       /* Unused. */
    63     uint16_t    nsect;      /* Sector count, MSB first! */
    64     uint8_t     pad2;       /* Unused. */
    65 } cdb_rw10;
    66 
    67 /* READ_16/WRITE_16 CDB layout. */
    68 typedef struct {
    69     uint16_t    command;    /* Command. */
    70     uint64_t    lba;        /* LBA, MSB first! */
    71     uint32_t    nsect32;    /* Sector count, MSB first! */
    72     uint8_t     pad1;       /* Unused. */
    73     uint8_t     pad2;       /* Unused. */
    74 } cdb_rw16;
    75 
    76 #pragma pack()
    77 
    78 ct_assert(sizeof(cdb_rw10) == 10);
    79 ct_assert(sizeof(cdb_rw16) == 16);
    8055
    8156void insb_discard(unsigned nbytes, unsigned port);
  • trunk/src/VBox/Devices/PC/BIOS/scsi.h

    r81412 r82162  
    3232#define SCSI_WRITE_16      0x8a
    3333
     34#pragma pack(1)
     35
     36/* READ_10/WRITE_10 CDB layout. */
     37typedef struct {
     38    uint16_t    command;    /* Command. */
     39    uint32_t    lba;        /* LBA, MSB first! */
     40    uint8_t     pad1;       /* Unused. */
     41    uint16_t    nsect;      /* Sector count, MSB first! */
     42    uint8_t     pad2;       /* Unused. */
     43} cdb_rw10;
     44
     45/* READ_16/WRITE_16 CDB layout. */
     46typedef struct {
     47    uint16_t    command;    /* Command. */
     48    uint64_t    lba;        /* LBA, MSB first! */
     49    uint32_t    nsect32;    /* Sector count, MSB first! */
     50    uint8_t     pad1;       /* Unused. */
     51    uint8_t     pad2;       /* Unused. */
     52} cdb_rw16;
     53
     54#pragma pack()
     55
     56ct_assert(sizeof(cdb_rw10) == 10);
     57ct_assert(sizeof(cdb_rw16) == 16);
     58
    3459#endif /* !VBOX_INCLUDED_SRC_PC_BIOS_scsi_h */
    3560
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