Permalink
Browse files

. 修正内置usb驱动参数.(issues #139)

  usb [--delay=0xMN] --init
  M: 单次传输扇区数。 0: 32扇区(默认); 1: 1扇区。
  N: 指定延迟参数。 默认0, 其他1,2,3,4等。
  • Loading branch information...
yaya
yaya committed Apr 21, 2017
1 parent 9721df1 commit 3ada2cd84165952035136f683d5fcac6f614f6f8
Showing with 26 additions and 7 deletions.
  1. +6 −0 ChangeLog_chenall.txt
  2. +12 −3 stage2/asm.S
  3. +7 −4 stage2/builtins.c
  4. +1 −0 stage2/shared.h
View
@@ -1,4 +1,10 @@
更新说明:
2017-04-21(yaya)
修正内置usb驱动参数。
usb [--delay=0xMN] --init
M: 单次传输扇区数。 0: 32扇区(默认); 1: 1扇区。
N: 指定延迟参数。 默认0, 其他1,2,3,4等。
2017-03-30(yaya)
显示包含空格的文件或目录时,仍然显示转义符'\'。
View
@@ -7987,8 +7987,8 @@ ENTRY(max_dri)
.byte 0
Count_1ms:
.word 0
Single_size:
.word 0
ENTRY(One_transfer)
.word 0x4000
bus_device_function:
.word 0
Register_pci:
@@ -8212,6 +8212,8 @@ TOffset:
.word 0
TSection:
.word 0
Single_size:
.word 0
Entry_int13:
call Find_drive_info
@@ -8832,6 +8834,12 @@ Bulk_transfer:
andl $0x0fffff000, %edx
addl %eax, %edx
movl %edx, 0x10(%di)
addl %eax, %edx
movl %edx, 0x14(%di)
addl %eax, %edx
movl %edx, 0x18(%di)
addl %eax, %edx
movl %edx, 0x1c(%di)
1:
leaw (InProperty - USB2DRI)(%bx), %si
movb (Direction1 - USB2DRI), %al
@@ -8896,7 +8904,8 @@ SCSI_Command:
movl %edx, (TOffset - USB2DRI)
movl (dCBWDataTransferLength - USB2DRI), %eax
movl %eax, (TSize - USB2DRI)
movw $0x200, (Single_size - USB2DRI)
movw (One_transfer - USB2DRI), %ax
movw %ax, (Single_size - USB2DRI)
movb (_lun - USB2DRI), %al
movb %al, (bCBWLUN - USB2DRI)
View
@@ -14564,7 +14564,9 @@ usb_func (char *arg, int flags)
arg += 8;
if (! safe_parse_maxint (&arg, &tmp))
return 0;
usb_delay = tmp;
if (tmp & 0xf0)
One_transfer = 0x200;
usb_delay = tmp & 0xf;
arg = skip_to (0, arg);
}
if (grub_memcmp (arg, "--init", 6) == 0)
@@ -14618,9 +14620,10 @@ static struct builtin builtin_usb =
"usb",
usb_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_SCRIPT | BUILTIN_HELP_LIST,
"usb [--delay=P] --init",
"Initialise usb2.0 device."
"P: specifies delay,reduce speed. default 0, other 1,2,3,4 etc."
"usb [--delay=0xMN] --init",
"Initialise usb2.0 device.\n"
"M: single transmission sectors. 0: 32 sectors (default); 1: 1 sectors.\n"
"N: specifies delay,reduce speed. default 0, other 1,2,3,4 etc."
};
View
@@ -1051,6 +1051,7 @@ extern unsigned long int13_scheme; /* controls disk access methods in emulation
extern unsigned char atapi_dev_count; /* ATAPI CDROM DRIVE COUNT */
extern unsigned long reg_base_addr_append;
extern unsigned char usb_delay;
extern unsigned short One_transfer;
extern unsigned char usb_count_error;
extern unsigned char usb_drive_num[8];
extern unsigned long init_usb(void);

0 comments on commit 3ada2cd

Please sign in to comment.